예제 #1
0
        public async Task <ActionResult> Index(SystemUserSM sm)
        {
            var Dtos = await userAccountRepo.GetUserList(sm);

            var Vms = Mapper.Map <List <AccountDetailDTO>, List <AccountDetailVM> >(Dtos);

            if (Request.IsAjaxRequest())
            {
                return(PartialView("_List", Vms));
            }
            ViewBag.RoleList = userRoleRepo.GetList();
            return(View(Vms));
        }
예제 #2
0
        private async Task InitSelect(int UserId = 0, int?CompanyTypeId = null, int?ParentCompanyId = null)
        {
            var List = await UserAccountRepo.GetUserList(new SystemUserSM());

            var UserList = List.Select(o => new { Key = o.UserId, Value = o.UserName + "(" + o.LoginEmail + "," + o.RoleName + ")" }).ToList();

            ViewBag.UserList = new SelectList(UserList, "Key", "Value", UserId);
            var CompanyTypeList = CompanyType.City.GetEnumList();

            ViewBag.CompanyTypeList = new SelectList(CompanyTypeList, "Key", "Value", CompanyTypeId);

            var ParentCompanyIdList = companyRepo.GetList(ViewHelp.GetRoleId(), CompanyType.City);

            ViewBag.ParentCompanyIdList = new SelectList(ParentCompanyIdList, "Key", "Value", ParentCompanyId);
        }