This commit is contained in:
Леонид Малафеев 2024-04-30 23:20:57 +04:00
parent 79fe8e39c3
commit cfbf6479e5
6 changed files with 75 additions and 1 deletions

View File

@ -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; }
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -29,7 +29,7 @@ namespace CarCenterDatabaseImplement.Implements
public List<CarViewModel> 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)