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();
 }
 /// <summary>
 /// 查询产品类别分页
 /// </summary>
 /// <param name="entity"></param>
 /// <param name="pageInfo"></param>
 /// <returns></returns>
 public List<ProductCategoryEntity> GetList(ProductCategoryEntity entity, ref PageInfo pageInfo)
 {
     entity.IncludeAll();
     entity.Where(a => a.IsDelete == (int)EIsDelete.NotDelete);
     entity.OrderBy(a => a.ID, EOrderBy.DESC);
     int rowCount = 0;
     List<ProductCategoryEntity> list = this.ProductCategory.GetList(entity, pageInfo.PageSize, pageInfo.PageIndex, out rowCount);
     pageInfo.RowCount = rowCount;
     if (!list.IsNullOrEmpty())
     {
         AdminProvider adminProvider = new AdminProvider();
         foreach (ProductCategoryEntity item in list)
         {
             if (!item.CreateUser.IsEmpty())
             {
                 AdminEntity admin = adminProvider.GetAdmin(item.CreateUser);
                 item.CreateUser = admin.IsNotNull() ? admin.UserName : item.CreateUser;
             }
         }
     }
     return list;
 }
 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();
     }
 }