From 13e4dddbbec432c9db6b3a6881b72e27e5104230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=A7=D0=B5=D1=80?= =?UTF-8?q?=D0=BD=D1=8B=D1=88=D0=BE=D0=B2?= Date: Sat, 8 Apr 2023 03:39:38 +0400 Subject: [PATCH] =?UTF-8?q?2.=20=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B5=D0=B9=20=D0=B8=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=82=D1=80=D0=B0=D0=BA=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LawFirm/LawFirm.sln | 8 +- LawFirm/LawFirm/Form1.Designer.cs | 39 ------ LawFirm/LawFirm/Form1.cs | 10 -- LawFirm/LawFirm/Form1.resx | 120 ------------------ .../{LawFirm.csproj => LawFirmView.csproj} | 0 LawFirm/LawFirm/Program.cs | 4 +- .../BindingModels/CaseBindingModel.cs | 17 +++ .../BindingModels/CustomerBindingModel.cs | 18 +++ .../BindingModels/ItemBindingModel.cs | 17 +++ .../BindingModels/PaymentBindingModel.cs | 17 +++ .../BindingModels/ReportBindingModel.cs | 25 ++++ .../BindingModels/ServiceBindingModel.cs | 18 +++ .../BusinessLogicsContracts/ICaseLogic.cs | 20 +++ .../BusinessLogicsContracts/ICustomerLogic.cs | 20 +++ .../BusinessLogicsContracts/IItemLogic.cs | 20 +++ .../BusinessLogicsContracts/IPaymentLogic.cs | 20 +++ .../BusinessLogicsContracts/IServiceLogic.cs | 20 +++ LawFirm/LawFirmContracts/Id/IId.cs | 16 +++ .../LawFirmContracts/LawFirmContracts.csproj | 13 ++ LawFirm/LawFirmContracts/Models/ICaseModel.cs | 28 ++++ .../LawFirmContracts/Models/ICustomerModel.cs | 29 +++++ LawFirm/LawFirmContracts/Models/IItemModel.cs | 25 ++++ .../LawFirmContracts/Models/IPaymentModel.cs | 28 ++++ .../LawFirmContracts/Models/IServiceModel.cs | 29 +++++ .../SearchModels/CaseSearchModel.cs | 13 ++ .../SearchModels/CustomerSearchModel.cs | 13 ++ .../SearchModels/ItemSearchModel.cs | 13 ++ .../SearchModels/PaymentSearchModel.cs | 13 ++ .../SearchModels/ServiceSearchModel.cs | 13 ++ .../ViewModels/CaseViewModel.cs | 20 +++ .../ViewModels/CustomerViewModel.cs | 23 ++++ .../ViewModels/ItemViewModel.cs | 20 +++ .../ViewModels/PaymentViewModel.cs | 20 +++ .../ViewModels/ReportCasesViewModel.cs | 15 +++ .../ViewModels/ReportLawServicesViewModel.cs | 15 +++ .../ViewModels/ServiceViewModel.cs | 21 +++ 36 files changed, 588 insertions(+), 172 deletions(-) delete mode 100644 LawFirm/LawFirm/Form1.Designer.cs delete mode 100644 LawFirm/LawFirm/Form1.cs delete mode 100644 LawFirm/LawFirm/Form1.resx rename LawFirm/LawFirm/{LawFirm.csproj => LawFirmView.csproj} (100%) create mode 100644 LawFirm/LawFirmContracts/BindingModels/CaseBindingModel.cs create mode 100644 LawFirm/LawFirmContracts/BindingModels/CustomerBindingModel.cs create mode 100644 LawFirm/LawFirmContracts/BindingModels/ItemBindingModel.cs create mode 100644 LawFirm/LawFirmContracts/BindingModels/PaymentBindingModel.cs create mode 100644 LawFirm/LawFirmContracts/BindingModels/ReportBindingModel.cs create mode 100644 LawFirm/LawFirmContracts/BindingModels/ServiceBindingModel.cs create mode 100644 LawFirm/LawFirmContracts/BusinessLogicsContracts/ICaseLogic.cs create mode 100644 LawFirm/LawFirmContracts/BusinessLogicsContracts/ICustomerLogic.cs create mode 100644 LawFirm/LawFirmContracts/BusinessLogicsContracts/IItemLogic.cs create mode 100644 LawFirm/LawFirmContracts/BusinessLogicsContracts/IPaymentLogic.cs create mode 100644 LawFirm/LawFirmContracts/BusinessLogicsContracts/IServiceLogic.cs create mode 100644 LawFirm/LawFirmContracts/Id/IId.cs create mode 100644 LawFirm/LawFirmContracts/LawFirmContracts.csproj create mode 100644 LawFirm/LawFirmContracts/Models/ICaseModel.cs create mode 100644 LawFirm/LawFirmContracts/Models/ICustomerModel.cs create mode 100644 LawFirm/LawFirmContracts/Models/IItemModel.cs create mode 100644 LawFirm/LawFirmContracts/Models/IPaymentModel.cs create mode 100644 LawFirm/LawFirmContracts/Models/IServiceModel.cs create mode 100644 LawFirm/LawFirmContracts/SearchModels/CaseSearchModel.cs create mode 100644 LawFirm/LawFirmContracts/SearchModels/CustomerSearchModel.cs create mode 100644 LawFirm/LawFirmContracts/SearchModels/ItemSearchModel.cs create mode 100644 LawFirm/LawFirmContracts/SearchModels/PaymentSearchModel.cs create mode 100644 LawFirm/LawFirmContracts/SearchModels/ServiceSearchModel.cs create mode 100644 LawFirm/LawFirmContracts/ViewModels/CaseViewModel.cs create mode 100644 LawFirm/LawFirmContracts/ViewModels/CustomerViewModel.cs create mode 100644 LawFirm/LawFirmContracts/ViewModels/ItemViewModel.cs create mode 100644 LawFirm/LawFirmContracts/ViewModels/PaymentViewModel.cs create mode 100644 LawFirm/LawFirmContracts/ViewModels/ReportCasesViewModel.cs create mode 100644 LawFirm/LawFirmContracts/ViewModels/ReportLawServicesViewModel.cs create mode 100644 LawFirm/LawFirmContracts/ViewModels/ServiceViewModel.cs diff --git a/LawFirm/LawFirm.sln b/LawFirm/LawFirm.sln index be642bc..a563901 100644 --- a/LawFirm/LawFirm.sln +++ b/LawFirm/LawFirm.sln @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.4.33213.308 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LawFirm", "LawFirm\LawFirm.csproj", "{599A2ED4-41F4-4D39-8A30-9474710AC617}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LawFirmView", "LawFirm\LawFirmView.csproj", "{599A2ED4-41F4-4D39-8A30-9474710AC617}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LawFirmContracts", "LawFirmContracts\LawFirmContracts.csproj", "{E2306BF5-FCE9-4195-85BF-22C35495A8D0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,6 +17,10 @@ Global {599A2ED4-41F4-4D39-8A30-9474710AC617}.Debug|Any CPU.Build.0 = Debug|Any CPU {599A2ED4-41F4-4D39-8A30-9474710AC617}.Release|Any CPU.ActiveCfg = Release|Any CPU {599A2ED4-41F4-4D39-8A30-9474710AC617}.Release|Any CPU.Build.0 = Release|Any CPU + {E2306BF5-FCE9-4195-85BF-22C35495A8D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E2306BF5-FCE9-4195-85BF-22C35495A8D0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E2306BF5-FCE9-4195-85BF-22C35495A8D0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E2306BF5-FCE9-4195-85BF-22C35495A8D0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/LawFirm/LawFirm/Form1.Designer.cs b/LawFirm/LawFirm/Form1.Designer.cs deleted file mode 100644 index cbe84f0..0000000 --- a/LawFirm/LawFirm/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace LawFirm -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Text = "Form1"; - } - - #endregion - } -} \ No newline at end of file diff --git a/LawFirm/LawFirm/Form1.cs b/LawFirm/LawFirm/Form1.cs deleted file mode 100644 index d090cf4..0000000 --- a/LawFirm/LawFirm/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace LawFirm -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/LawFirm/LawFirm/Form1.resx b/LawFirm/LawFirm/Form1.resx deleted file mode 100644 index 1af7de1..0000000 --- a/LawFirm/LawFirm/Form1.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/LawFirm/LawFirm/LawFirm.csproj b/LawFirm/LawFirm/LawFirmView.csproj similarity index 100% rename from LawFirm/LawFirm/LawFirm.csproj rename to LawFirm/LawFirm/LawFirmView.csproj diff --git a/LawFirm/LawFirm/Program.cs b/LawFirm/LawFirm/Program.cs index 45182ca..178355f 100644 --- a/LawFirm/LawFirm/Program.cs +++ b/LawFirm/LawFirm/Program.cs @@ -1,4 +1,4 @@ -namespace LawFirm +namespace LawFirmView { internal static class Program { @@ -11,7 +11,7 @@ namespace LawFirm // To customize application configuration such as set high DPI settings or default font, // see https://aka.ms/applicationconfiguration. ApplicationConfiguration.Initialize(); - Application.Run(new Form1()); + Application.Run(); } } } \ No newline at end of file diff --git a/LawFirm/LawFirmContracts/BindingModels/CaseBindingModel.cs b/LawFirm/LawFirmContracts/BindingModels/CaseBindingModel.cs new file mode 100644 index 0000000..5d1b95d --- /dev/null +++ b/LawFirm/LawFirmContracts/BindingModels/CaseBindingModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using LawFirmContracts.Models; + +namespace LawFirmContracts.BindingModels +{ + public class CaseBindingModel : ICaseModel + { + public int Id { get; set; } + public string Name { get; set; } = string.Empty; + public DateTime DateCreated { get; set; } = DateTime.Now; + public int CustomerId { get; set; } + } +} diff --git a/LawFirm/LawFirmContracts/BindingModels/CustomerBindingModel.cs b/LawFirm/LawFirmContracts/BindingModels/CustomerBindingModel.cs new file mode 100644 index 0000000..961d4b2 --- /dev/null +++ b/LawFirm/LawFirmContracts/BindingModels/CustomerBindingModel.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using LawFirmContracts.Models; + +namespace LawFirmContracts.BindingModels +{ + public class CustomerBindingModel : ICustomerModel + { + public int Id { get; set; } + public string Login { get; set; } = string.Empty; + public string Password { get; set; } = string.Empty; + public string Name { get; set; } = string.Empty; + public string Surname { get; set; } = string.Empty; + } +} diff --git a/LawFirm/LawFirmContracts/BindingModels/ItemBindingModel.cs b/LawFirm/LawFirmContracts/BindingModels/ItemBindingModel.cs new file mode 100644 index 0000000..915d389 --- /dev/null +++ b/LawFirm/LawFirmContracts/BindingModels/ItemBindingModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using LawFirmContracts.Models; + +namespace LawFirmContracts.BindingModels +{ + public class ItemBindingModel : IItemModel + { + public int Id { get; set; } + public string Name { get; set; } = string.Empty; + public decimal Price { get; set; } + public int PaymentId { get; set; } + } +} diff --git a/LawFirm/LawFirmContracts/BindingModels/PaymentBindingModel.cs b/LawFirm/LawFirmContracts/BindingModels/PaymentBindingModel.cs new file mode 100644 index 0000000..bd2e2c4 --- /dev/null +++ b/LawFirm/LawFirmContracts/BindingModels/PaymentBindingModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using LawFirmContracts.Models; + +namespace LawFirmContracts.BindingModels +{ + public class PaymentBindingModel : IPaymentModel + { + public int Id { get; set; } + public DateTime DatePayment { get; set; } + public decimal Sum { get; set; } + public int CaseId { get; set; } + } +} diff --git a/LawFirm/LawFirmContracts/BindingModels/ReportBindingModel.cs b/LawFirm/LawFirmContracts/BindingModels/ReportBindingModel.cs new file mode 100644 index 0000000..6b7c7c1 --- /dev/null +++ b/LawFirm/LawFirmContracts/BindingModels/ReportBindingModel.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LawFirmContracts.BindingModels +{ + public class ReportBindingModel + { + public string FileName { get; set; } = string.Empty; + /// + /// Выбранные работы для отчета по заявкам + /// + public List? SelectedWorks { get; set; } + /// + /// Начало периода для отчета по оплатам + /// + public DateTime? DateFrom { get; set; } + /// + /// Конец периода для отчета по оплатам + /// + public DateTime? DateTo { get; set; } + } +} diff --git a/LawFirm/LawFirmContracts/BindingModels/ServiceBindingModel.cs b/LawFirm/LawFirmContracts/BindingModels/ServiceBindingModel.cs new file mode 100644 index 0000000..3ea9d88 --- /dev/null +++ b/LawFirm/LawFirmContracts/BindingModels/ServiceBindingModel.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using LawFirmContracts.Models; + +namespace LawFirmContracts.BindingModels +{ + public class ServiceBindingModel : IServiceModel + { + public int Id { get; set; } + public string Name { get; set; } = string.Empty; + public decimal Price { get; set; } + public int CaseId { get; set; } + public int ItemId { get; set; } + } +} diff --git a/LawFirm/LawFirmContracts/BusinessLogicsContracts/ICaseLogic.cs b/LawFirm/LawFirmContracts/BusinessLogicsContracts/ICaseLogic.cs new file mode 100644 index 0000000..478ff53 --- /dev/null +++ b/LawFirm/LawFirmContracts/BusinessLogicsContracts/ICaseLogic.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using LawFirmContracts.BindingModels; +using LawFirmContracts.SearchModels; +using LawFirmContracts.ViewModels; + +namespace LawFirmContracts.BusinessLogicsContracts +{ + public interface ICaseLogic + { + List? ReadList(CaseSearchModel? model); + CaseViewModel? ReadElement(CaseSearchModel model); + bool Create(CaseBindingModel model); + bool Update(CaseBindingModel model); + bool Delete(CaseBindingModel model); + } +} diff --git a/LawFirm/LawFirmContracts/BusinessLogicsContracts/ICustomerLogic.cs b/LawFirm/LawFirmContracts/BusinessLogicsContracts/ICustomerLogic.cs new file mode 100644 index 0000000..a3ff1a6 --- /dev/null +++ b/LawFirm/LawFirmContracts/BusinessLogicsContracts/ICustomerLogic.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using LawFirmContracts.BindingModels; +using LawFirmContracts.SearchModels; +using LawFirmContracts.ViewModels; + +namespace LawFirmContracts.BusinessLogicsContracts +{ + public interface ICustomerLogic + { + List? ReadList(CustomerSearchModel? model); + CustomerViewModel? ReadElement(CustomerSearchModel model); + bool Create(CustomerBindingModel model); + bool Update(CustomerBindingModel model); + bool Delete(CustomerBindingModel model); + } +} diff --git a/LawFirm/LawFirmContracts/BusinessLogicsContracts/IItemLogic.cs b/LawFirm/LawFirmContracts/BusinessLogicsContracts/IItemLogic.cs new file mode 100644 index 0000000..95d0392 --- /dev/null +++ b/LawFirm/LawFirmContracts/BusinessLogicsContracts/IItemLogic.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using LawFirmContracts.BindingModels; +using LawFirmContracts.SearchModels; +using LawFirmContracts.ViewModels; + +namespace LawFirmContracts.BusinessLogicsContracts +{ + public interface IItemLogic + { + List? ReadList(ItemSearchModel? model); + ItemViewModel? ReadElement(ItemSearchModel model); + bool Create(ItemBindingModel model); + bool Update(ItemBindingModel model); + bool Delete(ItemBindingModel model); + } +} diff --git a/LawFirm/LawFirmContracts/BusinessLogicsContracts/IPaymentLogic.cs b/LawFirm/LawFirmContracts/BusinessLogicsContracts/IPaymentLogic.cs new file mode 100644 index 0000000..08b87f6 --- /dev/null +++ b/LawFirm/LawFirmContracts/BusinessLogicsContracts/IPaymentLogic.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using LawFirmContracts.BindingModels; +using LawFirmContracts.SearchModels; +using LawFirmContracts.ViewModels; + +namespace LawFirmContracts.BusinessLogicsContracts +{ + public interface IPaymentLogic + { + List? ReadList(PaymentSearchModel? model); + PaymentViewModel? ReadElement(PaymentSearchModel model); + bool Create(PaymentBindingModel model); + bool Update(PaymentBindingModel model); + bool Delete(PaymentBindingModel model); + } +} diff --git a/LawFirm/LawFirmContracts/BusinessLogicsContracts/IServiceLogic.cs b/LawFirm/LawFirmContracts/BusinessLogicsContracts/IServiceLogic.cs new file mode 100644 index 0000000..97d22ff --- /dev/null +++ b/LawFirm/LawFirmContracts/BusinessLogicsContracts/IServiceLogic.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using LawFirmContracts.BindingModels; +using LawFirmContracts.SearchModels; +using LawFirmContracts.ViewModels; + +namespace LawFirmContracts.BusinessLogicsContracts +{ + public interface IServiceLogic + { + List? ReadList(ServiceSearchModel? model); + ServiceViewModel? ReadElement(ServiceSearchModel model); + bool Create(ServiceBindingModel model); + bool Update(ServiceBindingModel model); + bool Delete(ServiceBindingModel model); + } +} diff --git a/LawFirm/LawFirmContracts/Id/IId.cs b/LawFirm/LawFirmContracts/Id/IId.cs new file mode 100644 index 0000000..fa675c8 --- /dev/null +++ b/LawFirm/LawFirmContracts/Id/IId.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LawFirmContracts.Id +{ + public interface IId + { + /// + /// Id + /// + int Id { get; } + } +} diff --git a/LawFirm/LawFirmContracts/LawFirmContracts.csproj b/LawFirm/LawFirmContracts/LawFirmContracts.csproj new file mode 100644 index 0000000..453d908 --- /dev/null +++ b/LawFirm/LawFirmContracts/LawFirmContracts.csproj @@ -0,0 +1,13 @@ + + + + net6.0 + enable + enable + + + + + + + diff --git a/LawFirm/LawFirmContracts/Models/ICaseModel.cs b/LawFirm/LawFirmContracts/Models/ICaseModel.cs new file mode 100644 index 0000000..cac5ab0 --- /dev/null +++ b/LawFirm/LawFirmContracts/Models/ICaseModel.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using LawFirmContracts.Id; + +namespace LawFirmContracts.Models +{ + /// + /// Дело + /// + public interface ICaseModel : IId + { + /// + /// Описание + /// + string Name { get; } + /// + /// Дата создания + /// + DateTime DateCreated { get; } + /// + /// Id клиента + /// + int CustomerId { get; } + } +} diff --git a/LawFirm/LawFirmContracts/Models/ICustomerModel.cs b/LawFirm/LawFirmContracts/Models/ICustomerModel.cs new file mode 100644 index 0000000..bfb01b1 --- /dev/null +++ b/LawFirm/LawFirmContracts/Models/ICustomerModel.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using LawFirmContracts.Id; + +namespace LawFirmContracts.Models +{ + public interface ICustomerModel : IId + { + /// + /// Логин + /// + string Login { get; } + /// + /// Пароль + /// + string Password { get; } + /// + /// Имя + /// + string Name { get; } + /// + /// Фамилия + /// + string Surname { get; } + } +} diff --git a/LawFirm/LawFirmContracts/Models/IItemModel.cs b/LawFirm/LawFirmContracts/Models/IItemModel.cs new file mode 100644 index 0000000..c98ae4e --- /dev/null +++ b/LawFirm/LawFirmContracts/Models/IItemModel.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using LawFirmContracts.Id; + +namespace LawFirmContracts.Models +{ + public interface IItemModel : IId + { + /// + /// Наименование + /// + string Name { get; } + /// + /// Цена + /// + decimal Price { get; } + /// + /// Id оплаты + /// + int PaymentId { get; } + } +} diff --git a/LawFirm/LawFirmContracts/Models/IPaymentModel.cs b/LawFirm/LawFirmContracts/Models/IPaymentModel.cs new file mode 100644 index 0000000..b689c19 --- /dev/null +++ b/LawFirm/LawFirmContracts/Models/IPaymentModel.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using LawFirmContracts.Id; + +namespace LawFirmContracts.Models +{ + /// + /// Оплата + /// + public interface IPaymentModel : IId + { + /// + /// Дата оплаты + /// + DateTime DatePayment { get; } + /// + /// Сумма оплаты + /// + decimal Sum { get; } + /// + /// Id дела + /// + int CaseId { get; } + } +} diff --git a/LawFirm/LawFirmContracts/Models/IServiceModel.cs b/LawFirm/LawFirmContracts/Models/IServiceModel.cs new file mode 100644 index 0000000..3754cb0 --- /dev/null +++ b/LawFirm/LawFirmContracts/Models/IServiceModel.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using LawFirmContracts.Id; + +namespace LawFirmContracts.Models +{ + public interface IServiceModel : IId + { + /// + /// Наименование + /// + string Name { get; } + /// + /// Цена + /// + decimal Price { get; } + /// + /// Id статьи затрат + /// + int ItemId { get; } + /// + /// Id дела + /// + int CaseId { get; } + } +} diff --git a/LawFirm/LawFirmContracts/SearchModels/CaseSearchModel.cs b/LawFirm/LawFirmContracts/SearchModels/CaseSearchModel.cs new file mode 100644 index 0000000..96d2862 --- /dev/null +++ b/LawFirm/LawFirmContracts/SearchModels/CaseSearchModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LawFirmContracts.SearchModels +{ + public class CaseSearchModel + { + public int? Id { get; set; } + } +} diff --git a/LawFirm/LawFirmContracts/SearchModels/CustomerSearchModel.cs b/LawFirm/LawFirmContracts/SearchModels/CustomerSearchModel.cs new file mode 100644 index 0000000..4477c85 --- /dev/null +++ b/LawFirm/LawFirmContracts/SearchModels/CustomerSearchModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LawFirmContracts.SearchModels +{ + public class CustomerSearchModel + { + public int? Id { get; set; } + } +} diff --git a/LawFirm/LawFirmContracts/SearchModels/ItemSearchModel.cs b/LawFirm/LawFirmContracts/SearchModels/ItemSearchModel.cs new file mode 100644 index 0000000..68d70da --- /dev/null +++ b/LawFirm/LawFirmContracts/SearchModels/ItemSearchModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LawFirmContracts.SearchModels +{ + public class ItemSearchModel + { + public int? Id { get; set; } + } +} diff --git a/LawFirm/LawFirmContracts/SearchModels/PaymentSearchModel.cs b/LawFirm/LawFirmContracts/SearchModels/PaymentSearchModel.cs new file mode 100644 index 0000000..2040466 --- /dev/null +++ b/LawFirm/LawFirmContracts/SearchModels/PaymentSearchModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LawFirmContracts.SearchModels +{ + public class PaymentSearchModel + { + public int? Id { get; set; } + } +} diff --git a/LawFirm/LawFirmContracts/SearchModels/ServiceSearchModel.cs b/LawFirm/LawFirmContracts/SearchModels/ServiceSearchModel.cs new file mode 100644 index 0000000..3b52b66 --- /dev/null +++ b/LawFirm/LawFirmContracts/SearchModels/ServiceSearchModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LawFirmContracts.SearchModels +{ + public class ServiceSearchModel + { + public int? Id { get; set; } + } +} diff --git a/LawFirm/LawFirmContracts/ViewModels/CaseViewModel.cs b/LawFirm/LawFirmContracts/ViewModels/CaseViewModel.cs new file mode 100644 index 0000000..01b67e5 --- /dev/null +++ b/LawFirm/LawFirmContracts/ViewModels/CaseViewModel.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.ComponentModel; +using LawFirmContracts.Models; + +namespace LawFirmContracts.ViewModels +{ + public class CaseViewModel : ICaseModel + { + public int Id { get; set; } + [DisplayName("Наименование дела")] + public string Name { get; set; } = string.Empty; + [DisplayName("Дата создания")] + public DateTime DateCreated { get; set; } = DateTime.Now; + public int CustomerId { get; set; } + } +} diff --git a/LawFirm/LawFirmContracts/ViewModels/CustomerViewModel.cs b/LawFirm/LawFirmContracts/ViewModels/CustomerViewModel.cs new file mode 100644 index 0000000..3d3cc25 --- /dev/null +++ b/LawFirm/LawFirmContracts/ViewModels/CustomerViewModel.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.ComponentModel; +using LawFirmContracts.Models; + +namespace LawFirmContracts.ViewModels +{ + public class CustomerViewModel : ICustomerModel + { + public int Id { get; set; } + [DisplayName("Логин")] + public string Login { get; set; } = string.Empty; + [DisplayName("Пароль")] + public string Password { get; set; } = string.Empty; + [DisplayName("Имя")] + public string Name { get; set; } = string.Empty; + [DisplayName("Фамилия")] + public string Surname { get; set; } = string.Empty; + } +} diff --git a/LawFirm/LawFirmContracts/ViewModels/ItemViewModel.cs b/LawFirm/LawFirmContracts/ViewModels/ItemViewModel.cs new file mode 100644 index 0000000..d86f7b5 --- /dev/null +++ b/LawFirm/LawFirmContracts/ViewModels/ItemViewModel.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.ComponentModel; +using LawFirmContracts.Models; + +namespace LawFirmContracts.ViewModels +{ + public class ItemViewModel : IItemModel + { + public int Id { get; set; } + [DisplayName("Наименование")] + public string Name { get; set; } = string.Empty; + [DisplayName("Цена")] + public decimal Price { get; set; } + public int PaymentId { get; set; } + } +} diff --git a/LawFirm/LawFirmContracts/ViewModels/PaymentViewModel.cs b/LawFirm/LawFirmContracts/ViewModels/PaymentViewModel.cs new file mode 100644 index 0000000..6cc0def --- /dev/null +++ b/LawFirm/LawFirmContracts/ViewModels/PaymentViewModel.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.ComponentModel; +using LawFirmContracts.Models; + +namespace LawFirmContracts.ViewModels +{ + public class PaymentViewModel : IPaymentModel + { + public int Id { get; set; } + [DisplayName("Дата оплаты")] + public DateTime DatePayment { get; set; } + [DisplayName("Сумма")] + public decimal Sum { get; set; } + public int CaseId { get; set; } + } +} diff --git a/LawFirm/LawFirmContracts/ViewModels/ReportCasesViewModel.cs b/LawFirm/LawFirmContracts/ViewModels/ReportCasesViewModel.cs new file mode 100644 index 0000000..283695b --- /dev/null +++ b/LawFirm/LawFirmContracts/ViewModels/ReportCasesViewModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LawFirmContracts.ViewModels +{ + /// + /// Модель для получения всех дел для отчета + /// + public class ReportCasesViewModel + { + } +} diff --git a/LawFirm/LawFirmContracts/ViewModels/ReportLawServicesViewModel.cs b/LawFirm/LawFirmContracts/ViewModels/ReportLawServicesViewModel.cs new file mode 100644 index 0000000..602ae98 --- /dev/null +++ b/LawFirm/LawFirmContracts/ViewModels/ReportLawServicesViewModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LawFirmContracts.ViewModels +{ + /// + /// Модель для получения всех услуг для отчета + /// + public class ReportLawServicesViewModel + { + } +} diff --git a/LawFirm/LawFirmContracts/ViewModels/ServiceViewModel.cs b/LawFirm/LawFirmContracts/ViewModels/ServiceViewModel.cs new file mode 100644 index 0000000..cb17b0a --- /dev/null +++ b/LawFirm/LawFirmContracts/ViewModels/ServiceViewModel.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.ComponentModel; +using LawFirmContracts.Models; + +namespace LawFirmContracts.ViewModels +{ + public class ServiceViewModel : IServiceModel + { + public int Id { get; set; } + [DisplayName("Наименование")] + public string Name { get; set; } = string.Empty; + [DisplayName("Стоимость услуги")] + public decimal Price { get; set; } + public int CaseId { get; set; } + public int ItemId { get; set; } + } +}