ааааааааааааааааа
This commit is contained in:
parent
c5b4a83d78
commit
fa2b3b3f04
@ -25,10 +25,10 @@ namespace BeatySalonBusinesLogic.OfficePackage
|
||||
Style = "Normal",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||
});
|
||||
CreateTable(new List<string> { "2cm", "6cm", "3cm" });
|
||||
CreateTable(new List<string> { "2cm", "4cm", "3cm", "3cm", "3cm", "3cm", "3cm" });
|
||||
CreateRow(new PdfRowParameters
|
||||
{
|
||||
Texts = new List<string> { "Номер", "Услуга", "Процедура", "Косметика", "Сумма", "Статус" },
|
||||
Texts = new List<string> { "Номер заказа", "Услуга", "Процедура", "Косметика", "Сумма", "Статус" },
|
||||
Style = "NormalTitle",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||
});
|
||||
@ -37,7 +37,7 @@ namespace BeatySalonBusinesLogic.OfficePackage
|
||||
{
|
||||
CreateRow(new PdfRowParameters
|
||||
{
|
||||
Texts = new List<string> { (view.Id).ToString(), "", "" },
|
||||
Texts = new List<string> { (view.Id).ToString(), "", "", "", (view.OrderAmount).ToString(), (view.Status).ToString() },
|
||||
Style = "Normal",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Left
|
||||
});
|
||||
@ -74,18 +74,18 @@ namespace BeatySalonBusinesLogic.OfficePackage
|
||||
|
||||
CreateRow(new PdfRowParameters
|
||||
{
|
||||
Texts = new List<string> { "", service, procedure, cosmetic },
|
||||
Texts = new List<string> { "", service, procedure, cosmetic, "", "" },
|
||||
Style = "Normal",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Left
|
||||
});
|
||||
}
|
||||
CreateParagraph(new PdfParagraph
|
||||
{
|
||||
Text = $"Итого: {info.Orders.Sum(x => x.OrderAmount)}\t",
|
||||
Style = "Normal",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Right
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
CreateParagraph(new PdfParagraph
|
||||
{
|
||||
Text = $"Итого: {info.Orders.Sum(x => x.OrderAmount)}\t",
|
||||
Style = "Normal",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Right
|
||||
});
|
||||
SavePdf(info);
|
||||
}
|
||||
|
||||
|
@ -23,27 +23,27 @@ namespace BeatySalonBusinesLogic.OfficePackage
|
||||
JustificationType = WordJustificationType.Center
|
||||
}
|
||||
});
|
||||
foreach (var cp in info.CosmeticProcedures)
|
||||
CreateParagraph(new WordParagraph
|
||||
{
|
||||
CreateParagraph(new WordParagraph
|
||||
Texts = new List<(string, WordTextProperties)> {
|
||||
("Косметика" +" - " + "Процедура", new WordTextProperties { Size = "24", Bold = true, }),
|
||||
},
|
||||
TextProperties = new WordTextProperties
|
||||
{
|
||||
Texts = new List<(string, WordTextProperties)> {
|
||||
(cp.CosmeticName + " : ", new WordTextProperties { Size = "24", Bold = true, }),
|
||||
},
|
||||
TextProperties = new WordTextProperties
|
||||
{
|
||||
Size = "24",
|
||||
JustificationType = WordJustificationType.Both
|
||||
}
|
||||
});
|
||||
Size = "24",
|
||||
JustificationType = WordJustificationType.Both
|
||||
}
|
||||
});
|
||||
int i = 1;
|
||||
foreach (var cp in info.CosmeticProcedures)
|
||||
{
|
||||
foreach (var procedure in cp.Procedures)
|
||||
{
|
||||
CreateParagraph(new WordParagraph
|
||||
{
|
||||
Texts = new List<(string, WordTextProperties)>
|
||||
{
|
||||
(" " + procedure, new WordTextProperties { Size = "24" }) // Добавляем отступ в виде Tab
|
||||
},
|
||||
Texts = new List<(string, WordTextProperties)> {
|
||||
(i + ". " + cp.CosmeticName + " - " + procedure, new WordTextProperties { Size = "24", Bold = false, }),
|
||||
},
|
||||
TextProperties = new WordTextProperties
|
||||
{
|
||||
Size = "24",
|
||||
@ -51,6 +51,7 @@ namespace BeatySalonBusinesLogic.OfficePackage
|
||||
}
|
||||
});
|
||||
}
|
||||
i++;
|
||||
}
|
||||
SaveWord(info);
|
||||
}
|
||||
|
@ -9,8 +9,6 @@ namespace BeautySalonContracts.BindingModels
|
||||
public class ReportServiceBindingModel
|
||||
{
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
public DateTime? DateFrom { get; set; } = DateTime.Now;
|
||||
public DateTime? DateTo { get; set; } = DateTime.Now;
|
||||
public int? StorekeeperId { get; set; }
|
||||
public string? Email { get; set; }
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ namespace BeautySalonDatabaseImplement.Models
|
||||
return _orderProcedures;
|
||||
}
|
||||
}
|
||||
[ForeignKey("ServiceId")]
|
||||
[ForeignKey("OrderId")]
|
||||
public virtual List<OrderProcedure> Procedures { get; set; } = new();//представляет список процедур для данного заказа.
|
||||
|
||||
|
||||
|
@ -18,17 +18,14 @@ namespace WorkerWebApp.Controllers
|
||||
private readonly ILogger _logger;
|
||||
private readonly IWorkerLogic _logic;
|
||||
|
||||
private readonly IProcedureLogic _procedureLogic;
|
||||
|
||||
private readonly IReportLogicWorker _reportLogic;
|
||||
|
||||
private readonly AbstractMailWorker _mailLogic;
|
||||
|
||||
public HomeController(ILogger<HomeController> logger, IWorkerLogic workerLogic, IProcedureLogic procedureLogic, IReportLogicWorker reportLogic, AbstractMailWorker mailLogic)
|
||||
public HomeController(ILogger<HomeController> logger, IWorkerLogic workerLogic, IReportLogicWorker reportLogic, AbstractMailWorker mailLogic)
|
||||
{
|
||||
_logger = logger;
|
||||
_logic = workerLogic;
|
||||
_procedureLogic = procedureLogic;
|
||||
_reportLogic = reportLogic;
|
||||
_mailLogic = mailLogic;
|
||||
}
|
||||
@ -159,11 +156,6 @@ namespace WorkerWebApp.Controllers
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
|
||||
ViewBag.Procedures = _procedureLogic.ReadList(new ProcedureSearchModel
|
||||
{
|
||||
WorkerId = APIWorker.Worker.Id
|
||||
});
|
||||
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
@ -184,14 +176,7 @@ namespace WorkerWebApp.Controllers
|
||||
DateFrom = dateFrom,
|
||||
DateTo = dateTo,
|
||||
WorkerId = APIWorker.Worker.Id
|
||||
|
||||
});
|
||||
|
||||
ViewBag.Procedures = _procedureLogic.ReadList(new ProcedureSearchModel
|
||||
{
|
||||
WorkerId = APIWorker.Worker.Id
|
||||
});
|
||||
|
||||
return View(data);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
@{
|
||||
ViewData["Title"] = "Home Page";
|
||||
}
|
||||
|
||||
<h1 class="display-4 text-center">Салон красоты "Вы ужасны". Работник</h1>
|
||||
<div class="text-center">
|
||||
<img src="./Images/Logo.png" alt="logo">
|
||||
<img src="https://sun9-32.userapi.com/impg/qtFbWPxicTvUXDQRJHrq2jq2W7gJb3Rd7Q01tw/TUcqjKm5K6M.jpg?size=693x500&quality=95&sign=f9155333706b01121d8e060211bf0117&type=album" alt="logo">
|
||||
</div>
|
@ -9,25 +9,13 @@
|
||||
<h2 class="display-4">Отчеты</h2>
|
||||
</div>
|
||||
|
||||
<form method="post" enctype="multipart/form-data" style="margin-top: 50px">
|
||||
<form method="post" enctype="multipart/form-data" style="margin-top: 10px">
|
||||
<!-- Сохранить отчеты в формате Word и Excel -->
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="d-flex flex-column justify-content-start" style="margin-top: 20px;">
|
||||
<!-- Кнопка для сохранения отчета в формате Word -->
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary" formaction="@Url.Action("CreateReportWord", "Home")">Список косметики по процедурам Word</button>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">Косметика по процедурам:</div>
|
||||
<div class="col-8">
|
||||
<select name="recipes" id="recipes" class="form-control" size="4" multiple>
|
||||
@foreach (var procedure in ViewBag.Procedures)
|
||||
{
|
||||
<option value="@procedure.Id">@procedure.Id - @procedure.ProcedureName</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Кнопка для сохранения отчета в формате Excel -->
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary" formaction="@Url.Action("CreateReportExcel", "Home")">Список косметики по процедурам Excel</button>
|
||||
|
@ -52,7 +52,7 @@
|
||||
<div class="col-4">Услуги:</div>
|
||||
<div class="col-8">
|
||||
<select name="services" id="services" class="form-control" size="4" multiple>
|
||||
@foreach (var service in ViewBag.Service)
|
||||
@foreach (var service in ViewBag.Services)
|
||||
{
|
||||
<option value="@service.Id">@service.ServiceName</option>
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - WorkerWebApp</title>
|
||||
<title>@ViewData["Title"] - BeautySalonWorkerApp</title>
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/WorkerWebApp.styles.css" asp-append-version="true" />
|
||||
@ -14,7 +14,7 @@
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex flex-column">
|
||||
<a class="navbar-brand fw-weight-bold py-0 px-2" asp-area="" asp-controller="Home" asp-action="Index">Вы Ужасны</a>
|
||||
<div class="px-2">ClientApp</div>
|
||||
<div class="px-2">WorkerApp</div>
|
||||
</div>
|
||||
<div class="mx-2">
|
||||
<img src="https://png.pngtree.com/png-clipart/20191120/original/pngtree-spider-glyph-icon-vector-png-image_5056646.jpg" alt="mdo" width="35" height="35" class="rounded-circle">
|
||||
@ -56,7 +56,7 @@
|
||||
|
||||
<footer class="border-top footer text-muted">
|
||||
<div class="container">
|
||||
© 2023 - WorkerWebApp - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
© 2024 - BeautySalonWorkerApp</a>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
|
@ -6,6 +6,7 @@
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
"SmtpClientHost": "smtp.gmail.com",
|
||||
"SmtpClientPort": "587",
|
||||
"PopHost": "pop.gmail.com",
|
||||
|
@ -158,13 +158,8 @@ namespace StorekeeperWebApp.Controllers
|
||||
{
|
||||
throw new Exception("Необходимо авторизоваться!");
|
||||
}
|
||||
|
||||
ViewBag.Cosmetics = _cosmeticLogic.ReadList(new CosmeticSearchModel());
|
||||
|
||||
var data = _reportLogic.GetServices(new ReportServiceBindingModel());
|
||||
|
||||
ViewBag.Cosmetic = _cosmeticLogic.ReadList(new CosmeticSearchModel());
|
||||
|
||||
return View(data);
|
||||
}
|
||||
|
||||
@ -219,8 +214,6 @@ namespace StorekeeperWebApp.Controllers
|
||||
_reportLogic.SaveServicesToPdfFile(new ReportServiceBindingModel
|
||||
{
|
||||
FileName = filePath,
|
||||
DateFrom = dateFrom,
|
||||
DateTo = dateTo,
|
||||
StorekeeperId = APIStorekeeper.Storekeeper.Id
|
||||
});
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
@{
|
||||
ViewData["Title"] = "HomePage";
|
||||
}
|
||||
<h1 class="display-4 text-center">Мы Вас не ждали, зло пожаловать!</h1>
|
||||
<h1 class="display-4 text-center">Салон красоты "Вы ужасны". Кладовщик</h1>
|
||||
|
||||
<div class="text-center">
|
||||
<p><img src="/images/logo.png" alt="Logo" /></p>
|
||||
<p><img src="https://sun9-34.userapi.com/impg/JJcWE8wcdxykwy1hpby5-0Q5MLSx_KGyQHGHlQ/FMrCDctC6hY.jpg?size=720x487&quality=95&sign=f156c644c665c6f82bcbe396cc392a69&type=album" alt="Logo" /></p>
|
||||
</div>
|
@ -9,65 +9,37 @@
|
||||
<h2 class="display-4">Отчеты</h2>
|
||||
</div>
|
||||
|
||||
<form method="post" enctype="multipart/form-data" style="margin-top: 50px">
|
||||
<!-- Сохранить отчеты в формате Word и Excel -->
|
||||
<div class="d-flex justify-content-between">
|
||||
<form method="post" enctype="multipart/form-data" style="margin-top: 10px">
|
||||
<div class="d-flex flex-column justify-content-start" style="margin-top: 20px;">
|
||||
<!-- Кнопка для сохранения отчета в формате Word -->
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary" formaction="@Url.Action("CreateReportWord", "Home")">Список процедур по косметике Word</button>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">Процедуры по косметике:</div>
|
||||
<div class="col-8">
|
||||
<select name="recipes" id="recipes" class="form-control" size="4" multiple>
|
||||
@foreach (var cosmetic in ViewBag.Cosmetics)
|
||||
{
|
||||
<option value="@cosmetic.Id">@cosmetic.Id - @cosmetic.CosmeticName</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Кнопка для сохранения отчета в формате Excel -->
|
||||
<div class="text-center">
|
||||
<div class="text-center" style="margin-top: 10px;">
|
||||
<button type="submit" class="btn btn-primary" formaction="@Url.Action("CreateReportExcel", "Home")">Список процедур по косметике Excel</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Временной период выборки данных -->
|
||||
<div class="d-flex justify-content-center" style="margin: 50px 0px 30px 0px">
|
||||
<div class="text-center">
|
||||
<label for="dateFrom">С</label>
|
||||
<input type="date" id="dateFrom" name="dateFrom" class="form-control d-inline-block w-auto">
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<label for="dateTo">по</label>
|
||||
<input type="date" id="dateTo" name="dateTo" class="form-control d-inline-block w-auto">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Действия для отчета в формате Pdf -->
|
||||
<div class="d-flex justify-content-between">
|
||||
<!-- Сохранить отчет в формате Pdf -->
|
||||
<div class="text-center">
|
||||
<!-- Кнопка для сохранения отчета в формате Pdf -->
|
||||
<div class="text-center" style="margin-top: 10px; margin-bottom: 20px;">
|
||||
<button type="submit" class="btn btn-primary" formaction="@Url.Action("CreateReportPdf", "Home")">Сведения об услугах Pdf</button>
|
||||
</div>
|
||||
|
||||
<!-- Отправить отчет на почту -->
|
||||
<div class="d-flex">
|
||||
<div class="text-center" style="margin-top: 10px;">
|
||||
<label for="fileUpload" class="d-block"></label>
|
||||
<input type="file" id="fileUpload" name="fileUpload" class="form-control-file d-inline-block w-auto">
|
||||
<button type="submit" class="btn btn-primary" formaction="@Url.Action("SendReport", "Home")">Отправить отчет на почту</button>
|
||||
<input type="file" id="fileUpload" name="fileUpload" class="form-control-file w-auto">
|
||||
</div>
|
||||
|
||||
<!-- Вывести отчет на форму -->
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary" formaction="@Url.Action("Reports", "Home")">Вывести отчет на форму</button>
|
||||
<button type="submit" class="btn btn-primary" formaction="@Url.Action("SendReport", "Home")">Отправить отчет на почту</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Таблица для вывода отчета на форму -->
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Список услуг: </h1>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - BeutySalonStaffMemberApp</title>
|
||||
<title>@ViewData["Title"] - BeutySalonStorekeeperApp</title>
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/BeutySalonStaffMemberApp.styles.css" asp-append-version="true" />
|
||||
@ -14,7 +14,7 @@
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex flex-column">
|
||||
<a class="navbar-brand fw-weight-bold py-0 px-2" asp-area="" asp-controller="Home" asp-action="Index">Вы Ужасны</a>
|
||||
<div class="px-2">StaffMemberApp</div>
|
||||
<div class="px-2">StorekeeperApp</div>
|
||||
</div>
|
||||
<div class="mx-2">
|
||||
<img src="https://png.pngtree.com/png-clipart/20191120/original/pngtree-spider-glyph-icon-vector-png-image_5056646.jpg" alt="mdo" width="35" height="35" class="rounded-circle">
|
||||
@ -56,7 +56,7 @@
|
||||
|
||||
<footer class="border-top footer text-muted">
|
||||
<div class="container">
|
||||
© 2023 - BeutySalonStaffMemberApp - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
© 2024 - BeutySalonStorekeeperApp</a>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
|
@ -6,11 +6,10 @@
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
"SmtpClientHost": "smtp.gmail.com",
|
||||
"SmtpClientPort": "587",
|
||||
"PopHost": "pop.gmail.com",
|
||||
"PopPort": "995",
|
||||
"MailLogin": "lablablablab777@gmail.com",
|
||||
"MailPassword": "qvca dfzi mkaa gina"
|
||||
"MailLogin": "theredguy13@gmail.com",
|
||||
"MailPassword": "gcok utyv qyce qfre"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user