Beispiel #1
0
 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();
 }
Beispiel #2
0
        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);
            }
        }
Beispiel #3
0
 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();
 }
Beispiel #4
0
 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();
 }
Beispiel #5
0
 internal void DangNhapNguoiDung(BLL_DAL.QL_NguoiDung nd)
 {
     this.nd = nd;
 }
Beispiel #6
0
 partial void DeleteQL_NguoiDung(QL_NguoiDung instance);
Beispiel #7
0
 partial void UpdateQL_NguoiDung(QL_NguoiDung instance);
Beispiel #8
0
 partial void InsertQL_NguoiDung(QL_NguoiDung instance);