private void FillArrivalAndDepartureTime(SuppData_PricingRoom SuppDataPricingRoom, SuppData_ShortInfo SuppDataInfo) { if (SuppDataPricingRoom.ArrivalDateTime.IsEmptyTime()) { if (SuppDataInfo.StandartCheckInTime.HasValue) { SuppDataPricingRoom.ArrivalDateTime = SuppDataPricingRoom.ArrivalDateTime.Date + SuppDataInfo.StandartCheckInTime.Value; } else if (SuppDataPricingRoom.SupplierId == Constants.SuppDataSuppliers.Ostrovok) { SuppDataInfo.StandartCheckInTime = ostrovokStandartCheckInTime; SuppDataPricingRoom.ArrivalDateTime = SuppDataPricingRoom.ArrivalDateTime.Date + ostrovokStandartCheckInTime; } } if (SuppDataPricingRoom.DepartureDateTime.IsEmptyTime()) { if (SuppDataInfo.StandartCheckOutTime.HasValue) { SuppDataPricingRoom.DepartureDateTime = SuppDataPricingRoom.DepartureDateTime.Date + SuppDataInfo.StandartCheckOutTime.Value; } else if (SuppDataPricingRoom.SupplierId == Constants.SuppDataSuppliers.Ostrovok) { SuppDataInfo.StandartCheckOutTime = ostrovokStandartCheckOutTime; SuppDataPricingRoom.DepartureDateTime = SuppDataPricingRoom.DepartureDateTime.Date + ostrovokStandartCheckOutTime; } } }
public void SuppData_FillRoomInfo(SuppData_PricingRoom SuppDataPricingRoom, SuppData_ShortInfo SuppDataInfo) { if (SuppDataInfo == null) { return; } FillImportantInformation(SuppDataPricingRoom, SuppDataInfo); FillArrivalAndDepartureTime(SuppDataPricingRoom, SuppDataInfo); }
private void FillImportantInformation(SuppData_PricingRoom SuppDataPricingRoom, SuppData_ShortInfo SuppDataInfo) { var importantInformation = SuppDataInfo.ImportantInformation?.FirstOrDefault(i => i.SupplierId == SuppDataPricingRoom.SupplierId); if (importantInformation == null) { return; } SuppDataPricingRoom.AddiditionalParams.RoomImportantInformation = $"{SuppDataPricingRoom.AddiditionalParams.RoomImportantInformation} {Environment.NewLine}{importantInformation.Russian}"; SuppDataPricingRoom.AddiditionalParams.RoomImportantInformationEn = $"{SuppDataPricingRoom.AddiditionalParams.RoomImportantInformationEn} {Environment.NewLine}{importantInformation.English}"; }