void InitFm() { string sql = "select FmId,FmName from ProductionFormular;"; DataTable data = Class.DBConnString.clsDB.QueryDataTable(sql.ToString()); foreach (DataRow row in data.Rows) { CheckObject c = new CheckObject(); c.Value = row["FmId"].ToString(); c.Text = row["FmName"].ToString(); checkedListBoxFm.Items.Add(c, false); } }
void InitEm() { string sql = "select EmployerId,EmployerName,EmployerAddress from EMPLOYER;"; DataTable data = Class.DBConnString.clsDB.QueryDataTable(sql.ToString()); foreach (DataRow row in data.Rows) { CheckObject c = new CheckObject(); c.Value = row["EmployerId"].ToString(); c.Text = row["EmployerName"].ToString() + " (" + row["EmployerAddress"].ToString() + ")"; checkedListBoxEm.Items.Add(c, false); } }