diff --git a/Storehouse/Storehouse.sln b/Storehouse/Storehouse.sln new file mode 100644 index 0000000..9b368a0 --- /dev/null +++ b/Storehouse/Storehouse.sln @@ -0,0 +1,49 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34024.191 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StorehouseView", "StorehouseView\StorehouseView.csproj", "{2A1C5191-CC20-4015-82E3-AEF00D33C09A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StorehouseDataModels", "StorehouseDataModels\StorehouseDataModels.csproj", "{B1D926C1-F37C-4530-A3C0-02EAC8113B3E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StorehouseContracts", "StorehouseContracts\StorehouseContracts.csproj", "{D5258E85-B904-4299-A07D-1F55B71DB0F8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StorehouseBusinessLogics", "StorehouseBusinessLogics\StorehouseBusinessLogics.csproj", "{3F171169-DA8D-4CE6-B100-BDD3A4FEDA77}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StorehouseDatabase", "StorehouseDatabase\StorehouseDatabase.csproj", "{F2EA8A47-C7B6-4C2B-8AD0-0F3C0C24DF74}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2A1C5191-CC20-4015-82E3-AEF00D33C09A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A1C5191-CC20-4015-82E3-AEF00D33C09A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A1C5191-CC20-4015-82E3-AEF00D33C09A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A1C5191-CC20-4015-82E3-AEF00D33C09A}.Release|Any CPU.Build.0 = Release|Any CPU + {B1D926C1-F37C-4530-A3C0-02EAC8113B3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B1D926C1-F37C-4530-A3C0-02EAC8113B3E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B1D926C1-F37C-4530-A3C0-02EAC8113B3E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B1D926C1-F37C-4530-A3C0-02EAC8113B3E}.Release|Any CPU.Build.0 = Release|Any CPU + {D5258E85-B904-4299-A07D-1F55B71DB0F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D5258E85-B904-4299-A07D-1F55B71DB0F8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5258E85-B904-4299-A07D-1F55B71DB0F8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D5258E85-B904-4299-A07D-1F55B71DB0F8}.Release|Any CPU.Build.0 = Release|Any CPU + {3F171169-DA8D-4CE6-B100-BDD3A4FEDA77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3F171169-DA8D-4CE6-B100-BDD3A4FEDA77}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3F171169-DA8D-4CE6-B100-BDD3A4FEDA77}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3F171169-DA8D-4CE6-B100-BDD3A4FEDA77}.Release|Any CPU.Build.0 = Release|Any CPU + {F2EA8A47-C7B6-4C2B-8AD0-0F3C0C24DF74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2EA8A47-C7B6-4C2B-8AD0-0F3C0C24DF74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2EA8A47-C7B6-4C2B-8AD0-0F3C0C24DF74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2EA8A47-C7B6-4C2B-8AD0-0F3C0C24DF74}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {1ED68645-6072-459C-B84E-8E3AD572EBFA} + EndGlobalSection +EndGlobal diff --git a/Storehouse/StorehouseBusinessLogics/StorehouseBusinessLogics.csproj b/Storehouse/StorehouseBusinessLogics/StorehouseBusinessLogics.csproj new file mode 100644 index 0000000..132c02c --- /dev/null +++ b/Storehouse/StorehouseBusinessLogics/StorehouseBusinessLogics.csproj @@ -0,0 +1,9 @@ + + + + net6.0 + enable + enable + + + diff --git a/Storehouse/StorehouseContracts/BindingModels/ClientBindingModel.cs b/Storehouse/StorehouseContracts/BindingModels/ClientBindingModel.cs new file mode 100644 index 0000000..75f41c6 --- /dev/null +++ b/Storehouse/StorehouseContracts/BindingModels/ClientBindingModel.cs @@ -0,0 +1,12 @@ +using StorehouseDataModels.Models; + +namespace StorehouseContracts.BindingModels +{ + public class ClientBindingModel : IClientModel + { + public int Id { get; set; } + public string ClientFIO { get; set; } = string.Empty; + public string Email { get; set; } = string.Empty; + public string Password { get; set; } = string.Empty; + } +} diff --git a/Storehouse/StorehouseContracts/BindingModels/ProductBindingModel.cs b/Storehouse/StorehouseContracts/BindingModels/ProductBindingModel.cs new file mode 100644 index 0000000..193b519 --- /dev/null +++ b/Storehouse/StorehouseContracts/BindingModels/ProductBindingModel.cs @@ -0,0 +1,13 @@ +using StorehouseDataModels.Enums; +using StorehouseDataModels.Models; + +namespace StorehouseContracts.BindingModels +{ + public class ProductBindingModel : IProductModel + { + public int Id { get; set; } + public string ProductName { get; set; } = string.Empty; + public int ProductNum { get; set; } + public ProductType ProductType { get; set; } + } +} diff --git a/Storehouse/StorehouseContracts/BindingModels/ProviderBindingModel.cs b/Storehouse/StorehouseContracts/BindingModels/ProviderBindingModel.cs new file mode 100644 index 0000000..c285b4c --- /dev/null +++ b/Storehouse/StorehouseContracts/BindingModels/ProviderBindingModel.cs @@ -0,0 +1,12 @@ +using StorehouseDataModels.Models; + +namespace StorehouseContracts.BindingModels +{ + public class ProviderBindingModel : IProviderModel + { + public int Id { get; set; } + public string ProviderFIO { get; set; } = string.Empty; + public string Email { get; set; } = string.Empty; + public string Password { get; set; } = string.Empty; + } +} diff --git a/Storehouse/StorehouseContracts/BindingModels/SaleBindingModel.cs b/Storehouse/StorehouseContracts/BindingModels/SaleBindingModel.cs new file mode 100644 index 0000000..83f040b --- /dev/null +++ b/Storehouse/StorehouseContracts/BindingModels/SaleBindingModel.cs @@ -0,0 +1,12 @@ +using StorehouseDataModels.Models; + +namespace StorehouseContracts.BindingModels +{ + public class SaleBindingModel : ISaleModel + { + public int Id { get; set; } + public int ClientId { get; set; } + public int ProductId { get; set; } + public int SaleNum { get; set; } + } +} diff --git a/Storehouse/StorehouseContracts/BindingModels/SupplyBindingModel.cs b/Storehouse/StorehouseContracts/BindingModels/SupplyBindingModel.cs new file mode 100644 index 0000000..d9a4e6f --- /dev/null +++ b/Storehouse/StorehouseContracts/BindingModels/SupplyBindingModel.cs @@ -0,0 +1,12 @@ +using StorehouseDataModels.Models; + +namespace StorehouseContracts.BindingModels +{ + public class SupplyBindingModel : ISupplyModel + { + public int Id { get; set; } + public int ProviderId { get; set; } + public int ProductId { get; set; } + public int SupplyNum { get; set; } + } +} diff --git a/Storehouse/StorehouseContracts/BusinessLogicsContracts/IClientLogic.cs b/Storehouse/StorehouseContracts/BusinessLogicsContracts/IClientLogic.cs new file mode 100644 index 0000000..d6d204a --- /dev/null +++ b/Storehouse/StorehouseContracts/BusinessLogicsContracts/IClientLogic.cs @@ -0,0 +1,15 @@ +using StorehouseContracts.BindingModels; +using StorehouseContracts.SearchModels; +using StorehouseContracts.ViewModels; + +namespace StorehouseContracts.BusinessLogicsContracts +{ + public interface IClientLogic + { + List? ReadList(ClientSearchModel? model); + ClientViewModel? ReadElement(ClientSearchModel model); + bool Create(ClientBindingModel model); + bool Update(ClientBindingModel model); + bool Delete(ClientBindingModel model); + } +} diff --git a/Storehouse/StorehouseContracts/BusinessLogicsContracts/IProductLogic.cs b/Storehouse/StorehouseContracts/BusinessLogicsContracts/IProductLogic.cs new file mode 100644 index 0000000..4e583b1 --- /dev/null +++ b/Storehouse/StorehouseContracts/BusinessLogicsContracts/IProductLogic.cs @@ -0,0 +1,15 @@ +using StorehouseContracts.BindingModels; +using StorehouseContracts.SearchModels; +using StorehouseContracts.ViewModels; + +namespace StorehouseContracts.BusinessLogicsContracts +{ + public interface IProductLogic + { + List? ReadList(ProductSearchModel? model); + ProductViewModel? ReadElement(ProductSearchModel model); + bool Create(ProductBindingModel model); + bool Update(ProductBindingModel model); + bool Delete(ProductBindingModel model); + } +} diff --git a/Storehouse/StorehouseContracts/BusinessLogicsContracts/IProviderLogic.cs b/Storehouse/StorehouseContracts/BusinessLogicsContracts/IProviderLogic.cs new file mode 100644 index 0000000..153a858 --- /dev/null +++ b/Storehouse/StorehouseContracts/BusinessLogicsContracts/IProviderLogic.cs @@ -0,0 +1,15 @@ +using StorehouseContracts.BindingModels; +using StorehouseContracts.SearchModels; +using StorehouseContracts.ViewModels; + +namespace StorehouseContracts.BusinessLogicsContracts +{ + public interface IProviderLogic + { + List? ReadList(ProviderSearchModel? model); + ProviderViewModel? ReadElement(ProviderSearchModel model); + bool Create(ProviderBindingModel model); + bool Update(ProviderBindingModel model); + bool Delete(ProviderBindingModel model); + } +} diff --git a/Storehouse/StorehouseContracts/BusinessLogicsContracts/ISaleLogic.cs b/Storehouse/StorehouseContracts/BusinessLogicsContracts/ISaleLogic.cs new file mode 100644 index 0000000..8ad9411 --- /dev/null +++ b/Storehouse/StorehouseContracts/BusinessLogicsContracts/ISaleLogic.cs @@ -0,0 +1,15 @@ +using StorehouseContracts.BindingModels; +using StorehouseContracts.SearchModels; +using StorehouseContracts.ViewModels; + +namespace StorehouseContracts.BusinessLogicsContracts +{ + public interface ISaleLogic + { + List? ReadList(SaleSearchModel? model); + SaleViewModel? ReadElement(SaleSearchModel model); + bool Create(SaleBindingModel model); + bool Update(SaleBindingModel model); + bool Delete(SaleBindingModel model); + } +} diff --git a/Storehouse/StorehouseContracts/BusinessLogicsContracts/ISupplyLogic.cs b/Storehouse/StorehouseContracts/BusinessLogicsContracts/ISupplyLogic.cs new file mode 100644 index 0000000..8850459 --- /dev/null +++ b/Storehouse/StorehouseContracts/BusinessLogicsContracts/ISupplyLogic.cs @@ -0,0 +1,15 @@ +using StorehouseContracts.BindingModels; +using StorehouseContracts.SearchModels; +using StorehouseContracts.ViewModels; + +namespace StorehouseContracts.BusinessLogicsContracts +{ + public interface ISupplyLogic + { + List? ReadList(SupplySearchModel? model); + SupplyViewModel? ReadElement(SupplySearchModel model); + bool Create(SupplyBindingModel model); + bool Update(SupplyBindingModel model); + bool Delete(SupplyBindingModel model); + } +} diff --git a/Storehouse/StorehouseContracts/SearchModels/ClientSearchModel.cs b/Storehouse/StorehouseContracts/SearchModels/ClientSearchModel.cs new file mode 100644 index 0000000..7b09192 --- /dev/null +++ b/Storehouse/StorehouseContracts/SearchModels/ClientSearchModel.cs @@ -0,0 +1,10 @@ +namespace StorehouseContracts.SearchModels +{ + public class ClientSearchModel + { + public int? Id { get; set; } + public string? ClientFIO { get; set; } + public string? Email { get; set; } + public string? Password { get; set; } + } +} diff --git a/Storehouse/StorehouseContracts/SearchModels/ProductSearchModel.cs b/Storehouse/StorehouseContracts/SearchModels/ProductSearchModel.cs new file mode 100644 index 0000000..f61829d --- /dev/null +++ b/Storehouse/StorehouseContracts/SearchModels/ProductSearchModel.cs @@ -0,0 +1,8 @@ +namespace StorehouseContracts.SearchModels +{ + public class ProductSearchModel + { + public int? Id { get; set; } + public string? ProductName { get; set; } + } +} diff --git a/Storehouse/StorehouseContracts/SearchModels/ProviderSearchModel.cs b/Storehouse/StorehouseContracts/SearchModels/ProviderSearchModel.cs new file mode 100644 index 0000000..02269b9 --- /dev/null +++ b/Storehouse/StorehouseContracts/SearchModels/ProviderSearchModel.cs @@ -0,0 +1,10 @@ +namespace StorehouseContracts.SearchModels +{ + public class ProviderSearchModel + { + public int? Id { get; set; } + public string? ProviderFIO { get; set; } + public string? Email { get; set; } + public string? Password { get; set; } + } +} diff --git a/Storehouse/StorehouseContracts/SearchModels/SaleSearchModel.cs b/Storehouse/StorehouseContracts/SearchModels/SaleSearchModel.cs new file mode 100644 index 0000000..84f8400 --- /dev/null +++ b/Storehouse/StorehouseContracts/SearchModels/SaleSearchModel.cs @@ -0,0 +1,9 @@ +namespace StorehouseContracts.SearchModels +{ + public class SaleSearchModel + { + public int? Id { get; set; } + public int? ClientId { get; set; } + public int? ProductId { get; set; } + } +} diff --git a/Storehouse/StorehouseContracts/SearchModels/SupplySearchModel.cs b/Storehouse/StorehouseContracts/SearchModels/SupplySearchModel.cs new file mode 100644 index 0000000..6f054ab --- /dev/null +++ b/Storehouse/StorehouseContracts/SearchModels/SupplySearchModel.cs @@ -0,0 +1,9 @@ +namespace StorehouseContracts.SearchModels +{ + public class SupplySearchModel + { + public int? Id { get; set; } + public int? ProviderId { get; set; } + public int? ProductId { get; set; } + } +} diff --git a/Storehouse/StorehouseContracts/StoragesContracts/IClientStorage.cs b/Storehouse/StorehouseContracts/StoragesContracts/IClientStorage.cs new file mode 100644 index 0000000..d7c5d59 --- /dev/null +++ b/Storehouse/StorehouseContracts/StoragesContracts/IClientStorage.cs @@ -0,0 +1,16 @@ +using StorehouseContracts.BindingModels; +using StorehouseContracts.SearchModels; +using StorehouseContracts.ViewModels; + +namespace StorehouseContracts.StoragesContracts +{ + public interface IClientStorage + { + List GetFullList(); + List GetFilteredList(ClientSearchModel model); + ClientViewModel? GetElement(ClientSearchModel model); + ClientViewModel? Insert(ClientBindingModel model); + ClientViewModel? Update(ClientBindingModel model); + ClientViewModel? Delete(ClientBindingModel model); + } +} diff --git a/Storehouse/StorehouseContracts/StoragesContracts/IProductStorage.cs b/Storehouse/StorehouseContracts/StoragesContracts/IProductStorage.cs new file mode 100644 index 0000000..6ac37d1 --- /dev/null +++ b/Storehouse/StorehouseContracts/StoragesContracts/IProductStorage.cs @@ -0,0 +1,16 @@ +using StorehouseContracts.BindingModels; +using StorehouseContracts.SearchModels; +using StorehouseContracts.ViewModels; + +namespace StorehouseContracts.StoragesContracts +{ + public interface IProductStorage + { + List GetFullList(); + List GetFilteredList(ProductSearchModel model); + ProductViewModel? GetElement(ProductSearchModel model); + ProductViewModel? Insert(ProductBindingModel model); + ProductViewModel? Update(ProductBindingModel model); + ProductViewModel? Delete(ProductBindingModel model); + } +} diff --git a/Storehouse/StorehouseContracts/StoragesContracts/IProviderStorage.cs b/Storehouse/StorehouseContracts/StoragesContracts/IProviderStorage.cs new file mode 100644 index 0000000..52d770f --- /dev/null +++ b/Storehouse/StorehouseContracts/StoragesContracts/IProviderStorage.cs @@ -0,0 +1,16 @@ +using StorehouseContracts.BindingModels; +using StorehouseContracts.SearchModels; +using StorehouseContracts.ViewModels; + +namespace StorehouseContracts.StoragesContracts +{ + public interface IProviderStorage + { + List GetFullList(); + List GetFilteredList(ProviderSearchModel model); + ProviderViewModel? GetElement(ProviderSearchModel model); + ProviderViewModel? Insert(ProviderBindingModel model); + ProviderViewModel? Update(ProviderBindingModel model); + ProviderViewModel? Delete(ProviderBindingModel model); + } +} diff --git a/Storehouse/StorehouseContracts/StoragesContracts/ISaleStorage.cs b/Storehouse/StorehouseContracts/StoragesContracts/ISaleStorage.cs new file mode 100644 index 0000000..307e519 --- /dev/null +++ b/Storehouse/StorehouseContracts/StoragesContracts/ISaleStorage.cs @@ -0,0 +1,16 @@ +using StorehouseContracts.BindingModels; +using StorehouseContracts.SearchModels; +using StorehouseContracts.ViewModels; + +namespace StorehouseContracts.StoragesContracts +{ + public interface ISaleStorage + { + List GetFullList(); + List GetFilteredList(SaleSearchModel model); + SaleViewModel? GetElement(SaleSearchModel model); + SaleViewModel? Insert(SaleBindingModel model); + SaleViewModel? Update(SaleBindingModel model); + SaleViewModel? Delete(SaleBindingModel model); + } +} diff --git a/Storehouse/StorehouseContracts/StoragesContracts/ISupplyStorage.cs b/Storehouse/StorehouseContracts/StoragesContracts/ISupplyStorage.cs new file mode 100644 index 0000000..b268221 --- /dev/null +++ b/Storehouse/StorehouseContracts/StoragesContracts/ISupplyStorage.cs @@ -0,0 +1,16 @@ +using StorehouseContracts.BindingModels; +using StorehouseContracts.SearchModels; +using StorehouseContracts.ViewModels; + +namespace StorehouseContracts.StoragesContracts +{ + public interface ISupplyStorage + { + List GetFullList(); + List GetFilteredList(SupplySearchModel model); + SupplyViewModel? GetElement(SupplySearchModel model); + SupplyViewModel? Insert(SupplyBindingModel model); + SupplyViewModel? Update(SupplyBindingModel model); + SupplyViewModel? Delete(SupplyBindingModel model); + } +} diff --git a/Storehouse/StorehouseContracts/StorehouseContracts.csproj b/Storehouse/StorehouseContracts/StorehouseContracts.csproj new file mode 100644 index 0000000..972e32a --- /dev/null +++ b/Storehouse/StorehouseContracts/StorehouseContracts.csproj @@ -0,0 +1,13 @@ + + + + net6.0 + enable + enable + + + + + + + diff --git a/Storehouse/StorehouseContracts/ViewModels/ClientViewModel.cs b/Storehouse/StorehouseContracts/ViewModels/ClientViewModel.cs new file mode 100644 index 0000000..0248b5e --- /dev/null +++ b/Storehouse/StorehouseContracts/ViewModels/ClientViewModel.cs @@ -0,0 +1,16 @@ +using StorehouseDataModels.Models; +using System.ComponentModel; + +namespace StorehouseContracts.ViewModels +{ + public class ClientViewModel : IClientModel + { + public int Id { get; set; } + [DisplayName("Client's FIO")] + public string ClientFIO { get; set; } = string.Empty; + [DisplayName("Login (Email)")] + public string Email { get; set; } = string.Empty; + [DisplayName("Password")] + public string Password { get; set; } = string.Empty; + } +} diff --git a/Storehouse/StorehouseContracts/ViewModels/ProductViewModel.cs b/Storehouse/StorehouseContracts/ViewModels/ProductViewModel.cs new file mode 100644 index 0000000..764d98f --- /dev/null +++ b/Storehouse/StorehouseContracts/ViewModels/ProductViewModel.cs @@ -0,0 +1,17 @@ +using StorehouseDataModels.Enums; +using StorehouseDataModels.Models; +using System.ComponentModel; + +namespace StorehouseContracts.ViewModels +{ + public class ProductViewModel : IProductModel + { + public int Id { get; set; } + [DisplayName("Product Name")] + public string ProductName { get; set; } = string.Empty; + [DisplayName("Type Product")] + public ProductType ProductType { get; set; } + [DisplayName("Num")] + public int ProductNum { get; set; } + } +} diff --git a/Storehouse/StorehouseContracts/ViewModels/ProviderViewModel.cs b/Storehouse/StorehouseContracts/ViewModels/ProviderViewModel.cs new file mode 100644 index 0000000..2bf8262 --- /dev/null +++ b/Storehouse/StorehouseContracts/ViewModels/ProviderViewModel.cs @@ -0,0 +1,16 @@ +using StorehouseDataModels.Models; +using System.ComponentModel; + +namespace StorehouseContracts.ViewModels +{ + public class ProviderViewModel : IProviderModel + { + public int Id { get; set; } + [DisplayName("Provider's FIO")] + public string ProviderFIO { get; set; } = string.Empty; + [DisplayName("Login (Email)")] + public string Email { get; set; } = string.Empty; + [DisplayName("Password")] + public string Password { get; set; } = string.Empty; + } +} diff --git a/Storehouse/StorehouseContracts/ViewModels/SaleViewModel.cs b/Storehouse/StorehouseContracts/ViewModels/SaleViewModel.cs new file mode 100644 index 0000000..9f91824 --- /dev/null +++ b/Storehouse/StorehouseContracts/ViewModels/SaleViewModel.cs @@ -0,0 +1,18 @@ +using StorehouseDataModels.Models; +using System.ComponentModel; + +namespace StorehouseContracts.ViewModels +{ + public class SaleViewModel : ISaleModel + { + public int Id { get; set; } + public int ClientId { get; set; } + [DisplayName("Client")] + public string ClientFIO { get; set; } = string.Empty; + public int ProductId { get; set; } + [DisplayName("Product")] + public string ProductName { get; set; } = string.Empty; + [DisplayName("Num")] + public int SaleNum { get; set; } + } +} diff --git a/Storehouse/StorehouseContracts/ViewModels/SupplyViewModel.cs b/Storehouse/StorehouseContracts/ViewModels/SupplyViewModel.cs new file mode 100644 index 0000000..35de8d2 --- /dev/null +++ b/Storehouse/StorehouseContracts/ViewModels/SupplyViewModel.cs @@ -0,0 +1,18 @@ +using StorehouseDataModels.Models; +using System.ComponentModel; + +namespace StorehouseContracts.ViewModels +{ + public class SupplyViewModel : ISupplyModel + { + public int Id { get; set; } + public int ProviderId { get; set; } + [DisplayName("Provider")] + public string ProviderFIO { get; set; } = string.Empty; + public int ProductId { get; set; } + [DisplayName("Product")] + public string ProductName { get; set; } = string.Empty; + [DisplayName("Num")] + public int SupplyNum { get; set; } + } +} diff --git a/Storehouse/StorehouseDataModels/Enums/ProductType.cs b/Storehouse/StorehouseDataModels/Enums/ProductType.cs new file mode 100644 index 0000000..031eb6b --- /dev/null +++ b/Storehouse/StorehouseDataModels/Enums/ProductType.cs @@ -0,0 +1,15 @@ +namespace StorehouseDataModels.Enums +{ + public enum ProductType + { + Неизвестен = -1, + + Одежда = 0, + + Обувь = 1, + + Техника = 2, + + Гигиена = 3 + } +} diff --git a/Storehouse/StorehouseDataModels/IId.cs b/Storehouse/StorehouseDataModels/IId.cs new file mode 100644 index 0000000..3005945 --- /dev/null +++ b/Storehouse/StorehouseDataModels/IId.cs @@ -0,0 +1,7 @@ +namespace StorehouseDataModels +{ + public interface IId + { + int Id { get; } + } +} diff --git a/Storehouse/StorehouseDataModels/Models/IClientModel.cs b/Storehouse/StorehouseDataModels/Models/IClientModel.cs new file mode 100644 index 0000000..6f626d8 --- /dev/null +++ b/Storehouse/StorehouseDataModels/Models/IClientModel.cs @@ -0,0 +1,9 @@ +namespace StorehouseDataModels.Models +{ + public interface IClientModel : IId + { + string ClientFIO { get; } + string Email { get; } + string Password { get; } + } +} diff --git a/Storehouse/StorehouseDataModels/Models/IProductModel.cs b/Storehouse/StorehouseDataModels/Models/IProductModel.cs new file mode 100644 index 0000000..24193ec --- /dev/null +++ b/Storehouse/StorehouseDataModels/Models/IProductModel.cs @@ -0,0 +1,16 @@ +using StorehouseDataModels.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StorehouseDataModels.Models +{ + public interface IProductModel : IId + { + string ProductName { get; } + int ProductNum { get; } + ProductType ProductType { get; } + } +} diff --git a/Storehouse/StorehouseDataModels/Models/IProviderModel.cs b/Storehouse/StorehouseDataModels/Models/IProviderModel.cs new file mode 100644 index 0000000..1749929 --- /dev/null +++ b/Storehouse/StorehouseDataModels/Models/IProviderModel.cs @@ -0,0 +1,9 @@ +namespace StorehouseDataModels.Models +{ + public interface IProviderModel : IId + { + string ProviderFIO { get; } + string Email { get; } + string Password { get; } + } +} diff --git a/Storehouse/StorehouseDataModels/Models/ISaleModel.cs b/Storehouse/StorehouseDataModels/Models/ISaleModel.cs new file mode 100644 index 0000000..126afb1 --- /dev/null +++ b/Storehouse/StorehouseDataModels/Models/ISaleModel.cs @@ -0,0 +1,9 @@ +namespace StorehouseDataModels.Models +{ + public interface ISaleModel : IId + { + int ClientId { get; set; } + int ProductId { get; set; } + int SaleNum { get; set; } + } +} diff --git a/Storehouse/StorehouseDataModels/Models/ISupplyModel.cs b/Storehouse/StorehouseDataModels/Models/ISupplyModel.cs new file mode 100644 index 0000000..7044eec --- /dev/null +++ b/Storehouse/StorehouseDataModels/Models/ISupplyModel.cs @@ -0,0 +1,9 @@ +namespace StorehouseDataModels.Models +{ + public interface ISupplyModel : IId + { + int ProviderId { get; set; } + int ProductId { get; set; } + int SupplyNum { get; set; } + } +} diff --git a/Storehouse/StorehouseDataModels/StorehouseDataModels.csproj b/Storehouse/StorehouseDataModels/StorehouseDataModels.csproj new file mode 100644 index 0000000..132c02c --- /dev/null +++ b/Storehouse/StorehouseDataModels/StorehouseDataModels.csproj @@ -0,0 +1,9 @@ + + + + net6.0 + enable + enable + + + diff --git a/Storehouse/StorehouseDatabase/StorehouseDatabase.csproj b/Storehouse/StorehouseDatabase/StorehouseDatabase.csproj new file mode 100644 index 0000000..132c02c --- /dev/null +++ b/Storehouse/StorehouseDatabase/StorehouseDatabase.csproj @@ -0,0 +1,9 @@ + + + + net6.0 + enable + enable + + + diff --git a/Storehouse/StorehouseView/Program.cs b/Storehouse/StorehouseView/Program.cs new file mode 100644 index 0000000..469d74e --- /dev/null +++ b/Storehouse/StorehouseView/Program.cs @@ -0,0 +1,17 @@ +namespace StorehouseView +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + // To customize application configuration such as set high DPI settings or default font, + // see https://aka.ms/applicationconfiguration. + ApplicationConfiguration.Initialize(); + Application.Run(new Form1()); + } + } +} \ No newline at end of file diff --git a/Storehouse/StorehouseView/StorehouseView.csproj b/Storehouse/StorehouseView/StorehouseView.csproj new file mode 100644 index 0000000..b57c89e --- /dev/null +++ b/Storehouse/StorehouseView/StorehouseView.csproj @@ -0,0 +1,11 @@ + + + + WinExe + net6.0-windows + enable + true + enable + + + \ No newline at end of file