diff --git a/CarCenter/CarCenterContracts/BindingModels/ReportBindingModel.cs b/CarCenter/CarCenterContracts/BindingModels/ReportBindingModel.cs new file mode 100644 index 0000000..4d29120 --- /dev/null +++ b/CarCenter/CarCenterContracts/BindingModels/ReportBindingModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterContracts.BindingModels +{ + public class ReportBindingModel + { + public string FileName { get; set; } = string.Empty; + public DateTime? DateFrom { get; set; } + public DateTime? DateTo { get; set; } + } + +} diff --git a/CarCenter/CarCenterContracts/ViewModels/ReportBundlingViewModel.cs b/CarCenter/CarCenterContracts/ViewModels/ReportBundlingViewModel.cs new file mode 100644 index 0000000..7c9d8f7 --- /dev/null +++ b/CarCenter/CarCenterContracts/ViewModels/ReportBundlingViewModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterContracts.ViewModels +{ + public class ReportBundlingViewModel + { + public int Id { get; set; } + public List<(string, int)> Orders { get; set; } = new(); + public List<(string, int)> Features { get; set; } = new(); + } +} diff --git a/CarCenter/CarCenterContracts/ViewModels/ReportCarViewModel.cs b/CarCenter/CarCenterContracts/ViewModels/ReportCarViewModel.cs new file mode 100644 index 0000000..995f519 --- /dev/null +++ b/CarCenter/CarCenterContracts/ViewModels/ReportCarViewModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterContracts.ViewModels +{ + public class ReportCarViewModel + { + public int Id { get; set; } + public List<(string, int)> Presales { get; set; } = new(); + } +} diff --git a/CarCenter/CarCenterContracts/ViewModels/ReportOrderViewModel.cs b/CarCenter/CarCenterContracts/ViewModels/ReportOrderViewModel.cs new file mode 100644 index 0000000..63a833c --- /dev/null +++ b/CarCenter/CarCenterContracts/ViewModels/ReportOrderViewModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterContracts.ViewModels +{ + public class ReportOrderViewModel + { + public int Id { get; set; } + public List<(string, int)> Bundlings { get; set; } = new(); + public List<(string, int)> Requests { get; set; } = new(); + } +} diff --git a/CarCenter/CarCenterContracts/ViewModels/ReportPresaleViewModel.cs b/CarCenter/CarCenterContracts/ViewModels/ReportPresaleViewModel.cs new file mode 100644 index 0000000..3304ce9 --- /dev/null +++ b/CarCenter/CarCenterContracts/ViewModels/ReportPresaleViewModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterContracts.ViewModels +{ + public class ReportPresaleViewModel + { + public int Id { get; set; } + public List<(string, int)> Cars { get; set; } = new(); + } +} diff --git a/CarCenter/CarCenterDatabaseImplement/Implements/CarStorage.cs b/CarCenter/CarCenterDatabaseImplement/Implements/CarStorage.cs index d62831f..f17d612 100644 --- a/CarCenter/CarCenterDatabaseImplement/Implements/CarStorage.cs +++ b/CarCenter/CarCenterDatabaseImplement/Implements/CarStorage.cs @@ -29,7 +29,7 @@ namespace CarCenterDatabaseImplement.Implements public List GetFilteredList(CarSearchModel model) { using var context = new CarCenterDatabase(); - if (model.DateFrom.HasValue && model.DateTo.HasValue) + if (model.DateFrom.HasValue && model.DateTo.HasValue) // Для отчета списка { return context.Cars .Include(x => x.Bundlings)