예제 #1
0
        public async Task <IActionResult> List(Guid?appId, string sort, string appType)
        {
            if (appId == null)
            {
                return(await Task.Run(() => NotFound()));
            }

            var appAssigneeList = await _service.GetAssigneeList(appId);

            ViewBag.AppType   = appType;
            ViewBag.appId     = appId;
            ViewBag.appType   = appType;
            ViewBag.IsAddable = _entityStateHelper.ApplicationAddability(appId.Value).IsAssignee;
            foreach (var dto in appAssigneeList)
            {
                dto.IsEditable = _entityStateHelper.IsEditableAuth(dto.Id) ?? false;
            }
            if (sort == "AddBranchApplication")
            {
                appAssigneeList = appAssigneeList.OrderBy(x => x.IsFromLicense == true);
                return(PartialView("List_AddBranchApplication", appAssigneeList));
            }

            ViewBag.Sort = sort;


            return(PartialView(appAssigneeList));
        }