예제 #1
0
 public Boolean ChangeUser(User user)
 {
     InitDB();
     User newUser = new User();
     newUser.LoadByPrimaryKey((long)user.Id);
     newUser.Fullname = user.Fullname;
     newUser.Loginid = user.Loginid;
     newUser.Groupid = user.Groupid;
     newUser.Password = user.Password;
     Boolean functionResult = false;
     try
     {
         newUser.Save();
         functionResult = true;
     }
     catch (Exception ex)
     {
         functionResult = false;
     }
     return functionResult;
 }
예제 #2
0
 public Boolean RemoveUser(User userName)
 {
     InitDB();
     User deleteUser = new User();
     deleteUser.LoadByPrimaryKey((long)userName.Id);
     deleteUser.MarkAsDeleted();
     deleteUser.Save();
     return true;
 }