public ActionResult Update(int id) { ViewBag.AmIn = "user";//标识左边菜单是否展开 AdminUserBLL bll = new AdminUserBLL(); ViewBag.UserNameIDList = bll.GetAdminUserNameIDsByRoleType(RoleType.媒介); ViewBag.User = bll.Get(id); return View(); }
public ActionResult UserInfo() { AdminUser user = CheckLogin.Instance.GetUser(); if (user == null) { return RedirectToAction("Login", "Home"); } AdminUserBLL bll = new AdminUserBLL(); ViewBag.UserInfo = bll.Get(user.ID); return View(); }
public ActionResult UpdateDo(AdminUser User) { AdminUserBLL bll = new AdminUserBLL(); if (User.Password == null) { User.Password = bll.Get(User.ID).Password; } else { User.Password = Des.GetMD5String(User.Password); } bll.Update(User); return RedirectToAction("UserList", "AdminUser"); }
public ActionResult SaveUser(int UserID, string Mobile, string BankName, string BankAccount) { AdminUserBLL bll = new AdminUserBLL(); AdminUser user = bll.Get(UserID); user.Mobile = Mobile; user.BankName = BankName; user.BankAccount = BankAccount; bll.Update(user); return RedirectToAction("UserInfo", "AdminUser"); }