Ejemplo n.º 1
0
 private void btnLuu_Click(object sender, EventArgs e)
 {
     clearList();
     ENTITY.NguoiDung nd = new ENTITY.NguoiDung();
     nd.MaNV    = txtMaNV.Text.Trim();
     nd.MatKhau = txtMatKhau.Text.Trim();
     nd.Them    = ckbThem.Checked ? true : false;
     nd.Sua     = ckbSua.Checked ? true : false;
     nd.Xoa     = ckbXoa.Checked ? true : false;
     nd.Ad      = ckbAd.Checked ? true : false;
     if (kt == true)
     {
         DAL.NguoiDung_Controller user = new DAL.NguoiDung_Controller();
         user.insertNGUOIDUNG(nd);
         showList();
     }
     else
     {
         DAL.NguoiDung_Controller user = new DAL.NguoiDung_Controller();
         user.updateNGUOIDUNG(nd);
         showList();
     }
     lockControl();
     reset();
 }