private void btn_Them_Click(object sender, EventArgs e) { if (btn_Them.Text == "&Thêm") { iThem_Sua = 1; XoaKhoangTrang(); DGV_LoaiThietBi.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_LoaiThietBi.Focus(); DGV_LoaiThietBi.Select(); btn_Xoa.Enabled = true; btn_Sua.Enabled = true; btn_Luu.Enabled = false; Gpb_ThongTin.Enabled = false; DGV_LoaiThietBi.Enabled = true; btn_Them.Text = "&Thêm"; } }
private void Frm_LoaiThietBi_Load(object sender, EventArgs e) { Gpb_ThongTin.Enabled = false; DGV_LoaiThietBi.Focus(); DGV_LoaiThietBi.Select(); txt_TenLoaiTB.Select(); ShowTableData(); }