From e38fd784812c9841acfd86c46f014170ad328f4e Mon Sep 17 00:00:00 2001 From: FLARJ <122087628+FLARJ@users.noreply.github.com> Date: Wed, 5 Apr 2023 22:29:39 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B8=20=D0=B7=D0=B0=D0=BF=D0=BE=D0=BB=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20ViewModels?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SearchModels/HeadsetSearchModel.cs | 2 +- .../SearchModels/OrderSearchModel.cs | 2 +- .../SearchModels/RoleSearchModel.cs | 2 +- .../SearchModels/SalesSalonsSearchModel.cs | 2 +- .../ViewModel/HeadsetViewModel.cs | 21 ++++++++++++++++++ .../ViewModel/OrdersViewModel.cs | 22 +++++++++++++++++++ .../ViewModel/RoleViewModel.cs | 12 ++++++++++ .../ViewModel/SalesSalonsViewModel.cs | 15 +++++++++++++ 8 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 FurnitureFactory/FurnitureContracts/ViewModel/HeadsetViewModel.cs create mode 100644 FurnitureFactory/FurnitureContracts/ViewModel/OrdersViewModel.cs create mode 100644 FurnitureFactory/FurnitureContracts/ViewModel/RoleViewModel.cs create mode 100644 FurnitureFactory/FurnitureContracts/ViewModel/SalesSalonsViewModel.cs diff --git a/FurnitureFactory/FurnitureContracts/SearchModels/HeadsetSearchModel.cs b/FurnitureFactory/FurnitureContracts/SearchModels/HeadsetSearchModel.cs index 4785b2d..ed5445d 100644 --- a/FurnitureFactory/FurnitureContracts/SearchModels/HeadsetSearchModel.cs +++ b/FurnitureFactory/FurnitureContracts/SearchModels/HeadsetSearchModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace FurnitureContracts.SearchModels { - internal class HeadsetSearchModel + public class HeadsetSearchModel { public int? Id { get; set; } } diff --git a/FurnitureFactory/FurnitureContracts/SearchModels/OrderSearchModel.cs b/FurnitureFactory/FurnitureContracts/SearchModels/OrderSearchModel.cs index 0027a4b..d8715a4 100644 --- a/FurnitureFactory/FurnitureContracts/SearchModels/OrderSearchModel.cs +++ b/FurnitureFactory/FurnitureContracts/SearchModels/OrderSearchModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace FurnitureContracts.SearchModels { - internal class OrderSearchModel + public class OrderSearchModel { public int? Id { get; set; } } diff --git a/FurnitureFactory/FurnitureContracts/SearchModels/RoleSearchModel.cs b/FurnitureFactory/FurnitureContracts/SearchModels/RoleSearchModel.cs index cb26be3..2280a4d 100644 --- a/FurnitureFactory/FurnitureContracts/SearchModels/RoleSearchModel.cs +++ b/FurnitureFactory/FurnitureContracts/SearchModels/RoleSearchModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace FurnitureContracts.SearchModels { - internal class RoleSearchModel + public class RoleSearchModel { public string? Name { get; set; } public int? Id { get; set; } diff --git a/FurnitureFactory/FurnitureContracts/SearchModels/SalesSalonsSearchModel.cs b/FurnitureFactory/FurnitureContracts/SearchModels/SalesSalonsSearchModel.cs index 3543986..0a10c65 100644 --- a/FurnitureFactory/FurnitureContracts/SearchModels/SalesSalonsSearchModel.cs +++ b/FurnitureFactory/FurnitureContracts/SearchModels/SalesSalonsSearchModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace FurnitureContracts.SearchModels { - internal class SalesSalonsSearchModel + public class SalesSalonsSearchModel { public string? Name { get; set; } public int? Id { get; set; } diff --git a/FurnitureFactory/FurnitureContracts/ViewModel/HeadsetViewModel.cs b/FurnitureFactory/FurnitureContracts/ViewModel/HeadsetViewModel.cs new file mode 100644 index 0000000..428c441 --- /dev/null +++ b/FurnitureFactory/FurnitureContracts/ViewModel/HeadsetViewModel.cs @@ -0,0 +1,21 @@ +using FurnitureFactoryDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FurnitureContracts.ViewModel +{ + public class HeadsetViewModel + { + public int Cost { get; set; } + + [DisplayName("Размер")] + public string Size { get; set; } = string.Empty; + public int Id { get; set; } + public Dictionary HeadsetModuleId { get; } + + } +} diff --git a/FurnitureFactory/FurnitureContracts/ViewModel/OrdersViewModel.cs b/FurnitureFactory/FurnitureContracts/ViewModel/OrdersViewModel.cs new file mode 100644 index 0000000..d6effc5 --- /dev/null +++ b/FurnitureFactory/FurnitureContracts/ViewModel/OrdersViewModel.cs @@ -0,0 +1,22 @@ +using FurnitureFactoryDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FurnitureContracts.ViewModel +{ + public class OrdersViewModel + { + [DisplayName("Дата заказа")] + public DateTime Date { get; set; } + + [DisplayName("Статус")] + public string Status { get; set; } = string.Empty; + public int Id { get; set; } + public Dictionary FurnitureId { get; set; } + public Dictionary HeadsetId { get; set; } + } +} diff --git a/FurnitureFactory/FurnitureContracts/ViewModel/RoleViewModel.cs b/FurnitureFactory/FurnitureContracts/ViewModel/RoleViewModel.cs new file mode 100644 index 0000000..e768e60 --- /dev/null +++ b/FurnitureFactory/FurnitureContracts/ViewModel/RoleViewModel.cs @@ -0,0 +1,12 @@ +using FurnitureFactoryDataModels.Models; +using System.ComponentModel; + +namespace FurnitureContracts.ViewModel +{ + public class RoleViewModel + { + [DisplayName("Название роли")] + public string Name { get; set; } = string.Empty; + public int Id { get; set; } + } +} diff --git a/FurnitureFactory/FurnitureContracts/ViewModel/SalesSalonsViewModel.cs b/FurnitureFactory/FurnitureContracts/ViewModel/SalesSalonsViewModel.cs new file mode 100644 index 0000000..9f45f70 --- /dev/null +++ b/FurnitureFactory/FurnitureContracts/ViewModel/SalesSalonsViewModel.cs @@ -0,0 +1,15 @@ +using FurnitureFactoryDataModels.Models; +using System.ComponentModel; + +namespace FurnitureContracts.ViewModel +{ + public class SalesSalonsViewModel + { + [DisplayName("Название")] + public string Name { get; set; } = string.Empty; + [DisplayName("Адресс")] + public string Address { get; set; } = string.Empty; + public Dictionary OrdersId { get; set; } + public int Id { get; set; } + } +}