public async Task <GetCancellationPolicyForEditOutput> GetCancellationPolicyForEdit(EntityDto input) { CancellationPolicy cancellationPolicy = await _cancellationPolicyRepository.FirstOrDefaultAsync(input.Id); GetCancellationPolicyForEditOutput output = new GetCancellationPolicyForEditOutput { CancellationPolicy = ObjectMapper.Map <CreateOrEditCancellationPolicyDto>(cancellationPolicy) }; if (output.CancellationPolicy.CruiseServicesId != null) { CruiseService _lookupCruiseServices = await _lookup_cruiseServicesRepository.FirstOrDefaultAsync((int)output.CancellationPolicy.CruiseServicesId); output.CruiseServicesServiceName = _lookupCruiseServices.ServiceName.ToString(); } if (output.CancellationPolicy.CancellationPreText != null) { MasterAmenities _lookupMasterAmenities = await _lookup_MasterAmenitiesRepository.FirstOrDefaultAsync((int)output.CancellationPolicy.CancellationPreText); output.CruiseMasterAmenitiesDisplayName = _lookupMasterAmenities.DisplayName.ToString(); } if (output.CancellationPolicy.CancellationPostText != null) { MasterAmenities _lookupMasterAmenities = await _lookup_MasterAmenitiesRepository.FirstOrDefaultAsync((int)output.CancellationPolicy.CancellationPostText); output.CruiseMasterAmenitiesDisplayName2 = _lookupMasterAmenities.DisplayName.ToString(); } return(output); }
public async Task <GetCruiseServiceGroupsForViewDto> GetCruiseServiceGroupsForView(int id) { CruiseServiceGroup cruiseServiceGroups = await _cruiseServiceGroupsRepository.GetAsync(id); GetCruiseServiceGroupsForViewDto output = new GetCruiseServiceGroupsForViewDto { CruiseServiceGroups = ObjectMapper.Map <CruiseServiceGroupsDto>(cruiseServiceGroups) }; if (output.CruiseServiceGroups.ServiceGroupName != null) { MasterAmenities _lookupCruiseMasterAmenities = await _lookup_cruiseMasterAmenitiesRepository.FirstOrDefaultAsync((int)output.CruiseServiceGroups.ServiceGroupName); output.CruiseMasterAmenitiesDisplayName = _lookupCruiseMasterAmenities.DisplayName.ToString(); } return(output); }
public async Task <GetBedOptionsForEditOutput> GetBedOptionsForEdit(EntityDto input) { BedOption bedOptions = await _bedOptionsRepository.FirstOrDefaultAsync(input.Id); GetBedOptionsForEditOutput output = new GetBedOptionsForEditOutput { BedOptions = ObjectMapper.Map <CreateOrEditBedOptionsDto>(bedOptions) }; if (output.BedOptions.BedOptionName != null) { MasterAmenities _lookupCruiseMasterAmenities = await _lookup_cruiseMasterAmenitiesRepository.FirstOrDefaultAsync((int)output.BedOptions.BedOptionName); output.CruiseMasterAmenitiesDisplayName = _lookupCruiseMasterAmenities.DisplayName.ToString(); } return(output); }
public async Task <GetBedOptionsForViewDto> GetBedOptionsForView(int id) { BedOption bedOptions = await _bedOptionsRepository.GetAsync(id); GetBedOptionsForViewDto output = new GetBedOptionsForViewDto { BedOptions = ObjectMapper.Map <BedOptionsDto>(bedOptions) }; if (output.BedOptions.BedOptionName != null) { MasterAmenities _lookupCruiseMasterAmenities = await _lookup_cruiseMasterAmenitiesRepository.FirstOrDefaultAsync((int)output.BedOptions.BedOptionName); output.CruiseMasterAmenitiesDisplayName = _lookupCruiseMasterAmenities.DisplayName.ToString(); } return(output); }
public async Task <GetCruiseServiceGroupsForEditOutput> GetCruiseServiceGroupsForEdit(EntityDto input) { _unitOfWorkManager.Current.DisableFilter(AbpDataFilters.MayHaveTenant); CruiseServiceGroup cruiseServiceGroups = await _cruiseServiceGroupsRepository.FirstOrDefaultAsync(input.Id); GetCruiseServiceGroupsForEditOutput output = new GetCruiseServiceGroupsForEditOutput { CruiseServiceGroups = ObjectMapper.Map <CreateOrEditCruiseServiceGroupsDto>(cruiseServiceGroups) }; if (output.CruiseServiceGroups.ServiceGroupName != null) { MasterAmenities _lookupCruiseMasterAmenities = await _lookup_cruiseMasterAmenitiesRepository.FirstOrDefaultAsync((int)output.CruiseServiceGroups.ServiceGroupName); output.CruiseMasterAmenitiesDisplayName = _lookupCruiseMasterAmenities.DisplayName.ToString(); } return(output); }