public bool ChangePassword(string username, string oldpassword, string newpassword)
 {
     tblUser tbluser = new tblUser();
     tbluser = GetUser(username, oldpassword);
     if (tbluser != null && tbluser.ID != null && !tbluser.ID.Equals(Guid.Empty))
     {
         var query = _dataContext.tblUsers.Where("ID.ToString()=@0", tbluser.ID.ToString());
         if (query != null && query.ToList().Count > 0)
         {
             query.First().Password = newpassword;
             _dataContext.SubmitChanges();
         }
         return true;
     }
     return false;
 }
 public bool InsertUser(tblUser tbluser)
 {
     return _da.InsertUser(tbluser);
 }
 public bool CreateUser(string userName, string password, string email,byte department)
 {
     tblUser user = new tblUser();
     user.ID = Guid.NewGuid();
     user.UserName = userName;
     user.Email = email;
     user.Department = department;
     //user.Email = email;
     user.Password = KeyGeneration.EncryptString(INPUT_TEXT, password);
     return _nguyenHiepService.InsertUser(user);
 }
 partial void DeletetblUser(tblUser instance);
 partial void UpdatetblUser(tblUser instance);
 partial void InserttblUser(tblUser instance);
 public bool InsertUser(tblUser tbluser)
 {
     if (tbluser != null && tbluser.ID != null && !tbluser.ID.Equals(Guid.Empty))
     {
         _dataContext.tblUsers.InsertOnSubmit(tbluser);
         _dataContext.SubmitChanges();
         return true;
     }
     return false;
 }