Beispiel #1
0
        public FNhomThietBi()
        {
            InitializeComponent();
            DBNhomThietBi ntb = new DBNhomThietBi();

            ntb.updateGridData(dataGridNhom);
        }
Beispiel #2
0
        private void btnDelNhom_Click(object sender, EventArgs e)
        {
            DBNhomThietBi ntb = new DBNhomThietBi();

            ntb.removeDeviceGroup(txtMaNhom.Text);
            ntb.updateGridData(dataGridNhom);
            resetTXT();
        }
Beispiel #3
0
        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);
        }