private void btnLuu_Click(object sender, EventArgs e) { if (_them) { EC_DV.MaDV = txtMa.Text; EC_DV.TenDV = txtTen.Text; EC_DV.Gia = txtGia.Text; _them = false; DAL_DV.ThemThongTin(EC_DV); MessageBox.Show("Thêm thành công"); dgvDanhSach.DataSource = DAL_DV.GetAll(); } else { EC_DV.MaDV = txtMa.Text; EC_DV.TenDV = txtTen.Text; EC_DV.Gia = txtGia.Text; DAL_DV.SuaThongTin(EC_DV); MessageBox.Show("Sửa thành công"); dgvDanhSach.DataSource = DAL_DV.GetAll(); } btnLuu.Enabled = false; txtGia.Enabled = false; txtMa.Enabled = false; txtTen.Enabled = false; dgvDanhSach.Enabled = true; }