diff --git a/Hotel/HotelDataBaseImplement/HotelDataBase.cs b/Hotel/HotelDataBaseImplement/HotelDataBase.cs index 7141379..6d7ccea 100644 --- a/Hotel/HotelDataBaseImplement/HotelDataBase.cs +++ b/Hotel/HotelDataBaseImplement/HotelDataBase.cs @@ -9,7 +9,7 @@ namespace HotelDataBaseImplement { if (optionsBuilder.IsConfigured == false) { - optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-V0ON61E\SQLEXPRESS;Initial Catalog=HotelDataBaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); + optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-VG5USAH\SQLEXPRESS;Initial Catalog=HotelDataBaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); } base.OnConfiguring(optionsBuilder); } diff --git a/Hotel/HotelOrganiserApp/Controllers/HomeController.cs b/Hotel/HotelOrganiserApp/Controllers/HomeController.cs index f6a2a79..5eb9e17 100644 --- a/Hotel/HotelOrganiserApp/Controllers/HomeController.cs +++ b/Hotel/HotelOrganiserApp/Controllers/HomeController.cs @@ -9,6 +9,8 @@ using System.Web.Helpers; using System.Reflection; using HotelBusinessLogic.BusinessLogics; using HotelContracts.BusinessLogicsContracts; +using System.Linq; +using DocumentFormat.OpenXml.Wordprocessing; namespace HotelOrganiserApp.Controllers { @@ -152,30 +154,41 @@ namespace HotelOrganiserApp.Controllers _logger.LogError(ex, "Ошибка создания отчета"); throw; } + double sum = 0; string table = ""; + table += $"

Предварительный отчет

"; + table += $""; + table += ""; + table += ""; + table += ""; + table += ""; + table += ""; + table += ""; + table += ""; + table += ""; + table += ""; + table += $""; + table += $""; + table += $""; + table += $""; + table += $""; + table += ""; + table += ""; foreach (var report in result) { - table += $"

{report.MemberFIO}

"; - table += $"
УчастникКонференцияДата начала конференцииПлан питанияСтоимость плана питания
"; - table += ""; - table += ""; - table += $""; - table += $""; - table += $""; - table += $""; - table += ""; - table += ""; - table += ""; - table += ""; - table += $""; - table += $""; - table += $""; - table += $""; + table += ""; + table += ""; + table += $""; + table += $""; + table += $""; + table += $""; + table += $""; table += ""; table += ""; - table += "
КонференцияДата начала конференцииПлан питанияСтоимость плана питания
{report.ConferenceName}{report.StartDate}{report.MealPlanName}{report.MealPlanPrice}
{report.MemberFIO}{report.ConferenceName}{report.StartDate}{report.MealPlanName}{report.MealPlanPrice}
"; + sum+= report.MealPlanPrice; } - //table += $"

Итого: {result.Item2}

"; + table += ""; + table += $"

Итого: {sum}

"; return table; } diff --git a/Hotel/HotelOrganiserApp/Views/Home/ListMembersToPdfFile.cshtml b/Hotel/HotelOrganiserApp/Views/Home/ListMembersToPdfFile.cshtml index 6be9f34..84b1dcb 100644 --- a/Hotel/HotelOrganiserApp/Views/Home/ListMembersToPdfFile.cshtml +++ b/Hotel/HotelOrganiserApp/Views/Home/ListMembersToPdfFile.cshtml @@ -3,36 +3,51 @@ @{ ViewData["Title"] = "ListMembersToPdfFile"; } + + +
-

Отчет по участникам за период

+

Отчет по участникам за период

@{
-
-
- - -
-
- - -
-
-
- Ваш email - - -
-
+ + +
+ + +
+
+
+
+
+
- +
+
+
+
}