public void xoaNhanVien(string ma) { QL_NguoiDung nd = ch.QL_NguoiDungs.Where(t => t.MaND == ma).FirstOrDefault(); if (nd != null) { ch.QL_NguoiDungs.DeleteOnSubmit(nd); } ch.SubmitChanges(); }
public int ktTaiKhoan(string user, string password) { QL_NguoiDung nd = ql.QL_NguoiDungs.SingleOrDefault(t => t.MaND == user); if (nd != null) { if (nd.Password.Trim() == password.Trim()) { return(1); } return(0); } else { return(-1); } }
public void themNhanVien(string ma, string tennguoidung, string sdt, string cmnd, string diachi, string email, DateTime ngaysinnh, DateTime ngayVL, string manhom, bool hoatdong, string matkhau) { QL_NguoiDung nd = new QL_NguoiDung(); nd.MaND = ma; nd.TenNguoiDung = tennguoidung; nd.SoDienThoai = sdt; nd.CMND = cmnd; nd.DiaChi = diachi; nd.Email = email; nd.NgaySinh = Convert.ToDateTime(ngaysinnh); nd.NgayVL = Convert.ToDateTime(ngayVL); nd.MaNhom = manhom; //nd.HoatDong = Convert.ToBoolean(hoatdong); nd.Password = matkhau; ch.QL_NguoiDungs.InsertOnSubmit(nd); ch.SubmitChanges(); }
public void suaNhanVien(string ma, string tennguoidung, string sdt, string cmnd, string diachi, string email, DateTime ngaysinnh, DateTime ngayVL, string manhom, bool hoatdong, string matkhau) { QL_NguoiDung nd = ch.QL_NguoiDungs.Where(t => t.MaND == ma).FirstOrDefault(); if (nd != null) { nd.MaND = ma; nd.TenNguoiDung = tennguoidung; nd.SoDienThoai = sdt; nd.CMND = cmnd; nd.DiaChi = diachi; nd.Email = email; nd.NgaySinh = Convert.ToDateTime(ngaysinnh); nd.NgayVL = Convert.ToDateTime(ngayVL); nd.MaNhom = manhom; //nd.HoatDong = Convert.ToBoolean(hoatdong); nd.Password = matkhau; } ch.SubmitChanges(); }
internal void DangNhapNguoiDung(BLL_DAL.QL_NguoiDung nd) { this.nd = nd; }
partial void DeleteQL_NguoiDung(QL_NguoiDung instance);
partial void UpdateQL_NguoiDung(QL_NguoiDung instance);
partial void InsertQL_NguoiDung(QL_NguoiDung instance);