Compare commits

..

No commits in common. "1fb64d83c88a4e73221637fe4907ae71588dff14" and "f89deb35509a7ecd5f9f134c6be9b232213b411e" have entirely different histories.

4 changed files with 9 additions and 51 deletions

View File

@ -81,11 +81,8 @@ namespace LawFirmExecutorApp.Controllers
APIClient.PostRequest("api/case/updatecase", new
CaseBindingModel
{
ExecutorId = APIClient.Executor.Id,
Name = name,
Status = status,
CaseType = type,
DateCreate = date
Id = id
});
Response.Redirect("/Home/Cases");
}
@ -97,12 +94,7 @@ namespace LawFirmExecutorApp.Controllers
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
}
APIClient.PostRequest("api/case/deletecase", new
CaseBindingModel
{
Id = id,
});
APIClient.PostRequest("api/case/deletecase", );
Response.Redirect("/Home/Cases");
}

View File

@ -3,7 +3,6 @@ using LawFirmContracts.ViewModels;
using LawFirmExecutorApp.Models;
using Microsoft.AspNetCore.Mvc;
using System.Diagnostics;
using LawFirmContracts.BusinessLogicContracts;
using System.Globalization;
namespace LawFirmExecutorApp.Controllers
@ -11,12 +10,10 @@ namespace LawFirmExecutorApp.Controllers
public class HomeController : Controller
{
private readonly ILogger<HomeController> _logger;
private readonly IReportLogic _report;
public HomeController(ILogger<HomeController> logger, IReportLogic report)
public HomeController(ILogger<HomeController> logger)
{
_logger = logger;
_report = report;
}
// СТРАНИЦА ДЕЛ
@ -164,12 +161,10 @@ namespace LawFirmExecutorApp.Controllers
List<ReportClientsViewModel> result;
try
{
result = _report.GetGetClients(new ReportBindingModel
{
ExecutorId = APIClient.Executor.Id,
DateFrom = dateFrom,
DateTo = dateTo
});
string dateFromS = dateFrom.ToString("s", CultureInfo.InvariantCulture);
string dateToS = dateTo.ToString("s", CultureInfo.InvariantCulture);
result = APIClient.GetRequest<List<ReportClientsViewModel>>
($"api/reportexecutor/getconsultationhearingreport?datefrom={dateFromS}&dateto={dateToS}&executorid={APIClient.Executor.Id}")!;
}
catch (Exception ex)

View File

@ -11,8 +11,6 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LawFimDataModels\LawFimDataModels.csproj" />
<ProjectReference Include="..\LawFirmBusinessLogic\LawFirmBusinessLogic.csproj" />
<ProjectReference Include="..\LawFirmContracts\LawFirmContracts.csproj" />
<ProjectReference Include="..\LawFirmDatabaseImplement\LawFirmDatabaseImplement.csproj" />
</ItemGroup>

View File

@ -1,38 +1,11 @@
using LawFirmContracts.BusinessLogicContracts;
using LawFirmExecutorApp;
using LawFirmContracts.StoragesContracts;
using LawFirmDatabaseImplement.Implements;
using LawFirmBusinessLogic.BusinessLogics;
using LawFirmBusinessLogic.OfficePackages;
using LawFirmBusinessLogic.MailWorker;
using LawFirmBusinessLogic.OfficePackages.Implements;
var builder = WebApplication.CreateBuilder(args);
//builder.Services.AddTransient<ICaseStorage, CaseStorage>();
//builder.Services.AddTransient<IVisitStorage, VisitStorage>();
//builder.Services.AddTransient<IClientStorage, ClientStorage>();
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.
builder.Services.AddControllersWithViews();