General information
Category:
Coding, syntax and commands
Environment versions
Network:
Windows 2003 Server
No the same one is in a class and the other is in the UI.
public void BuildTable()
{
DataColumn col1 = new DataColumn("line");
DataColumn col2 = new DataColumn("item");
DataColumn col3 = new DataColumn("descrip");
DataColumn col4 = new DataColumn("qtyord");
items.Columns.Add(col1);
items.Columns.Add(col2);
items.Columns.Add(col3);
items.Columns.Add(col4);
}
public void AddItem(string item,string desc,decimal qtyord)
{
BussinessAccess ba = new BussinessAccess();
DataRow dr;
dr = ba.items.NewRow();
dr.BeginEdit();
dr["line"] = ba.items.Rows.Count + 1;
dr["item"] = item.Trim();
dr["descrip"] = desc.Trim();
dr["qtyord"] = qtyord;
dr.AcceptChanges();
dr.EndEdit();
ba.items.Rows.Add(dr);
gridControl1.DataSource = ba.items;
}
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only