From b3d06a206ae2930ef2bf99ac24d04a36ee032d5a Mon Sep 17 00:00:00 2001 From: Danila_Mochalov Date: Sat, 28 Jan 2023 19:35:03 +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=20View=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/BlankViewModel.cs | 21 +++++++++++ .../ViewModels/DocumentViewModel.cs | 23 ++++++++++++ .../ViewModels/OrderViewModel.cs | 37 +++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 LawFirm/LawFirmContracts/ViewModels/BlankViewModel.cs create mode 100644 LawFirm/LawFirmContracts/ViewModels/DocumentViewModel.cs create mode 100644 LawFirm/LawFirmContracts/ViewModels/OrderViewModel.cs diff --git a/LawFirm/LawFirmContracts/ViewModels/BlankViewModel.cs b/LawFirm/LawFirmContracts/ViewModels/BlankViewModel.cs new file mode 100644 index 0000000..b5f1d5c --- /dev/null +++ b/LawFirm/LawFirmContracts/ViewModels/BlankViewModel.cs @@ -0,0 +1,21 @@ +using LawFirmDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LawFirmContracts.ViewModels +{ + public class BlankViewModel : IBlankModel + { + [DisplayName("Название бланка")] + public string BlankName { get; set; } = string.Empty; + + [DisplayName("Цена")] + public double Cost { get; set; } + + public int Id { get; set; } + } +} diff --git a/LawFirm/LawFirmContracts/ViewModels/DocumentViewModel.cs b/LawFirm/LawFirmContracts/ViewModels/DocumentViewModel.cs new file mode 100644 index 0000000..5771904 --- /dev/null +++ b/LawFirm/LawFirmContracts/ViewModels/DocumentViewModel.cs @@ -0,0 +1,23 @@ +using LawFirmDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LawFirmContracts.ViewModels +{ + public class DocumentViewModel : IDocumentModel + { + [DisplayName("Название документа")] + public string DocumentName {get; set;} = string.Empty; + + [DisplayName("Цена")] + public double Price { get; set; } + + public Dictionary DocumentBlanks { get; set; } = new(); + + public int Id { get; set; } + } +} diff --git a/LawFirm/LawFirmContracts/ViewModels/OrderViewModel.cs b/LawFirm/LawFirmContracts/ViewModels/OrderViewModel.cs new file mode 100644 index 0000000..5aebf70 --- /dev/null +++ b/LawFirm/LawFirmContracts/ViewModels/OrderViewModel.cs @@ -0,0 +1,37 @@ +using LawFirmDataModels.Enums; +using LawFirmDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LawFirmContracts.ViewModels +{ + internal class OrderViewModel : IOrderModel + { + public int DocumentId { get; set; } + + [DisplayName("Документ")] + public string DocumentName { get; set; } = string.Empty; + + [DisplayName("Количество")] + public int Count { get; set; } + + [DisplayName("Сумма")] + public double Sum { get; set; } + + [DisplayName("Статус")] + public OrderStatus Status { get; set; } = OrderStatus.Неизвестен; + + [DisplayName("Дата создания")] + public DateTime DateCreate { get; set; } = DateTime.Now; + + [DisplayName("Дата выполнения")] + public DateTime? DateImplement { get; set; } + + [DisplayName("Номер")] + public int Id { get; set; } + } +}