private FAdetailPageUIvalues GetFAdetailPageUiValues() { ServiceInputObject serviceInputsForDocType = new ServiceInputObject { baseURL = ConfigSettings.WebApiBaseAddress, controllerName = "CommonOperation", methodName = "FAdetailPageUIvalues" }; FAdetailPageUIvalues fAdetailPageUIvalues = new FAdetailPageUIvalues(); fAdetailPageUIvalues = ServiceMethods.GenerateGatRequest <FAdetailPageUIvalues>(serviceInputsForDocType); return(fAdetailPageUIvalues); }
public FAdetailPageUIvalues GetFAdetailPageUIvalues() { FAdetailPageUIvalues pageUIvalues = new FAdetailPageUIvalues(); IFAdesignationOperations faDesignationOperation = new FAdesignationOperations(); pageUIvalues.DesignationList = MapEntities.MapIEnumerableCollection <FAdesignation, FAdesignationEntities>(faDesignationOperation.GetFAdesignationList()).ToList(); IFAdocumentTypeOperations faDocumentTypeOperations = new FAdocumentTypeOperations(); pageUIvalues.DocumentTypeList = MapEntities.MapIEnumerableCollection <FAdocumentType, FAdocumentTypeEntities>(faDocumentTypeOperations.GetFAdocumentTypeList()).ToList(); //IDistrictInfoOperations districtInfoOperations = new DistrictInfoOperations(); //pageUIvalues.DistrictList = MapEntities.MapIEnumerableCollection<DistrictInfo, DistrictInfoEntities>(districtInfoOperations.GetAllDistricts()).ToList(); IFApaymentAgencyOperations paymentAgencyOperations = new FApaymentAgencyOperations(); pageUIvalues.PaymentAgencyList = MapEntities.MapIEnumerableCollection <FApaymentAgency, FApaymentAgencyEntities>(paymentAgencyOperations.GetAllPaymentAgency()).ToList(); IFAstatusOperations targetStatusOperations = new FAstatusOperations(); pageUIvalues.FAstatusList = MapEntities.MapIEnumerableCollection <FAStatu, FAstatusEntities>(targetStatusOperations.GetFAStatusList()).ToList(); IDealerDetailOperations dealerDetailOperations = new DealerDetailOperations(); pageUIvalues.DealerList = MapEntities.MapIEnumerableCollection <DealerDetail, DealerDetailEntities>(dealerDetailOperations.GetAllDealerList()).ToList(); ICropInfoOperations cropInfoOperations = new CropInfoOperations(); pageUIvalues.CropList = MapEntities.MapIEnumerableCollection <CropInfo, CropInfoEntities>(cropInfoOperations.GetAllCrops()).ToList(); //IPocketInfoOperations pocketInfoOperations = new PocketInfoOperations(); //pageUIvalues.PocketList = MapEntities.MapIEnumerableCollection<PocketInfo, PocketInfoEntities>(pocketInfoOperations.GetPocketList()).ToList(); IFaApprovedByOperations faApprovedBY = new FaApprovedByOperations(); pageUIvalues.approvedByList = MapEntities.MapIEnumerableCollection <FAapprovedBy, FAapprovedByEntities>(faApprovedBY.GetApprovedByList()).ToList(); IStateInfoOperations stateOperation = new StateInfoOperations(); pageUIvalues.stateList = MapEntities.MapList <StateInfo, StateInfoEntities>(stateOperation.GetAllStates()); return(pageUIvalues); }
private FAdetailPageUIvalues SetPocketDetailForModel(PocketInfoEntities pocketInfo, FAaddressDetailEntities faAddressDetailEntities, FAdetailPageUIvalues pageValues) { List <SubDistrictInfoEntities> subDistricts = new List <SubDistrictInfoEntities>(); List <VillageInfoEntities> villages = new List <VillageInfoEntities>(); foreach (var villageMapping in pocketInfo.PocketVillageMappingList) { subDistricts.AddRange(villageMapping.subDistricts); } subDistricts = subDistricts.Distinct(new DistinctItemComparer()).ToList(); List <PocketVillageMappingEntities> pocketVillageList = pocketInfo.PocketVillageMappingList.Select(x => x).Where(x => x.SubDistrictId == faAddressDetailEntities.SubDistrictId).ToList(); foreach (var villageItem in pocketVillageList) { villages.AddRange(villageItem.villages); } pageValues.subDistrictList = subDistricts; pageValues.VillageList = villages; pageValues.DistrictList = faAddressDetailEntities.DistrictList; pageValues.PocketList = faAddressDetailEntities.PocketList; return(pageValues); }