контрактики
This commit is contained in:
parent
209cfc5f6b
commit
a2945ec750
@ -5,6 +5,8 @@ VisualStudioVersion = 17.9.34723.18
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LawCompanyDataModels", "LawCompany\LawCompanyDataModels.csproj", "{E38D3745-25B2-45EC-B47E-14C6100C9413}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LawCompanyContracts", "LawCompanyContracts\LawCompanyContracts.csproj", "{DD8E5EB4-CA20-4C49-9DBF-F9778202331B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -15,6 +17,10 @@ Global
|
||||
{E38D3745-25B2-45EC-B47E-14C6100C9413}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E38D3745-25B2-45EC-B47E-14C6100C9413}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E38D3745-25B2-45EC-B47E-14C6100C9413}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DD8E5EB4-CA20-4C49-9DBF-F9778202331B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DD8E5EB4-CA20-4C49-9DBF-F9778202331B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DD8E5EB4-CA20-4C49-9DBF-F9778202331B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DD8E5EB4-CA20-4C49-9DBF-F9778202331B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -0,0 +1,16 @@
|
||||
using LawCompanyDataModels.Enums;
|
||||
using LawCompanyDataModels.Models;
|
||||
|
||||
namespace LawCompanyContracts.BindingModels
|
||||
{
|
||||
public class CaseBindingModel : ICaseModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public CaseStatus Status { get; set; } = CaseStatus.Неизвестен;
|
||||
public string CaseType { get; set; } = string.Empty;
|
||||
public DateTime DateCreate { get; set; }
|
||||
public DateTime? DateImplement { get; set; }
|
||||
public Dictionary<int, IClientModel> CaseClients { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using LawCompanyDataModels.Models;
|
||||
|
||||
namespace LawCompanyContracts.BindingModels
|
||||
{
|
||||
public class ClientBindingModel : IClientModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string FIO { get; set; } = string.Empty;
|
||||
public string Phone { get; set; } = string.Empty;
|
||||
public string Email { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using LawCompanyDataModels.Models;
|
||||
|
||||
namespace LawCompanyContracts.BindingModels
|
||||
{
|
||||
public class VisitBindingModel : IVisitModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public DateTime VisitDate { get; set; }
|
||||
public int HearingId { get; set; }
|
||||
public Dictionary<int, IClientModel> VisitClients { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using LawCompanyDataModels.Models;
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyContracts.SearchModels;
|
||||
using LawCompanyContracts.ViewModels;
|
||||
|
||||
namespace LawCompanyContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface ICaseLogic
|
||||
{
|
||||
List<CaseViewModel>? ReadList(CaseSearchModel? model);
|
||||
CaseViewModel? ReadElement(CaseSearchModel model);
|
||||
bool CreateCase(CaseBindingModel model);
|
||||
bool CaseAnalysis(CaseBindingModel model);
|
||||
bool CaseHearing(CaseBindingModel model);
|
||||
bool CloseCase(CaseBindingModel model);
|
||||
bool DeleteCase(CaseBindingModel model);
|
||||
bool AddClientToCase(CaseSearchModel model, IClientModel client);
|
||||
bool Update(CaseBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyContracts.SearchModels;
|
||||
using LawCompanyContracts.ViewModels;
|
||||
|
||||
namespace LawCompanyContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IClientLogic
|
||||
{
|
||||
List<ClientViewModel>? ReadList(ClientSearchModel? model);
|
||||
List<ClientViewModel>? ReadCaseElementList(CaseSearchModel? model);
|
||||
List<ClientViewModel>? ReadVisitElementList(VisitSearchModel? model);
|
||||
ClientViewModel? ReadElement(ClientSearchModel model);
|
||||
bool Create(ClientBindingModel model);
|
||||
bool Update(ClientBindingModel model);
|
||||
bool Delete(ClientBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using LawCompanyDataModels.Models;
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyContracts.SearchModels;
|
||||
using LawCompanyContracts.ViewModels;
|
||||
|
||||
namespace LawCompanyContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IVisitLogic
|
||||
{
|
||||
List<VisitViewModel>? ReadList(VisitSearchModel? model);
|
||||
VisitViewModel? ReadElement(VisitSearchModel model);
|
||||
bool Create(VisitBindingModel model);
|
||||
bool Update(VisitBindingModel model);
|
||||
bool Delete(VisitBindingModel model);
|
||||
bool AddClientToVisit(VisitSearchModel model, IClientModel client);
|
||||
}
|
||||
}
|
13
LawCompany/LawCompanyContracts/LawCompanyContracts.csproj
Normal file
13
LawCompany/LawCompanyContracts/LawCompanyContracts.csproj
Normal file
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LawCompany\LawCompanyDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,11 @@
|
||||
namespace LawCompanyContracts.SearchModels
|
||||
{
|
||||
public class CaseSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? CaseType { get; set; }
|
||||
public DateTime? DateFrom { get; set; }
|
||||
public DateTime? DateTo { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
namespace LawCompanyContracts.SearchModels
|
||||
{
|
||||
public class ClientSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? FIO { get; set; }
|
||||
public string? Phone { get; set; }
|
||||
public string? Email { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LawCompanyContracts.SearchModels
|
||||
{
|
||||
public class VisitSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public DateTime? VisitDate { get; set; }
|
||||
public int? HearingId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyContracts.SearchModels;
|
||||
using LawCompanyContracts.ViewModels;
|
||||
|
||||
namespace LawCompanyContracts.StoragesContracts
|
||||
{
|
||||
public interface ICaseStorage
|
||||
{
|
||||
List<CaseViewModel> GetFullList();
|
||||
List<CaseViewModel> GetFilteredList(CaseSearchModel model);
|
||||
CaseViewModel? GetElement(CaseSearchModel model);
|
||||
CaseViewModel? Insert(CaseBindingModel model);
|
||||
CaseViewModel? Update(CaseBindingModel model);
|
||||
CaseViewModel? Delete(CaseBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyContracts.SearchModels;
|
||||
using LawCompanyContracts.ViewModels;
|
||||
|
||||
namespace LawCompanyContracts.StoragesContracts
|
||||
{
|
||||
public interface IClientStorage
|
||||
{
|
||||
List<ClientViewModel> GetFullList();
|
||||
List<ClientViewModel> GetFilteredList(ClientSearchModel model);
|
||||
List<ClientViewModel> GetClientCaseList(CaseSearchModel model);
|
||||
List<ClientViewModel> GetClientVisitList(VisitSearchModel model);
|
||||
ClientViewModel? GetElement(ClientSearchModel model);
|
||||
ClientViewModel? Insert(ClientBindingModel model);
|
||||
ClientViewModel? Update(ClientBindingModel model);
|
||||
ClientViewModel? Delete(ClientBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyContracts.SearchModels;
|
||||
using LawCompanyContracts.ViewModels;
|
||||
|
||||
namespace LawCompanyContracts.StoragesContracts
|
||||
{
|
||||
public interface IVisitStorage
|
||||
{
|
||||
List<VisitViewModel> GetFullList();
|
||||
List<VisitViewModel> GetFilteredList(VisitSearchModel model);
|
||||
VisitViewModel? GetElement(VisitSearchModel model);
|
||||
VisitViewModel? Insert(VisitBindingModel model);
|
||||
VisitViewModel? Update(VisitBindingModel model);
|
||||
VisitViewModel? Delete(VisitBindingModel model);
|
||||
}
|
||||
}
|
22
LawCompany/LawCompanyContracts/ViewModels/CaseViewModel.cs
Normal file
22
LawCompany/LawCompanyContracts/ViewModels/CaseViewModel.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using LawCompanyDataModels.Enums;
|
||||
using LawCompanyDataModels.Models;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace LawCompanyContracts.ViewModels
|
||||
{
|
||||
public class CaseViewModel : ICaseModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Название")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
[DisplayName("Статус")]
|
||||
public CaseStatus Status { get; set; } = CaseStatus.Неизвестен;
|
||||
[DisplayName("Вид производства")]
|
||||
public string CaseType { get; set; } = string.Empty;
|
||||
[DisplayName("Дата создания")]
|
||||
public DateTime DateCreate { get; set; }
|
||||
[DisplayName("Дата выполнения")]
|
||||
public DateTime? DateImplement { get; set; }
|
||||
public Dictionary<int, IClientModel> CaseClients { get; set; } = new();
|
||||
}
|
||||
}
|
16
LawCompany/LawCompanyContracts/ViewModels/ClientViewModel.cs
Normal file
16
LawCompany/LawCompanyContracts/ViewModels/ClientViewModel.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using LawCompanyDataModels.Models;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace LawCompanyContracts.ViewModels
|
||||
{
|
||||
public class ClientViewModel : IClientModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("ФИО клиента")]
|
||||
public string FIO { get; set; } = string.Empty;
|
||||
[DisplayName("Email клиента")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
[DisplayName("Телефон клиента")]
|
||||
public string Phone { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
14
LawCompany/LawCompanyContracts/ViewModels/VisitViewModel.cs
Normal file
14
LawCompany/LawCompanyContracts/ViewModels/VisitViewModel.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using LawCompanyDataModels.Models;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace LawCompanyContracts.ViewModels
|
||||
{
|
||||
public class VisitViewModel : IVisitModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Дата визита")]
|
||||
public DateTime VisitDate { get; set; }
|
||||
public int HearingId { get; set; }
|
||||
public Dictionary<int, IClientModel> VisitClients { get; set; } = new();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user