Merge branch 'Stage1' of https://git.is.ulstu.ru/a.puchkina/PIIbd-22_Fedorenko_Puchkina_CorseWork into Stage1
This commit is contained in:
commit
650397cecf
@ -1,4 +1,5 @@
|
|||||||
using LawFirmContracts.BindingModels;
|
using LawFirmContracts.BindingModels;
|
||||||
|
using LawFirmContracts.BusinessLogicContracts;
|
||||||
using LawFirmContracts.ViewModels;
|
using LawFirmContracts.ViewModels;
|
||||||
using LawFirmGuarantorApp.Models;
|
using LawFirmGuarantorApp.Models;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
@ -10,10 +11,12 @@ namespace LawFirmGuarantorApp.Controllers
|
|||||||
public class HomeController : Controller
|
public class HomeController : Controller
|
||||||
{
|
{
|
||||||
private readonly ILogger<HomeController> _logger;
|
private readonly ILogger<HomeController> _logger;
|
||||||
|
private readonly IReportLogic _report;
|
||||||
|
|
||||||
public HomeController(ILogger<HomeController> logger)
|
public HomeController(ILogger<HomeController> logger, IReportLogic report)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
|
_report = report;
|
||||||
}
|
}
|
||||||
|
|
||||||
// СТРАНИЦЫ КОНСУЛЬТАЦИЙ
|
// СТРАНИЦЫ КОНСУЛЬТАЦИЙ
|
||||||
@ -168,11 +171,12 @@ namespace LawFirmGuarantorApp.Controllers
|
|||||||
List<ReportConsultationHearingViewModel> result;
|
List<ReportConsultationHearingViewModel> result;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string dateFromS = dateFrom.ToString("s", CultureInfo.InvariantCulture);
|
result = _report.GetConsultationHearing(new ReportConsultationHearingBindingModel
|
||||||
string dateToS = dateTo.ToString("s", CultureInfo.InvariantCulture);
|
{
|
||||||
result = APIClient.GetRequest<List<ReportConsultationHearingViewModel>>
|
GuarantorId = APIClient.Guarantor.Id,
|
||||||
($"api/reportguarantor/getconsultationhearingreport?datefrom={dateFromS}&dateto={dateToS}&guarantorid={APIClient.Guarantor.Id}")!;
|
DateFrom = dateFrom,
|
||||||
|
DateTo = dateTo
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\LawFimDataModels\LawFimDataModels.csproj" />
|
||||||
|
<ProjectReference Include="..\LawFirmBusinessLogic\LawFirmBusinessLogic.csproj" />
|
||||||
<ProjectReference Include="..\LawFirmContracts\LawFirmContracts.csproj" />
|
<ProjectReference Include="..\LawFirmContracts\LawFirmContracts.csproj" />
|
||||||
<ProjectReference Include="..\LawFirmDatabaseImplement\LawFirmDatabaseImplement.csproj" />
|
<ProjectReference Include="..\LawFirmDatabaseImplement\LawFirmDatabaseImplement.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -1,11 +1,38 @@
|
|||||||
|
using LawFirmContracts.BusinessLogicContracts;
|
||||||
using LawFirmContracts.StoragesContracts;
|
using LawFirmContracts.StoragesContracts;
|
||||||
using LawFirmDatabaseImplement.Implements;
|
using LawFirmDatabaseImplement.Implements;
|
||||||
using LawFirmGuarantorApp;
|
using LawFirmGuarantorApp;
|
||||||
|
using LawFirmBusinessLogic.BusinessLogics;
|
||||||
|
using LawFirmBusinessLogic.OfficePackages;
|
||||||
|
using LawFirmBusinessLogic.MailWorker;
|
||||||
|
using LawFirmBusinessLogic.OfficePackages.Implements;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
//builder.Services.AddTransient<IConsultationStorage, ConsultationStorage>();
|
//builder.Services.AddTransient<IConsultationStorage, ConsultationStorage>();
|
||||||
//builder.Services.AddTransient<IHearingStorage, HearingStorage>();
|
//builder.Services.AddTransient<IHearingStorage, HearingStorage>();
|
||||||
//builder.Services.AddTransient<ILawyerStorage, LawyerStorage>();
|
builder.Services.AddTransient<IReportLogic, ReportLogic>();
|
||||||
|
builder.Services.AddTransient<IClientStorage, ClientStorage>();
|
||||||
|
builder.Services.AddTransient<IHearingStorage, HearingStorage>();
|
||||||
|
builder.Services.AddTransient<IVisitStorage, VisitStorage>();
|
||||||
|
builder.Services.AddTransient<ICaseStorage, CaseStorage>();
|
||||||
|
builder.Services.AddTransient<IConsultationStorage, ConsultationStorage>();
|
||||||
|
builder.Services.AddTransient<ILawyerStorage, LawyerStorage>();
|
||||||
|
|
||||||
|
builder.Services.AddTransient<IExecutorLogic, ExecutorLogic>();
|
||||||
|
builder.Services.AddTransient<IGuarantorLogic, GuarantorLogic>();
|
||||||
|
builder.Services.AddTransient<IExecutorStorage, ExecutorStorage>();
|
||||||
|
builder.Services.AddTransient<IGuarantorStorage, GuarantorStorage>();
|
||||||
|
|
||||||
|
builder.Services.AddTransient<AbstractSaveToExcelClientsConsultation, SaveToExcelClientsConsultation>();
|
||||||
|
builder.Services.AddTransient<AbstractSaveToExcelVisitsLawyer, SaveToExcelVisitsLawyer>();
|
||||||
|
builder.Services.AddTransient<AbstractSaveToWordClientsConsultation, SaveToWordClientsConsultation>();
|
||||||
|
builder.Services.AddTransient<AbstractSaveToWordVisitsLawyer, SaveToWordVisitsLawyer>();
|
||||||
|
builder.Services.AddTransient<AbstractSaveToPdfConsultationHearing, SaveToPdfConsultationHearing>();
|
||||||
|
builder.Services.AddTransient<AbstractSaveToPdfCaseHearing, SaveToPdfCaseHearing>();
|
||||||
|
builder.Services.AddTransient<AbstractSaveToPdfClients, SaveToPdfClients>();
|
||||||
|
builder.Services.AddTransient<AbstractSaveToPdfClientCaseHearing, SaveToPdfClientCaseHearing>();
|
||||||
|
builder.Services.AddSingleton<AbstractMailWorker, MailKitWorker>();
|
||||||
|
|
||||||
|
|
||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
builder.Services.AddControllersWithViews();
|
builder.Services.AddControllersWithViews();
|
||||||
|
@ -32,7 +32,7 @@ namespace LawFirmRestApi.Controllers
|
|||||||
{
|
{
|
||||||
DateFrom = report.DateFrom,
|
DateFrom = report.DateFrom,
|
||||||
DateTo = report.DateTo,
|
DateTo = report.DateTo,
|
||||||
FileName = "E:\\reports\\pdfConsultationHearingsReport.pdf",
|
FileName = "D:\\CourseWork\\pdfConsultationHearingsReport.pdf",
|
||||||
GuarantorId = report.GuarantorId,
|
GuarantorId = report.GuarantorId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -51,7 +51,7 @@ namespace LawFirmRestApi.Controllers
|
|||||||
{
|
{
|
||||||
DateFrom = report.DateFrom,
|
DateFrom = report.DateFrom,
|
||||||
DateTo = report.DateTo,
|
DateTo = report.DateTo,
|
||||||
FileName = "E:\\reports\\pdfCaseHearingsReport.pdf",
|
FileName = "D:\\CourseWork\\pdfCaseHearingsReport.pdf",
|
||||||
GuarantorId = report.GuarantorId,
|
GuarantorId = report.GuarantorId,
|
||||||
LawyerId =report.LawyerId,
|
LawyerId =report.LawyerId,
|
||||||
});
|
});
|
||||||
@ -70,7 +70,7 @@ namespace LawFirmRestApi.Controllers
|
|||||||
_reportLogic.SaveVisitLawyerToWordFile(new ReportVisitLawyerBindingModel
|
_reportLogic.SaveVisitLawyerToWordFile(new ReportVisitLawyerBindingModel
|
||||||
{
|
{
|
||||||
GuarantorId = report.GuarantorId,
|
GuarantorId = report.GuarantorId,
|
||||||
FileName = "E:\\reports\\wordVisitLawyerReport.docx",
|
FileName = "D:\\CourseWork\\wordVisitLawyerReport.docx",
|
||||||
LawyerId = report.LawyerId
|
LawyerId = report.LawyerId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ namespace LawFirmRestApi.Controllers
|
|||||||
_reportLogic.SaveVisitLawyerToExcelFile(new ReportVisitLawyerBindingModel
|
_reportLogic.SaveVisitLawyerToExcelFile(new ReportVisitLawyerBindingModel
|
||||||
{
|
{
|
||||||
GuarantorId = report.GuarantorId,
|
GuarantorId = report.GuarantorId,
|
||||||
FileName = "E:\\reports\\excelVisitLawyerReport.xlsx",
|
FileName = "D:\\CourseWork\\excelVisitLawyerReport.xlsx",
|
||||||
LawyerId = report.LawyerId
|
LawyerId = report.LawyerId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ namespace LawFirmRestApi.Controllers
|
|||||||
{
|
{
|
||||||
DateFrom = report.DateFrom,
|
DateFrom = report.DateFrom,
|
||||||
DateTo = report.DateTo,
|
DateTo = report.DateTo,
|
||||||
FileName = "E:\\reports\\pdffile.pdf",
|
FileName = "D:\\CourseWork\\pdffile.pdf",
|
||||||
GuarantorId = report.GuarantorId,
|
GuarantorId = report.GuarantorId,
|
||||||
LawyerId = report.LawyerId,
|
LawyerId = report.LawyerId,
|
||||||
Email = report.Email,
|
Email = report.Email,
|
||||||
|
Loading…
Reference in New Issue
Block a user