Example #1
0
 private void btn_Them_Click(object sender, EventArgs e)
 {
     if (btn_Them.Text == "&Thêm")
     {
         iThem_Sua = 1;
         XoaKhoangTrang();
         DGV_DanhSachTB.Enabled = false;
         btn_Xoa.Enabled        = false;
         btn_Sua.Enabled        = false;
         btn_Luu.Enabled        = true;
         Gpb_ThongTin.Enabled   = true;
         btn_Them.Text          = "&Hủy";
     }
     else if (btn_Them.Text == "&Hủy")
     {
         iThem_Sua = 0;
         DGV_DanhSachTB.Focus();
         DGV_DanhSachTB.Select();
         btn_Xoa.Enabled        = true;
         btn_Sua.Enabled        = true;
         btn_Luu.Enabled        = false;
         Gpb_ThongTin.Enabled   = false;
         DGV_DanhSachTB.Enabled = true;
         btn_Them.Text          = "&Thêm";
     }
 }
Example #2
0
 private void Frm_ThietBi_Load(object sender, EventArgs e)
 {
     Gpb_ThongTin.Enabled = false;
     DGV_DanhSachTB.Focus();
     DGV_DanhSachTB.Select();
     GetTableLoaiTB();
     ShowTableData();
 }