final fix

This commit is contained in:
Вячеслав Иванов 2024-05-29 19:53:56 +04:00
parent aaa156086f
commit 40a8ac6f6d
3 changed files with 21 additions and 14 deletions

View File

@ -6,6 +6,7 @@ using HotelContracts.SearchModels;
using HotelContracts.StoragesContracts;
using HotelContracts.ViewModels;
using HotelDataBaseImplement.Models;
using DocumentFormat.OpenXml.Wordprocessing;
namespace HotelBusinessLogic.BusinessLogics
{
@ -116,13 +117,16 @@ namespace HotelBusinessLogic.BusinessLogics
foreach (var mp in conferenceBooking.ConferenceBookingLunches.Values)
{
var conference = conferenced.FirstOrDefault(dp => dp.Id == conferenceBooking.ConferenceId);
listAll.Add(new ReportLunchesViewModel
if (conference != null)
{
LunchName = mp.LunchName,
LunchPrice = mp.LunchPrice,
ConferenceName = conference.ConferenceName,
StartDate = conference.StartDate
});
listAll.Add(new ReportLunchesViewModel
{
LunchName = mp.LunchName,
LunchPrice = mp.LunchPrice,
ConferenceName = conference.ConferenceName,
StartDate = conference.StartDate
});
}
}
}

View File

@ -116,14 +116,17 @@ namespace HotelBusinessLogic.BusinessLogics
foreach (var mp in mealPlan.MealPlanMembers.Values)
{
var room = rooms.FirstOrDefault(r => r.MealPlanId == mealPlan.Id);
listAll.Add(new ReportMembersViewModel
if (room != null)
{
MemberSurname = mp.MemberSurname,
MemberName = mp.MemberName,
MemberPatronymic = mp.MemberPatronymic,
RoomName = room.RoomName,
RoomPrice = room.RoomPrice
});
listAll.Add(new ReportMembersViewModel
{
MemberSurname = mp.MemberSurname,
MemberName = mp.MemberName,
MemberPatronymic = mp.MemberPatronymic,
RoomName = room.RoomName,
RoomPrice = room.RoomPrice
});
}
}
}

View File

@ -12,7 +12,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7020;http://localhost:5029",
"applicationUrl": "https://localhost:7040;http://localhost:5049",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}