public FNhomThietBi() { InitializeComponent(); DBNhomThietBi ntb = new DBNhomThietBi(); ntb.updateGridData(dataGridNhom); }
private void btnDelNhom_Click(object sender, EventArgs e) { DBNhomThietBi ntb = new DBNhomThietBi(); ntb.removeDeviceGroup(txtMaNhom.Text); ntb.updateGridData(dataGridNhom); resetTXT(); }
private void updateDB(bool isNewNhom) { NhomThietBi nhom = new NhomThietBi(); nhom.groupID = txtMaNhom.Text; nhom.groupName = txtTenNhom.Text; nhom.groupSection = txtHe.Text; if (nhom.groupID.Equals("") || nhom.groupName.Equals("")) { MessageBox.Show(this, "Vui Long Dien Ma Nhom Ten Nhom", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } DBNhomThietBi ntbDB = new DBNhomThietBi(); ntbDB.addNewDeviceGroup(nhom, isNewNhom); ntbDB.updateGridData(dataGridNhom); }