private void btnLuu_GiaoVien_Click(object sender, EventArgs e) { ENTITY.ChucVu cv = new ENTITY.ChucVu(txtMaChucVu.Text.Trim(), txtTenChucVu.Text.Trim()); DATA.ChucVu_Controler c = new DATA.ChucVu_Controler(); c.insertChucVu(cv); loadDataGirdView(); LockControl(); }
private void btnLuu_Click(object sender, EventArgs e) { ENTITY.ChucVu cv = new ENTITY.ChucVu(txtMaCV.Text.Trim(), txtTenCV.Text.Trim()); DAL.ChucVu_Controler c = new DAL.ChucVu_Controler(); if (kt == true) { c.insertChucVu(cv); } lockControl(); showLsvCV(); resetControl(); }
private void btnSua_Click(object sender, EventArgs e) { kt = false; openControl(); txtMaCV.Enabled = false; btnThem.Enabled = false; txtMaCV.Focus(); ENTITY.ChucVu cv = new ENTITY.ChucVu(txtMaCV.Text.Trim(), txtTenCV.Text.Trim()); DAL.ChucVu_Controler ecv = new DAL.ChucVu_Controler(); ecv.EditChucVu(cv); showLsvCV(); resetControl(); }