Merge branch 'main' of https://git.is.ulstu.ru/antic0der/PIbd-23_Nasyrov_A_Yunusov_N_CourseWork_Veterinary
This commit is contained in:
commit
266f038b51
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryDataModels;
|
||||
|
||||
namespace VeterinaryContracts.BindingModels
|
||||
{
|
||||
public class DoctorBindingModel : IDoctorModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string DoctorFIO { get; set; } = string.Empty;
|
||||
public string Login { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryDataModels;
|
||||
|
||||
namespace VeterinaryContracts.BindingModels
|
||||
{
|
||||
public class DrugBindingModel : IDrugModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string DrugName { get; set; } = string.Empty;
|
||||
public int Count { get; set; }
|
||||
public Dictionary<int, (IMedicationModel, int)> DrugMedications
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryDataModels;
|
||||
|
||||
namespace VeterinaryContracts.BindingModels
|
||||
{
|
||||
public class MedicationBindingModel : IMedicationModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string MedicationName { get; set; } = string.Empty;
|
||||
public double Price { get; set; }
|
||||
public int DoctorId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryDataModels;
|
||||
|
||||
namespace VeterinaryContracts.BindingModels
|
||||
{
|
||||
public class ServiceBindingModel : IServiceModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string ServiceName { get; set; } = string.Empty;
|
||||
public int VisitId { get; set; }
|
||||
public int DoctorId { get; set; }
|
||||
public Dictionary<int, (IMedicationModel, int)> ServiceMedications
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryContracts.BindingModels;
|
||||
using VeterinaryContracts.ViewModels;
|
||||
using VeterinaryContracts.SearchModels;
|
||||
|
||||
namespace VeterinaryContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IDoctorLogic
|
||||
{
|
||||
List<DoctorViewModel>? ReadList(DoctorSearchModel? model);
|
||||
DoctorViewModel? ReadElement(DoctorSearchModel model);
|
||||
bool Create(DoctorBindingModel model);
|
||||
bool Update(DoctorBindingModel model);
|
||||
bool Delete(DoctorBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryContracts.BindingModels;
|
||||
using VeterinaryContracts.ViewModels;
|
||||
using VeterinaryContracts.SearchModels;
|
||||
|
||||
namespace VeterinaryContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IDrugLogic
|
||||
{
|
||||
List<DrugViewModel>? ReadList(DrugSearchModel? model);
|
||||
DrugViewModel? ReadElement(DrugSearchModel model);
|
||||
bool Create(DrugBindingModel model);
|
||||
bool Update(DrugBindingModel model);
|
||||
bool Delete(DrugBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryContracts.BindingModels;
|
||||
using VeterinaryContracts.ViewModels;
|
||||
using VeterinaryContracts.SearchModels;
|
||||
|
||||
namespace VeterinaryContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IMedicationLogic
|
||||
{
|
||||
List<MedicationViewModel>? ReadList(MedicationSearchModel? model);
|
||||
MedicationViewModel? ReadElement(MedicationSearchModel model);
|
||||
bool Create(MedicationBindingModel model);
|
||||
bool Update(MedicationBindingModel model);
|
||||
bool Delete(MedicationBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryContracts.BindingModels;
|
||||
using VeterinaryContracts.ViewModels;
|
||||
using VeterinaryContracts.SearchModels;
|
||||
|
||||
namespace VeterinaryContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IServiceLogic
|
||||
{
|
||||
List<ServiceViewModel>? ReadList(ServiceSearchModel? model);
|
||||
ServiceViewModel? ReadElement(ServiceSearchModel model);
|
||||
bool Create(ServiceBindingModel model);
|
||||
bool Update(ServiceBindingModel model);
|
||||
bool Delete(ServiceBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VeterinaryContracts.SearchModels
|
||||
{
|
||||
public class DoctorSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? DoctorFIO { get; set; }
|
||||
public string? Login { get; set; }
|
||||
public string? Password { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VeterinaryContracts.SearchModels
|
||||
{
|
||||
public class DrugSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? DrugName { get; set; }
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VeterinaryContracts.SearchModels
|
||||
{
|
||||
public class MedicationSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? MedicationName { get; set; }
|
||||
public int DoctorId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VeterinaryContracts.SearchModels
|
||||
{
|
||||
public class ServiceSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? ServiceName { get; set; }
|
||||
public int VisitId { get; set; }
|
||||
public int DoctorId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryContracts.BindingModels;
|
||||
using VeterinaryContracts.ViewModels;
|
||||
using VeterinaryContracts.SearchModels;
|
||||
|
||||
namespace VeterinaryContracts.StorageContracts
|
||||
{
|
||||
public interface IDoctorStorage
|
||||
{
|
||||
List<DoctorViewModel> GetFullList();
|
||||
List<DoctorViewModel> GetFilteredList(DoctorSearchModel model);
|
||||
DoctorViewModel? GetElement(DoctorSearchModel model);
|
||||
DoctorViewModel? Insert(DoctorBindingModel model);
|
||||
DoctorViewModel? Update(DoctorBindingModel model);
|
||||
DoctorViewModel? Delete(DoctorBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryContracts.BindingModels;
|
||||
using VeterinaryContracts.ViewModels;
|
||||
using VeterinaryContracts.SearchModels;
|
||||
|
||||
namespace VeterinaryContracts.StorageContracts
|
||||
{
|
||||
public interface IDrugStorage
|
||||
{
|
||||
List<DrugViewModel> GetFullList();
|
||||
List<DrugViewModel> GetFilteredList(DrugSearchModel model);
|
||||
DrugViewModel? GetElement(DrugSearchModel model);
|
||||
DrugViewModel? Insert(DrugBindingModel model);
|
||||
DrugViewModel? Update(DrugBindingModel model);
|
||||
DrugViewModel? Delete(DrugBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryContracts.BindingModels;
|
||||
using VeterinaryContracts.ViewModels;
|
||||
using VeterinaryContracts.SearchModels;
|
||||
|
||||
namespace VeterinaryContracts.StorageContracts
|
||||
{
|
||||
public interface IMedicationStorage
|
||||
{
|
||||
List<MedicationViewModel> GetFullList();
|
||||
List<MedicationViewModel> GetFilteredList(MedicationSearchModel model);
|
||||
MedicationViewModel? GetElement(MedicationSearchModel model);
|
||||
MedicationViewModel? Insert(MedicationBindingModel model);
|
||||
MedicationViewModel? Update(MedicationBindingModel model);
|
||||
MedicationViewModel? Delete(MedicationBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryContracts.BindingModels;
|
||||
using VeterinaryContracts.ViewModels;
|
||||
using VeterinaryContracts.SearchModels;
|
||||
|
||||
namespace VeterinaryContracts.StorageContracts
|
||||
{
|
||||
public interface IServiceStorage
|
||||
{
|
||||
List<ServiceViewModel> GetFullList();
|
||||
List<ServiceViewModel> GetFilteredList(ServiceSearchModel model);
|
||||
ServiceViewModel? GetElement(ServiceSearchModel model);
|
||||
ServiceViewModel? Insert(ServiceBindingModel model);
|
||||
ServiceViewModel? Update(ServiceBindingModel model);
|
||||
ServiceViewModel? Delete(ServiceBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryDataModels;
|
||||
|
||||
namespace VeterinaryContracts.ViewModels
|
||||
{
|
||||
public class DoctorViewModel : IDoctorModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("ФИО доктора")]
|
||||
public string DoctorFIO { get; set; } = string.Empty;
|
||||
[DisplayName("Логин (эл. почта) докотора")]
|
||||
public string Login { get; set; } = string.Empty;
|
||||
[DisplayName("Пароль")]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryDataModels;
|
||||
|
||||
namespace VeterinaryContracts.ViewModels
|
||||
{
|
||||
public class DrugViewModel : IDrugModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Название лекарства")]
|
||||
public string DrugName { get; set; } = string.Empty;
|
||||
[DisplayName("Количество")]
|
||||
public int Count { get; set; }
|
||||
public Dictionary<int, (IMedicationModel, int)> DrugMedications
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryDataModels;
|
||||
|
||||
namespace VeterinaryContracts.ViewModels
|
||||
{
|
||||
public class MedicationViewModel : IMedicationModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Название медикамента")]
|
||||
public string MedicationName { get; set; } = string.Empty;
|
||||
[DisplayName("Цена")]
|
||||
public double Price { get; set; }
|
||||
public int DoctorId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VeterinaryDataModels;
|
||||
|
||||
namespace VeterinaryContracts.ViewModels
|
||||
{
|
||||
public class ServiceViewModel : IServiceModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Название услуги")]
|
||||
public string ServiceName { get; set; } = string.Empty;
|
||||
public int VisitId { get; set; }
|
||||
public int DoctorId { get; set; }
|
||||
public Dictionary<int, (IMedicationModel, int)> ServiceMedications
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = new();
|
||||
}
|
||||
}
|
@ -10,6 +10,6 @@ namespace VeterinaryDataModels
|
||||
{
|
||||
string DrugName { get; }
|
||||
int Count { get; }
|
||||
int MedicationId { get; }
|
||||
Dictionary<int, (IMedicationModel, int)> DrugMedications { get; }
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ namespace VeterinaryDataModels
|
||||
String ServiceName { get;}
|
||||
int VisitId { get; }
|
||||
int DoctorId { get; }
|
||||
Dictionary<int, (IMedicationModel, int)> ServiceMedications { get; }
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user