From 15fb786e033c2f45a455fbde0954cdc1ac50c3a3 Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Wed, 15 Mar 2023 19:10:00 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=B5=20=D0=BA=D0=BB=D0=B0?= =?UTF-8?q?=D1=81=D1=81=D1=8B=20=D0=B2=20Contracts.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BindingModels/ReportBindingModel.cs | 17 +++++++++++++++++ .../SearchModels/OrderSearchModel.cs | 6 +++++- .../ReportManufactureWorkPieceViewModel.cs | 18 ++++++++++++++++++ .../ViewModels/ReportOrdersViewModel.cs | 19 +++++++++++++++++++ 4 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/ReportBindingModel.cs create mode 100644 BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/ReportManufactureWorkPieceViewModel.cs create mode 100644 BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/ReportOrdersViewModel.cs diff --git a/BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/ReportBindingModel.cs b/BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/ReportBindingModel.cs new file mode 100644 index 0000000..47d2abd --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/ReportBindingModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BlacksmithWorkshopContracts.BindingModels +{ + public class ReportBindingModel + { + public string FileName { get; set; } = string.Empty; + + public DateTime? DateFrom { get; set; } + + public DateTime? DateTo { get; set;} + } +} diff --git a/BlacksmithWorkshop/BlacksmithWorkshopContracts/SearchModels/OrderSearchModel.cs b/BlacksmithWorkshop/BlacksmithWorkshopContracts/SearchModels/OrderSearchModel.cs index 7c7f72e..cbdf9e8 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopContracts/SearchModels/OrderSearchModel.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopContracts/SearchModels/OrderSearchModel.cs @@ -11,6 +11,10 @@ namespace BlacksmithWorkshopContracts.SearchModels { //для поиска по идентификатору public int? Id { get; set; } - } + //два поля для возможности производить выборку + public DateTime? DateFrom { get; set; } + + public DateTime? DateTo { get; set; } + } } diff --git a/BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/ReportManufactureWorkPieceViewModel.cs b/BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/ReportManufactureWorkPieceViewModel.cs new file mode 100644 index 0000000..de3b0fe --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/ReportManufactureWorkPieceViewModel.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BlacksmithWorkshopContracts.ViewModels +{ + public class ReportManufactureWorkPieceViewModel + { + public string WorkPieceName { get; set; } = string.Empty; + + public int TotalCount { get; set; } + + //список кортежей + public List<(string Manufacure, int Count)> Manufactures { get; set; } = new(); + } +} diff --git a/BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/ReportOrdersViewModel.cs b/BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/ReportOrdersViewModel.cs new file mode 100644 index 0000000..a38241b --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/ReportOrdersViewModel.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BlacksmithWorkshopContracts.ViewModels +{ + public class ReportOrdersViewModel + { + public int Id { get; set; } + + public DateTime DateCreate { get; set; } + + public string ProductName { get; set; } = string.Empty; + + public double Sum { get; set; } + } +}