Code (csharp):
//DataAccessLayer
public DataSet SelectAll()
{
try
{
Database db = DatabaseFactory.CreateDatabase();
DbCommand SellectAll = db.GetStoredProcCommand("ListajSveKorisnike");
DataSet dsResult = db.ExecuteDataSet(SellectAll);
return dsResult;
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
//BLL
public DataSet SelectAllKorisnici()
{
return Dal.SelectAll();
}
//Forma sa gridom
BAL bll = new BAL();
DataSet dsListajKorisnike = bll.SelectAllKorisnici();
dataGridView1.DataSource = dsListajKorisnike.Tables[0];
public DataSet SelectAll()
{
try
{
Database db = DatabaseFactory.CreateDatabase();
DbCommand SellectAll = db.GetStoredProcCommand("ListajSveKorisnike");
DataSet dsResult = db.ExecuteDataSet(SellectAll);
return dsResult;
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
//BLL
public DataSet SelectAllKorisnici()
{
return Dal.SelectAll();
}
//Forma sa gridom
BAL bll = new BAL();
DataSet dsListajKorisnike = bll.SelectAllKorisnici();
dataGridView1.DataSource = dsListajKorisnike.Tables[0];
Moje pitanje je:
Kako da bindujem textboxove na toj istoj fomi, probao sam sa textbox.databinding ali ne znam tacno kako to radi, isto tako izbegavam binding wizard samo hocu preko koda.
Hvala unapred.
http://i.imgur.com/V3feW.jpg
http://on.wsj.com/H9yjz6 -- India Graduates Millions, but Too Few Are Fit to Hire
http://on.wsj.com/H9yjz6 -- India Graduates Millions, but Too Few Are Fit to Hire