diff --git a/DiningRoom/DiningRoom.sln b/DiningRoom/DiningRoom.sln new file mode 100644 index 0000000..0015a90 --- /dev/null +++ b/DiningRoom/DiningRoom.sln @@ -0,0 +1,37 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34728.123 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiningRoomView", "DiningRoomView\DiningRoomView.csproj", "{611756F0-9DBA-41CB-ABD1-15A094CCAFFC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiningRoomContracts", "DiningRoomContracts\DiningRoomContracts.csproj", "{432450B8-A672-40A6-98D5-FA0F3FD8BF78}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiningRoomDataModels", "DiningRoomDataModels\DiningRoomDataModels.csproj", "{49474CED-88C8-440C-AAFA-5DCCF868D03F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {611756F0-9DBA-41CB-ABD1-15A094CCAFFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {611756F0-9DBA-41CB-ABD1-15A094CCAFFC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {611756F0-9DBA-41CB-ABD1-15A094CCAFFC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {611756F0-9DBA-41CB-ABD1-15A094CCAFFC}.Release|Any CPU.Build.0 = Release|Any CPU + {432450B8-A672-40A6-98D5-FA0F3FD8BF78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {432450B8-A672-40A6-98D5-FA0F3FD8BF78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {432450B8-A672-40A6-98D5-FA0F3FD8BF78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {432450B8-A672-40A6-98D5-FA0F3FD8BF78}.Release|Any CPU.Build.0 = Release|Any CPU + {49474CED-88C8-440C-AAFA-5DCCF868D03F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {49474CED-88C8-440C-AAFA-5DCCF868D03F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {49474CED-88C8-440C-AAFA-5DCCF868D03F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {49474CED-88C8-440C-AAFA-5DCCF868D03F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4ECC877C-2C27-4430-A778-4291F2116E11} + EndGlobalSection +EndGlobal diff --git a/DiningRoom/DiningRoomContracts/DiningRoomContracts.csproj b/DiningRoom/DiningRoomContracts/DiningRoomContracts.csproj new file mode 100644 index 0000000..132c02c --- /dev/null +++ b/DiningRoom/DiningRoomContracts/DiningRoomContracts.csproj @@ -0,0 +1,9 @@ + + + + net6.0 + enable + enable + + + diff --git a/DiningRoom/DiningRoomDataModels/DiningRoomDataModels.csproj b/DiningRoom/DiningRoomDataModels/DiningRoomDataModels.csproj new file mode 100644 index 0000000..132c02c --- /dev/null +++ b/DiningRoom/DiningRoomDataModels/DiningRoomDataModels.csproj @@ -0,0 +1,9 @@ + + + + net6.0 + enable + enable + + + diff --git a/DiningRoom/DiningRoomDataModels/Enums/OrderStatus.cs b/DiningRoom/DiningRoomDataModels/Enums/OrderStatus.cs new file mode 100644 index 0000000..722190a --- /dev/null +++ b/DiningRoom/DiningRoomDataModels/Enums/OrderStatus.cs @@ -0,0 +1,11 @@ +namespace DiningRoomDataModels.Enums +{ + public enum OrderStatus + { + Неизвестен = -1, + Принят = 0, + Выполняется = 1, + Готов = 2, + Выдан = 3 + } +} diff --git a/DiningRoom/DiningRoomDataModels/IId.cs b/DiningRoom/DiningRoomDataModels/IId.cs new file mode 100644 index 0000000..d5f8795 --- /dev/null +++ b/DiningRoom/DiningRoomDataModels/IId.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DiningRoomDataModels +{ + public interface IId + { + int Id { get; } + } +} diff --git a/DiningRoom/DiningRoomDataModels/Models/ICardModel.cs b/DiningRoom/DiningRoomDataModels/Models/ICardModel.cs new file mode 100644 index 0000000..a84bb5b --- /dev/null +++ b/DiningRoom/DiningRoomDataModels/Models/ICardModel.cs @@ -0,0 +1,23 @@ +namespace DiningRoomDataModels.Models +{ + /// + /// Товар + /// + public interface ICardModel : IId + { + /// + /// Пользователь, который добавил карту + /// + int UserId { get; } + + /// + /// Название напитка + /// + string CardName { get; } + + /// + /// Список комплектующих + /// + Dictionary DrinkCard { get; } + } +} diff --git a/DiningRoom/DiningRoomDataModels/Models/IComponentModel.cs b/DiningRoom/DiningRoomDataModels/Models/IComponentModel.cs new file mode 100644 index 0000000..5b5e083 --- /dev/null +++ b/DiningRoom/DiningRoomDataModels/Models/IComponentModel.cs @@ -0,0 +1,32 @@ +namespace DiningRoomDataModels.Models +{ + /// + /// Комплектующая + /// + public interface IComponentModel : IId + { + /// + /// Пользователь, который добавил продукт + /// + int UserId { get; } + + /// + /// Название продукта + /// + string ComponentName { get; } + /// + /// Единица измерения + /// + string Unit { get; } + /// + /// Количество + /// + int count { get; } + + /// + /// Цена продукта + /// + double Cost { get; } + + } +} diff --git a/DiningRoom/DiningRoomDataModels/Models/IDrinkModel.cs b/DiningRoom/DiningRoomDataModels/Models/IDrinkModel.cs new file mode 100644 index 0000000..9b48a0e --- /dev/null +++ b/DiningRoom/DiningRoomDataModels/Models/IDrinkModel.cs @@ -0,0 +1,28 @@ +namespace DiningRoomDataModels.Models +{ + /// + /// Товар + /// + public interface IDrinkModel : IId + { + /// + /// Пользователь, который добавил напиток + /// + int UserId { get; } + + /// + /// Название напитка + /// + string DrinkName { get; } + + /// + /// Стоимость товара + /// + double Cost { get; } + + /// + /// Список комплектующих + /// + Dictionary ProductComponents { get; } + } +} diff --git a/DiningRoom/DiningRoomDataModels/Models/IOrderModel.cs b/DiningRoom/DiningRoomDataModels/Models/IOrderModel.cs new file mode 100644 index 0000000..e8457c0 --- /dev/null +++ b/DiningRoom/DiningRoomDataModels/Models/IOrderModel.cs @@ -0,0 +1,31 @@ +using DiningRoomDataModels.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DiningRoomDataModels.Models +{ + public interface IOrderModel : IId + { + //ID пользователя, который создал заказ + int UserId { get; } + /// + /// Дата создания заказа + /// + DateTime DateCreate { get; } + + /// + /// Статус заказа + /// + OrderStatus Status { get; } + + /// + /// Стоимость заказа + /// + double Sum { get; } + Dictionary ProductOrder { get; } + Dictionary DrinkOrder { get; } + } +} diff --git a/DiningRoom/DiningRoomDataModels/Models/IProductModel.cs b/DiningRoom/DiningRoomDataModels/Models/IProductModel.cs new file mode 100644 index 0000000..749a739 --- /dev/null +++ b/DiningRoom/DiningRoomDataModels/Models/IProductModel.cs @@ -0,0 +1,28 @@ +namespace DiningRoomDataModels.Models +{ + /// + /// Товар + /// + public interface IProductModel : IId + { + /// + /// Пользователь, который добавил блюдо + /// + int UserId { get; } + + /// + /// Название блюда + /// + string ProductName { get; } + + /// + /// Стоимость товара + /// + double Cost { get; } + + /// + /// Список комплектующих + /// + Dictionary ProductComponents { get; } + } +} diff --git a/DiningRoom/DiningRoomDataModels/Models/IUserModel.cs b/DiningRoom/DiningRoomDataModels/Models/IUserModel.cs new file mode 100644 index 0000000..4145fba --- /dev/null +++ b/DiningRoom/DiningRoomDataModels/Models/IUserModel.cs @@ -0,0 +1,17 @@ +using ComputerShopDataModels.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputerShopDataModels.Models +{ + public interface IUserModel : IId + { + string Login { get; } + string Password { get; } + string Email { get; } + UserRole Role { get; } + } +} diff --git a/DiningRoom/DiningRoomView/DiningRoomView.csproj b/DiningRoom/DiningRoomView/DiningRoomView.csproj new file mode 100644 index 0000000..b57c89e --- /dev/null +++ b/DiningRoom/DiningRoomView/DiningRoomView.csproj @@ -0,0 +1,11 @@ + + + + WinExe + net6.0-windows + enable + true + enable + + + \ No newline at end of file diff --git a/DiningRoom/DiningRoomView/Form1.Designer.cs b/DiningRoom/DiningRoomView/Form1.Designer.cs new file mode 100644 index 0000000..eeb19c5 --- /dev/null +++ b/DiningRoom/DiningRoomView/Form1.Designer.cs @@ -0,0 +1,39 @@ +namespace DiningRoomView +{ + 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 + } +} diff --git a/DiningRoom/DiningRoomView/Form1.cs b/DiningRoom/DiningRoomView/Form1.cs new file mode 100644 index 0000000..2790f89 --- /dev/null +++ b/DiningRoom/DiningRoomView/Form1.cs @@ -0,0 +1,10 @@ +namespace DiningRoomView +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + } +} diff --git a/DiningRoom/DiningRoomView/Form1.resx b/DiningRoom/DiningRoomView/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/DiningRoom/DiningRoomView/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/DiningRoom/DiningRoomView/Program.cs b/DiningRoom/DiningRoomView/Program.cs new file mode 100644 index 0000000..01760f7 --- /dev/null +++ b/DiningRoom/DiningRoomView/Program.cs @@ -0,0 +1,17 @@ +namespace DiningRoomView +{ + 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