private void XoaCay_Load(object sender, EventArgs e) { thamso = new ThamSoBUS(); cayBus = new CayCanhBUS(); ViTriBus = new ViTriBUS(); tsDTO = thamso.selectThamSo(); listViTri = ViTriBus.selectVT(); listcayCanh = cayBus.select(); }
private void QuanLyCayCanh_Load(object sender, EventArgs e) { vtBus = new ViTriBUS(); loaiBus = new LoaiCayBUS(); cayBus = new CayCanhBUS(); tinhtrangBus = new TinhTrangBUS(); listtinhtrang = tinhtrangBus.selectTT(); listloai = loaiBus.selectLoaiCay(); listVT = vtBus.selectVT(); loadData_Vao_GridView(); }
private void loadViTriVao_Combobox(int number) { listViTri = ViTriBus.selectVT(); if (listViTri == null) { MessageBox.Show("Có lỗi khi lấy Món ăn từ DB"); return; } comboBoxVitri.DataSource = new BindingSource(listViTri, String.Empty); comboBoxVitri.DisplayMember = "TenViTriPT"; comboBoxVitri.ValueMember = "MaViTriPT"; CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[comboBoxVitri.DataSource]; myCurrencyManager.Refresh(); if (comboBoxVitri.Items.Count > 0) { comboBoxVitri.SelectedIndex = number; } }
private void ThemViTri_Load(object sender, EventArgs e) { vtBus = new ViTriBUS(); listVT = vtBus.selectVT(); macuoi = listVT[listVT.Count() - 1].MaViTriPT; }