示例#1
0
        public async Task <List <LookupModel> > GetAllBranchesByAgencyCode(string agency)
        {
            string agencyCode = string.Empty;

            if (!User.IsInRole(RoleNames.CustomerService) && !User.IsInRole(RoleNames.MonafasatAccountManager) && !User.IsInRole(RoleNames.FinancialSupervisor))
            {
                agencyCode = !string.IsNullOrEmpty(agency) ? agency : User.UserAgency();
            }
            else
            {
                agencyCode = agency;
            }
            List <LookupModel> branches = await _branchAppService.GetAllBranchesByAgencyCode(agencyCode);

            return(branches);
        }