Реализовал логику
This commit is contained in:
parent
853e3105e7
commit
9c18562d56
@ -6,12 +6,12 @@ using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace MedicalBusinessLogic.BusinessLogics
|
||||
{
|
||||
public class VisitLogix : AbstractLogic<Visit, VisitViewModel, VisitSearchModel>
|
||||
public class VisitLogic : AbstractLogic<Visit, VisitViewModel, VisitSearchModel>
|
||||
{
|
||||
private readonly IStorage<Patient> _patientStorage;
|
||||
private readonly IStorage<Doctor> _doctorStorage;
|
||||
private readonly IStorage<Diagnose> _diagnoseStorage;
|
||||
public VisitLogix(
|
||||
public VisitLogic(
|
||||
ILogger<AbstractLogic<Visit, VisitViewModel, VisitSearchModel>> logger,
|
||||
IStorage<Visit> storage,
|
||||
IStorage<Patient> patientStorage,
|
||||
@ -92,6 +92,8 @@ namespace MedicalBusinessLogic.BusinessLogics
|
||||
visitViewModel.DiagnoseName = diagnose.Name;
|
||||
}
|
||||
}
|
||||
|
||||
return visitViewModel;
|
||||
}
|
||||
}
|
||||
}
|
@ -25,6 +25,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MedicalBusinessLogic\MedicalBusinessLogic.csproj" />
|
||||
<ProjectReference Include="..\MedicalDatabaseContracts\MedicalDatabaseContracts.csproj" />
|
||||
<ProjectReference Include="..\MedicalPostgresqlDatabase\MedicalPostgresqlDatabase.csproj" />
|
||||
</ItemGroup>
|
||||
|
@ -1,5 +1,8 @@
|
||||
using MedicalBusinessLogic.BusinessLogics;
|
||||
using MedicalDatabaseContracts;
|
||||
using MedicalDatabaseContracts.Models;
|
||||
using MedicalDatabaseContracts.SearchModels;
|
||||
using MedicalDatabaseContracts.ViewModels;
|
||||
using MedicalPostgresqlDatabase.Storages;
|
||||
using MedicalView.Diagnoses;
|
||||
using MedicalView.Doctors;
|
||||
@ -45,6 +48,12 @@ namespace MedicalView
|
||||
services.AddTransient<IStorage<Specialization>, SpecializationStorage>();
|
||||
services.AddTransient<IStorage<Visit>, VisitStorage>();
|
||||
|
||||
services.AddTransient<ILogic<Diagnose, DiagnoseViewModel, DiagnoseSearchModel>, DiagnoseLogic>();
|
||||
services.AddTransient<ILogic<Doctor, DoctorViewModel, DoctorSearchModel>, DoctorLogic>();
|
||||
services.AddTransient<ILogic<Patient, PatientViewModel, PatientSearchModel>, PatientLogic>();
|
||||
services.AddTransient<ILogic<Specialization, SpecializationViewModel, SpecializationSearchModel>, SpecializationLogic>();
|
||||
services.AddTransient<ILogic<Visit, VisitViewModel, VisitSearchModel>, VisitLogic>();
|
||||
|
||||
services.AddTransient<FormMain>();
|
||||
services.AddTransient<FormDiagnoses>();
|
||||
services.AddTransient<FormDoctors>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user