コード例 #1
0
 public ActionResult AddUpdateUser(ModelAddUpdateUser model)
 {
     if (_IUser.Admin_CheckUserExist(model.UserName, model.AdminUserId).Count > 0)
     {
         model.ErrorMessage = "Username already existed";
     }
     else
     {
         _IUser.Admin_UpdateUser(model.UserName, model.Password, CurrentUser.UserName, model.AdminUserId);
         Response.Redirect("/User/ManageUser");
     }
     return(View(model));
 }
コード例 #2
0
ファイル: UserController.cs プロジェクト: polani9885/Plan1
 public ActionResult AddUpdateUser(ModelAddUpdateUser model)
 {
     if (_IUser.Admin_CheckUserExist(model.UserName, model.AdminUserId).Count > 0)
     {
         model.ErrorMessage = "Username already existed";
     }
     else
     {
         _IUser.Admin_UpdateUser(model.UserName, model.Password, userEntity.UserName, model.AdminUserId);
         return(RedirectToAction("ManageUser"));
     }
     return(View(model));
 }
コード例 #3
0
        public ActionResult AddUpdateUser(int adminUserId)
        {
            ModelAddUpdateUser model = new ModelAddUpdateUser();

            if (adminUserId > 0)
            {
                Admin_GetUser _adminUser = _IUser.Admin_GetUserOnId(adminUserId);
                model.AdminUserId = _adminUser.AdminUserId;
                model.UserName    = _adminUser.UserName;
                model.Password    = _adminUser.Password;
            }


            return(View(model));
        }