示例#1
0
    public void UpdateUser(CodeFactoryUser user)
    {
        MembershipUser item = Membership.GetUser(user.UserName);
        item.Comment = user.Comment;
        item.Email = user.Email;

        Membership.UpdateUser(item);
        if (!user.IsLockedOut)
            item.UnlockUser();
    }
示例#2
0
 public void InsertUser(CodeFactoryUser user)
 {
     try
     {
         MembershipUser item = Membership.CreateUser(user.UserName, user.Password);
         item.Email = user.Email;
         item.Comment = user.Comment;
         Membership.UpdateUser(item);
     }
     catch (MembershipCreateUserException ex)
     {
         UsersResult.Message = ex.Message;
     }
 }
示例#3
0
 public void DeleteUser(CodeFactoryUser user)
 {
     Membership.DeleteUser(user.UserName);
 }