public ActionResult AccountSetting() { AdminProvider provider = new AdminProvider(); AdminEntity entity = provider.GetAdmin(this.LoginUser.UserCode); ViewBag.RoleList = BaseHelper.GetRoleList(this.LoginUser.RoleNum); ViewBag.DepartList = BaseHelper.GetDepartList(this.LoginUser.DepartNum); ViewBag.Admin = entity; return(View()); }
public ActionResult AddUser() { string userCode = WebUtil.GetQueryStringValue <string>("userCode"); if (userCode.IsEmpty()) { ViewBag.RoleList = BaseHelper.GetRoleList(string.Empty); ViewBag.DepartList = BaseHelper.GetDepartList(string.Empty); ViewBag.Admin = new AdminEntity(); return(View()); } else { AdminProvider provider = new AdminProvider(); AdminEntity entity = provider.GetAdmin(userCode); entity = entity == null ? new AdminEntity() : entity; ViewBag.RoleList = BaseHelper.GetRoleList(entity.RoleNum); ViewBag.DepartList = BaseHelper.GetDepartList(entity.DepartNum); entity.RoleName = this.LoginUser.RoleName; ViewBag.Admin = entity; return(View()); } }
public ActionResult UserList() { ViewBag.RoleList = BaseHelper.GetRoleList(string.Empty); ViewBag.DepartList = BaseHelper.GetDepartList(string.Empty); return(View()); }