Exemplo n.º 1
0
        public void ThemTK(string MNV, string TDN, string MK, string TT)
        {
            QLKhachSanEntities chung = new QLKhachSanEntities();
            TAIKHOAN           td    = new TAIKHOAN();

            td.MANV      = MNV;
            td.TENDN     = TDN;
            td.MATKHAU   = MK;
            td.TRANGTHAI = TT;
            chung.TAIKHOAN.Add(td);
            chung.SaveChanges();
        }
Exemplo n.º 2
0
 public bool themTaiKhoan(TAIKHOAN taiKhoan)
 {
     try
     {
         ketNoi.TAIKHOANs.InsertOnSubmit(taiKhoan);
         ketNoi.SubmitChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Exemplo n.º 3
0
 public bool KhoaTaiKhoan(string pMaNV)
 {
     try
     {
         TAIKHOAN tAIKHOAN = linq.TAIKHOANs.Where(t => t.MANV == pMaNV).FirstOrDefault();
         tAIKHOAN.HOATDONG = false;
         linq.SubmitChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Exemplo n.º 4
0
 public bool capTaiKhoan(TAIKHOAN taiKhoan)
 {
     try
     {
         var ketQua = from taiKhoanTam in ketNoi.TAIKHOANs
                      where taiKhoanTam.TENTAIKHOAN == taiKhoan.TENTAIKHOAN
                      select taiKhoanTam;
         foreach (var tam in ketQua)
         {
             tam.MATKHAU = taiKhoan.MATKHAU;
         }
         ketNoi.SubmitChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
 partial void DeleteTAIKHOAN(TAIKHOAN instance);
 partial void UpdateTAIKHOAN(TAIKHOAN instance);
 partial void InsertTAIKHOAN(TAIKHOAN instance);