Exemplo n.º 1
0
        public FNhomThietBi()
        {
            InitializeComponent();
            DBNhomThietBi ntb = new DBNhomThietBi();

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

            ntb.removeDeviceGroup(txtMaNhom.Text);
            ntb.updateGridData(dataGridNhom);
            resetTXT();
        }
Exemplo n.º 3
0
        public FThietBi()
        {
            InitializeComponent();
            DBThietBi dbThietBi = new DBThietBi();

            dbThietBi.updateGridData(dataGridThietBi);
            DBNhomThietBi ntb = new DBNhomThietBi();

            ntb.updateComboBoxIdOnly(cbBoxDeviceGroup);
        }
Exemplo n.º 4
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);
        }