private void UC_Sclad_Load(object sender, EventArgs e) { OleDbDataAdapter dataAdapter = new OleDbDataAdapter(db.selectSclad, db.connect); DataSet ds = new DataSet(); dataAdapter.Fill(ds); DGVIEWBlydo.DataSource = ds.Tables[0].DefaultView; DGVIEWBlydo.Columns[0].Visible = false; if (DGVIEWBlydo.RowCount > 0) { EditItems.Clear(); for (int i = 0; i < DGVIEWBlydo.ColumnCount; i++) { EditItems.Add(DGVIEWBlydo.Rows[0].Cells[i].Value.ToString()); } } }
private void UC_Blydo_Load(object sender, EventArgs e) { OleDbDataAdapter dataAdapter = new OleDbDataAdapter(db.selectBlydo, db.connect); DataSet ds = new DataSet(); dataAdapter.Fill(ds); DGVIEWBlydo.DataSource = ds.Tables[0].DefaultView; //TRecept.Enabled = false; DGVIEWBlydo.Columns[0].Visible = false; if (DGVIEWBlydo.RowCount > 0) { EditItems.Clear(); for (int i = 0; i < DGVIEWBlydo.ColumnCount; i++) { EditItems.Add(DGVIEWBlydo.Rows[0].Cells[i].Value.ToString()); } } DGSostav(Convert.ToInt32(EditItems[0])); getRecept(Convert.ToInt32(EditItems[0])); }
private void UC_Menu_Load(object sender, EventArgs e) { TBlydo.Items.Clear(); OleDbDataAdapter dataAdapter = new OleDbDataAdapter(db.selectMenu, db.connect); DataSet ds = new DataSet(); dataAdapter.Fill(ds); DGVIEWBlydo.DataSource = ds.Tables[0].DefaultView; string[] kategor = getProdict().Select(n => n.ToString()).ToArray(); TBlydo.Items.AddRange(kategor); DGVIEWBlydo.Columns[0].Visible = false; if (DGVIEWBlydo.RowCount > 0) { EditItems.Clear(); for (int i = 0; i < DGVIEWBlydo.ColumnCount; i++) { EditItems.Add(DGVIEWBlydo.Rows[0].Cells[i].Value.ToString()); } } }