// add new employee private void btnAdd_Click(object sender, EventArgs e) { nhanVien nv = new nhanVien() { Ho_ten = txtNameE.Text, Diachi = txtAddr.Text, Gioi_tinh = radFemale.Checked ? true : false, Chuc_vu = txtPosition.Text, Ngay_sinh = dtBirth.Value }; db.nhanViens.Add(nv); db.SaveChanges(); LoadData(); MessageBox.Show("thêm nhân viên thành công "); // after add successfullly, delete data in textbox txtNameE.Text = ""; txtAddr.Text = ""; txtPosition.Text = ""; dtBirth.Value = DateTime.Now; radFemale.Checked = false; radMale.Checked = true; }
private void Uc_DanhMuc_Load(object sender, EventArgs e) { nhanVien nv = db.nhanViens.Where(s => s.maNV == frmLogin.GetID.id).FirstOrDefault(); if (nv.maCV == "cv2") { pnlNhanVien.Visible = false; pnlKhachhang.Visible = false; pnlTaiKhoan.Visible = false; pnlNCC.Visible = true; pnlJob.Visible = false; } else if (nv.maCV == "cv3") { pnlNhanVien.Visible = false; pnlKhachhang.Visible = true; pnlTaiKhoan.Visible = false; pnlNCC.Visible = false; pnlJob.Visible = false; } pnlNhanVien.Controls.Clear(); Uc_Employees uc_Employees = new Uc_Employees(); pnlNhanVien.Controls.Add(uc_Employees); }
public void update(nhanVien n) { string sqlCommand = string.Format("update NHANVIEN set HoTen = N'{0}', NgaySinh = '{1}', SoDT = '{2}' where UserName = '******'", n.hoTen, n.ngaySinh, n.sdt, n.maNV); string sqlCommand1 = string.Format("update USERS set PassWord = '******' where UserName = '******'", n.passWord, n.maNV); Excute(sqlCommand); Excute(sqlCommand1); }
private void btnOTP_Click(object sender, EventArgs e) { OTP = ""; nhanVien nv = dt.nhanViens.Where(s => s.tendn.Equals(txtUsername.Text) && s.email.Equals(txtEmail.Text)) .FirstOrDefault(); if (nv != null) { GetOTP(); //string bodyemail = "Xin Chào " + nv.tenNV + " Chúng Tôi Đã Nhận Được Yêu Cầu Cần Hổ Trợ Của Bạn: \n\n" // + "\tChúng Tôi Sẽ Hướng Dẫn Bạn Cách Đổi Mật Khẩu\n" // + "Bước 1: Tại Phần Đổi Mật Khẩu, Bạn Nhập Tên Tài Khoản Của Bạn\n" // + "Bước 2: Tiếp Theo Bạn Cần Nhập Mã Xác Minh \n" // + "\t\t=> Mã Xác Minh Của Bạn Là: " + OTP // + "\nBước 3: Nhập Mật Khẩu Mới Của Bạn, Xong Bạn Click Vào Đổi Mật Khẩu"; //try //{ // MailMessage mail = new MailMessage(); // mail.From = new MailAddress("*****@*****.**"); // mail.To.Add(nv.email); // mail.Subject = "Gear Haris - The best choice for gamer"; // mail.Body = OTP; // SmtpClient smptClient = new SmtpClient(); // smptClient.Host = "smtp.gmail.com"; // NetworkCredential credential = new NetworkCredential(); // credential.UserName = "******"; // credential.Password = "******"; // smptClient.Credentials = credential; // smptClient.Port = 587; // smptClient.EnableSsl = true; // smptClient.Send(mail); // MessageBox.Show("Đã gửi mã xác minh về Email Mời Kiểm Tra Để Đổi Mật Khẩu", "Thông báo", MessageBoxButtons.OK); //} //catch (Exception ex) //{ // MessageBox.Show(ex.Message); //} SendMail(nv.tenNV, nv.email); counter = 60; timer1.Start(); llbTime.Enabled = true; } else { MessageBox.Show("Email or Account wrong !! \n\t Try Again"); txtEmail.Focus(); } //GetOTP(); //MessageBox.Show(OTP); }
private void btnSave_Click(object sender, EventArgs e) { pass = ""; SetPass(); nhanVien nv = db.nhanViens.Where(s => s.maNV.Equals(txtMaNV.Text)).FirstOrDefault(); nhanVien nv2 = db.nhanViens.Where(s => s.tendn.Equals(txtTenDN.Text)).FirstOrDefault(); switch (choose) { case 1: { if (txtTenDN.Text.Equals(null)) { MessageBox.Show("Chưa điền tên đăng nhập"); } else { if (nv2 == null) { SendMail(nv.tenNV, nv.email); db.ACC_Add(txtMaNV.Text, txtTenDN.Text, MaHoaMD5(pass)); Uc_TaiKhoan_Load(sender, e); } } break; } case 2: { db.ACC_Del(txtMaNV.Text); Uc_TaiKhoan_Load(sender, e); break; } case 3: { SendMail(nv.tenNV, nv.email); db.ACC_Up(txtMaNV.Text, MaHoaMD5(pass)); Uc_TaiKhoan_Load(sender, e); break; } case 4: { if (rdbMaNV.Checked == true) { dgvTaiKhoan.DataSource = db.ACC_FindID(txtMaNV.Text); } else if (rdbTenDN.Checked == true) { dgvTaiKhoan.DataSource = db.ACC_FindTenDN(txtTenDN.Text); } break; } } }
public bool sua(nhanVien n) { if (string.IsNullOrEmpty(n.maNV)) { return(false); } nv.update(n); return(true); }
private void btnDelete_Click(object sender, EventArgs e) { int id = Convert.ToInt32(txtMaSo.Text); nhanVien nv = db.nhanViens.Where(p => p.Ma_nv == id).SingleOrDefault(); db.nhanViens.Remove(nv); db.SaveChanges(); LoadData(); }
//Kiểm tra mã nhân viên có tồn tại public bool checkIDExist(string id) { nhanVien emp = db.nhanViens.Where(x => x.maNV == id).FirstOrDefault(); if (emp != null) { return(true); } return(false); }
public bool insert(nhanVien n) { if (dataTable("select * from NHANVIEN where UserName ='******'").Rows.Count > 0) { return(false); } string sqlCommand = string.Format("insert into NHANVIEN values ('{0}',N'{1}','{2}','{3}')", n.maNV, n.hoTen, n.ngaySinh, n.sdt); Excute(sqlCommand); return(true); }
public bool insertUser(nhanVien n) { if (dataTable("select * from USERS where UserName ='******'").Rows.Count == 1) { return(false); } string sqlCommand = string.Format("insert into USERS values ('{0}','{1}')", n.maNV, n.passWord); Excute(sqlCommand); return(true); }
//Xóa nhân viên khỏi database public bool deleteEmployee(string id) { nhanVien emp = db.nhanViens.Where(x => x.maNV == id).FirstOrDefault(); if (emp != null) { db.nhanViens.DeleteOnSubmit(emp); db.SubmitChanges(); //cập nhật việc xóa vào CSDL return(true); //xóa thành công } return(false); }
//Sửa thông tin nhân viên public void updateEmployee(eEmployee emp) { nhanVien emptemp = db.nhanViens.Where(x => x.maNV.Equals(emp.EmployeeID)).FirstOrDefault(); // Cập nhật dữ liệu emptemp.maNV = emp.EmployeeID; emptemp.tenNV = emp.EmployeeName; emptemp.diaChi = emp.Address; emptemp.dienThoai = emp.Phone; emptemp.maLoaiNV = getIDType(emp.EmployeeType); // Lưu mã của loại nhân viên db.SubmitChanges(); }
private void btnChange_Click(object sender, EventArgs e) { int id = Convert.ToInt32(dataGridView1.SelectedCells[0].OwningRow.Cells["Ma_nv"].Value.ToString()); nhanVien nv = db.nhanViens.Find(id); nv.Ho_ten = txtNameE.Text; nv.Diachi = txtPosition.Text; nv.Chuc_vu = txtPosition.Text; nv.Gioi_tinh = radMale.Checked ? true : false; nv.Ngay_sinh = dtBirth.Value; db.SaveChanges(); LoadData(); }
public eEmployee getEmployeeFromID(string id) { nhanVien m = db.nhanViens.Where(x => x.maNV == id).FirstOrDefault(); eEmployee e = new eEmployee(); e.EmployeeID = m.maNV; e.EmployeeName = m.tenNV; e.Address = m.diaChi; e.Phone = m.dienThoai; return(e); }
private void btLogin_Click(object sender, EventArgs e) { var nvad = from u in dt.nhanViens select u; var cv = from u in dt.congViecs select u; if (cv.Count() == 0) { dt.CV_Ins("cv1", "Manager", 15); dt.CV_Ins("cv2", "Seller", 7); dt.CV_Ins("cv3", "Ware house manager", 10); dt.CV_Ins("cv4", "Boss", 20); } if (nvad.Count() == 0) { // db.NV_Ins("NV000001", txtName.Text, gt, dtpBirthday.Value, dtpNVL.Value, txtEmail.Text, txtAddress.Text, txtPhone.Text); dt.NV_Ins("NV000001", "Admin", "Male", DateTime.Now, DateTime.Now, "*****@*****.**", "", ""); dt.ACC_Add("NV000001", "AdMin", MaHoaMD5("123")); dt.PV_Ins_Up("NV000001", "cv4"); } nhanVien nv = dt.nhanViens.Where(s => s.passWords.Equals(MaHoaMD5(txtPassword.Text)) && s.tendn.Equals(txtAcount.Text)) // && s.trangThai != "Fired") .FirstOrDefault(); if (nv != null) { if (nv.trangThai == "Fired") { MessageBox.Show("Your account was block"); } else { if (nv.maCV == "" || nv.maCV == null) { MessageBox.Show("You don't have any permission"); } else { GetID.id = nv.maNV; frmFuction fuction = new frmFuction(); //FrmSale fuction = new FrmSale(); this.Hide(); fuction.ShowDialog(); } } } else { MessageBox.Show("Username or password is wrong"); } }
private void Ok() { try { nhanVien n = new nhanVien(); if (nv.timkiem("UserName", UserName.Text).Rows.Count > 0) { UserName.SelectAll(); PassWord.Text = ""; Retype.Text = ""; UserName.Focus(); MessageBox.Show("User already exists"); } else { if (PassWord.Text == Retype.Text) { n.maNV = UserName.Text; n.hoTen = fullName.Text; n.ngaySinh = BirthDay.Value.ToShortDateString(); n.sdt = PhoneNumber.Text; n.passWord = PassWord.Text; if (n.isNull()) { toolTip1.ToolTipTitle = "Warning"; toolTip1.Show("Enter full infomation", Retype, Retype.Location, 5000); } else if (nv.them(n)) { if (nv.themUser(n)) { MessageBox.Show("Done"); this.Close(); } } } else { toolTip1.ToolTipTitle = "Warning"; toolTip1.Show("Retype password again!", Retype, new Point(400, 250), 5000); Retype.SelectAll(); Retype.Focus(); } } } catch { MessageBox.Show("Failed", "Oops", MessageBoxButtons.OK); } }
private void dgvBillBuy_CellContentClick(object sender, DataGridViewCellEventArgs e) { btnPrintBill.Visible = true; btnMail.Visible = true; if (e.RowIndex >= 0) { GetData.idBill = dgvBillBuy.Rows[e.RowIndex].Cells[0].Value.ToString(); GetData.trThai = dgvBillBuy.Rows[e.RowIndex].Cells[3].Value.ToString(); if (dgvBillBuy.Columns[e.ColumnIndex].Name.Equals("Column5")) { frmDetail_Import_Bill frmDetail_Import_Bill = new frmDetail_Import_Bill(); Uc_SanPham.GetData.idBill = idSp; frmDetail_Import_Bill.ShowDialog(); Uc_SanPham.GetData.idBill = ""; Uc_Bill_Buy_Load(sender, e); } else if (dgvBillBuy.Columns[e.ColumnIndex].Name.Equals("Column6")) { if (GetData.trThai == "Paid") { nhanVien nv = db.nhanViens.Where(s => s.maNV.Equals(frmLogin.GetID.id) && s.maCV == "cv4").FirstOrDefault(); if (nv == null) { //btnSave.Visible = false; //MessageBox.Show("You do not have permission to cancel the bill was paid"); //MessageBox.Show("This bill cannot be cancel.\nBecause it was cancel already or was paid"); //rtxtNote.Visible = false; //lbNote.Visible = false; } else { //rtxtNote.Visible = true; //lbNote.Visible = true; //btnSave.Visible = true; } } else { MessageBox.Show("This bill don't need to cancel"); //rtxtNote.Visible = true; //lbNote.Visible = true; //btnSave.Visible = true; } } } }
private void btnSet_Click(object sender, EventArgs e) { nhanVien nv = db.nhanViens.Where(s => s.maNV.Equals(frmLogin.GetID.id)).FirstOrDefault(); //if (nv.maCV == "cv4") //{ db.PV_Ins_Up(txtID.Text, cbbJob.SelectedValue.ToString()); //} //else if (nv.maCV != "cv4") //{ // if(cbbJob.SelectedItem.ToString()== "Boss") // { // MessageBox.Show("You don't have permission to set this job"); // } // cbbJob.SelectedIndex = 0; //} UC_new_PhanViec_Load(sender, e); }
private void cbbJob_SelectedIndexChanged(object sender, EventArgs e) { nhanVien nv = db.nhanViens.Where(s => s.maNV.Equals(frmLogin.GetID.id)).FirstOrDefault(); //MessageBox.Show(.ToString()); //if (nv.maCV == "cv4") //{ // db.PV_Ins_Up(txtID.Text, cbbJob.SelectedValue.ToString()); //} //else if (nv.maCV != "cv4") { if (cbbJob.SelectedIndex == 3) { MessageBox.Show("You don't have permission to set this job"); cbbJob.SelectedIndex = 0; } } }
//Nhập nhân viên mới vào database public int insertEmployee(eEmployee emp) { if (checkIDExist(emp.EmployeeID)) { return(0); } nhanVien emptemp = new nhanVien(); emptemp.maNV = emp.EmployeeID; emptemp.tenNV = emp.EmployeeName; emptemp.diaChi = emp.Address; emptemp.dienThoai = emp.Phone; emptemp.maLoaiNV = getIDType(emp.EmployeeType); // Lưu mã của loại nhân viên db.nhanViens.InsertOnSubmit(emptemp); db.SubmitChanges(); return(1); }
private void dgvEmployees_CellClick(object sender, DataGridViewCellEventArgs e) { i = e.RowIndex; if (i < 0) { return; } else { txtID.Text = dgvEmployees.Rows[i].Cells[0].Value.ToString(); txtName.Text = dgvEmployees.Rows[i].Cells[1].Value.ToString(); if (dgvEmployees.Rows[i].Cells[2].Value.ToString().Equals("Male")) { rdbMale.Checked = true; } else { rdbFemale.Checked = true; } dtpBirthday.Value = (DateTime)dgvEmployees.Rows[i].Cells[3].Value; dtpNVL.Value = (DateTime)dgvEmployees.Rows[i].Cells[4].Value; txtEmail.Text = dgvEmployees.Rows[i].Cells[5].Value.ToString(); txtPhone.Text = dgvEmployees.Rows[i].Cells[6].Value.ToString(); txtAddress.Text = dgvEmployees.Rows[i].Cells[7].Value.ToString(); nhanVien nv = db.nhanViens.Where(s => s.maNV.Equals(txtID.Text)).FirstOrDefault(); nhanVien nv2 = db.nhanViens.Where(s => s.maNV.Equals(frmLogin.GetID.id)).FirstOrDefault(); if (nv2.maCV == "cv4") { return; } if (nv.maCV == "cv4") { btnDel.Visible = false; btnUp.Visible = false; } else if (nv.maCV != "cv4") { btnDel.Visible = true; btnUp.Visible = true; } } }
private void dgvTaiKhoan_CellClick(object sender, DataGridViewCellEventArgs e) { i = e.RowIndex; if (i >= 0) { txtMaNV.Text = dgvTaiKhoan.Rows[i].Cells[0].Value.ToString(); if (dgvTaiKhoan.Rows[i].Cells[3].Value == null) { txtTenDN.Text = ""; } else { txtTenDN.Text = dgvTaiKhoan.Rows[i].Cells[3].Value.ToString(); } nhanVien nv = db.nhanViens.Where(s => s.maNV.Equals(txtMaNV.Text)).FirstOrDefault(); nhanVien nv2 = db.nhanViens.Where(s => s.maNV.Equals(frmLogin.GetID.id)).FirstOrDefault(); if (nv2.maCV == "cv4") { if (nv.tendn == "AdMin") { if (nv.tendn == "AdMin") { btnDrop.Visible = false; btnSetPass.Visible = false; } } } if (nv.maCV == "cv4") { btnDrop.Visible = false; btnSetPass.Visible = false; } else if (nv.maCV != "cv4") { btnDrop.Visible = true; btnSetPass.Visible = true; } } }
private void frmFuction_Load(object sender, EventArgs e) { nhanVien nv = db.nhanViens.Where(s => s.maNV == frmLogin.GetID.id).FirstOrDefault(); lbName.Text = nv.tenNV.ToString(); if (nv.maCV == "cv3") { btnSaleProduct.Visible = false; btnStatistical.Visible = false; } else if (nv.maCV == "cv2") { btnProduct.Visible = false; btnStatistical.Visible = false; } else { btnStatistical.Visible = true; btnSaleProduct.Visible = true; btnProduct.Visible = true; } }
private void Uc_Bill_Buy_Load(object sender, EventArgs e) { nhanVien nv = db.nhanViens.Where(s => s.maNV.Equals(frmLogin.GetID.id) && s.maCV == "cv4").FirstOrDefault(); if (nv == null) { btnSave.Visible = false; rtxtNote.Enabled = false; } else { rtxtNote.Enabled = true; btnSave.Visible = true; } //dtpFrom.Value = from; //dtpTo.Value = to; from = dtpFrom.Value; to = dtpTo.Value; //var locHD = db.hoadDonNhaps.Where(s => s.ngayNhap >= from && s.ngayNhap <= to); dgvBillBuy.AutoGenerateColumns = false; dgvBillBuy.DataSource = db.HDN_Sel_Date(from, to); dgvBillBuy.Columns[2].DefaultCellStyle.Format = "N0"; }
public bool themUser(nhanVien n) { return(nv.insertUser(n)); }
public void xoa(nhanVien n) { nv.delete(n.maNV); }
private void btnLuu_Click(object sender, EventArgs e) { switch (function) { case 1: { if (txtAddress.Text == "" || txtEmail.Text == "" || txtName.Text == "" || txtPhone.Text == "") { MessageBox.Show("Bạn chưa điền hết thông tin"); } else { gt = ""; if (rdbMale.Checked == true) { gt = "Nam"; } else { gt = "Nữ"; } int ma = 1; string id = "NV"; var nv = from u in db.nhanViens select u; if (nv.Count() == 0) { id = id + ma; db.NV_Ins(id, txtName.Text, gt, dtpBirthday.Value, dtpNVL.Value, txtEmail.Text, txtAddress.Text, txtPhone.Text); } else if (nv.Count() > 0) { var nv2 = db.NV_Sel().OrderByDescending(s => s.maNV).FirstOrDefault(); ma = Convert.ToInt32(nv2.maNV.ToString().Trim().Substring(2)) + 1; id = "NV" + ma; db.NV_Ins(id, txtName.Text, gt, dtpBirthday.Value, dtpNVL.Value, txtEmail.Text, txtAddress.Text, txtPhone.Text); } Uc_Employees_Load(sender, e); } break; } case 2: { db.NV_Del(txtID.Text); Uc_Employees_Load(sender, e); break; } case 3: { nhanVien nv = db.nhanViens.Where(s => s.maNV == txtID.Text).FirstOrDefault(); if (nv == null) { return; } else { if (rdbMale.Checked == true) { gt = "Nam"; } else { gt = "Nữ"; } db.NV_Up(txtID.Text, txtName.Text, gt, dtpBirthday.Value, dtpNVL.Value, txtEmail.Text, txtAddress.Text, txtPhone.Text); Uc_Employees_Load(sender, e); } break; } case 4: { string gt = ""; if (chbName.Checked == true && chbNS.Checked == true && chbNVL.Checked == true && chbSex.Checked == true) { if (rdbMale.Checked) { gt = "Nam"; } else { gt = "Nữ"; } var nv = from u in db.nhanViens where u.tenNV == txtName.Text && u.ngSinh == dtpBirthday.Value && u.ngVaoLam == dtpNVL.Value && u.gioiTinh == gt select u; dgvEmployees.DataSource = nv; } else if (chbName.Checked == true && chbNS.Checked == true && chbNVL.Checked == true) { if (rdbMale.Checked) { gt = "Nam"; } else { gt = "Nữ"; } var nv = from u in db.nhanViens where u.tenNV == txtName.Text && u.ngSinh == dtpBirthday.Value && u.ngVaoLam == dtpNVL.Value select u; dgvEmployees.DataSource = nv; } else if (chbName.Checked == true && chbNS.Checked == true && chbSex.Checked == true) { if (rdbMale.Checked) { gt = "Nam"; } else { gt = "Nữ"; } var nv = from u in db.nhanViens where u.tenNV == txtName.Text && u.ngSinh == dtpBirthday.Value && u.gioiTinh == gt select u; dgvEmployees.DataSource = nv; } else if (chbName.Checked == true && chbNVL.Checked == true && chbSex.Checked == true) { if (rdbMale.Checked) { gt = "Nam"; } else { gt = "Nữ"; } var nv = from u in db.nhanViens where u.tenNV == txtName.Text && u.ngVaoLam == dtpNVL.Value && u.gioiTinh == gt select u; dgvEmployees.DataSource = nv; } else if (chbNS.Checked == true && chbNVL.Checked == true && chbSex.Checked == true) { if (rdbMale.Checked) { gt = "Nam"; } else { gt = "Nữ"; } var nv = from u in db.nhanViens where u.ngSinh == dtpBirthday.Value && u.ngVaoLam == dtpNVL.Value && u.gioiTinh == gt select u; dgvEmployees.DataSource = nv; } else if (chbName.Checked == true && chbNS.Checked == true) { if (rdbMale.Checked) { gt = "Nam"; } else { gt = "Nữ"; } var nv = from u in db.nhanViens where u.tenNV == txtName.Text && u.ngSinh == dtpBirthday.Value select u; dgvEmployees.DataSource = nv; } else if (chbName.Checked == true && chbNVL.Checked == true) { if (rdbMale.Checked) { gt = "Nam"; } else { gt = "Nữ"; } var nv = from u in db.nhanViens where u.tenNV == txtName.Text && u.ngVaoLam == dtpNVL.Value select u; dgvEmployees.DataSource = nv; } else if (chbName.Checked == true && chbSex.Checked == true) { if (rdbMale.Checked) { gt = "Nam"; } else { gt = "Nữ"; } var nv = from u in db.nhanViens where u.tenNV == txtName.Text && u.gioiTinh == gt select u; dgvEmployees.DataSource = nv; } else if (chbNS.Checked == true && chbNVL.Checked == true) { if (rdbMale.Checked) { gt = "Nam"; } else { gt = "Nữ"; } var nv = from u in db.nhanViens where u.ngSinh == dtpBirthday.Value && u.ngVaoLam == dtpNVL.Value select u; dgvEmployees.DataSource = nv; } else if (chbNS.Checked == true && chbSex.Checked == true) { if (rdbMale.Checked) { gt = "Nam"; } else { gt = "Nữ"; } var nv = from u in db.nhanViens where u.ngSinh == dtpBirthday.Value && u.gioiTinh == gt select u; dgvEmployees.DataSource = nv; } else if (chbNVL.Checked == true && chbSex.Checked == true) { if (rdbMale.Checked) { gt = "Nam"; } else { gt = "Nữ"; } var nv = from u in db.nhanViens where u.ngVaoLam == dtpNVL.Value && u.gioiTinh == gt select u; dgvEmployees.DataSource = nv; } else if (chbName.Checked == true) { if (rdbMale.Checked) { gt = "Nam"; } else { gt = "Nữ"; } var nv = from u in db.nhanViens where u.tenNV == txtName.Text select u; dgvEmployees.DataSource = nv; } else if (chbNS.Checked == true) { if (rdbMale.Checked) { gt = "Nam"; } else { gt = "Nữ"; } var nv = from u in db.nhanViens where u.ngSinh == dtpBirthday.Value select u; dgvEmployees.DataSource = nv; } if (chbNVL.Checked == true) { if (rdbMale.Checked) { gt = "Nam"; } else { gt = "Nữ"; } var nv = from u in db.nhanViens where u.ngVaoLam == dtpNVL.Value select u; dgvEmployees.DataSource = nv; } if (chbSex.Checked == true) { if (rdbMale.Checked) { gt = "Nam"; } else { gt = "Nữ"; } var nv = from u in db.nhanViens where u.gioiTinh == gt select u; dgvEmployees.DataSource = nv; } break; } } }
public bool them(nhanVien n) { return(nv.insert(n)); }