исправления
This commit is contained in:
parent
5fcf035db9
commit
280e01e687
@ -9,7 +9,7 @@ namespace SoftwareInstallationDataBaseImplement
|
|||||||
{
|
{
|
||||||
if (optionsBuilder.IsConfigured == false)
|
if (optionsBuilder.IsConfigured == false)
|
||||||
{
|
{
|
||||||
optionsBuilder.UseSqlServer(@"Data Source=COMP-AVZH\SQLEXPRESS;Initial Catalog=SoftwareInstallationDataBaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
optionsBuilder.UseSqlServer(@"Data Source=ANNZHIMOL\SQLEXPRESS;Initial Catalog=SoftwareInstallationDataBaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||||
}
|
}
|
||||||
base.OnConfiguring(optionsBuilder);
|
base.OnConfiguring(optionsBuilder);
|
||||||
}
|
}
|
||||||
|
@ -42,12 +42,12 @@ namespace SoftwareInstallationFileImplement.Implements
|
|||||||
|
|
||||||
public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
|
public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
|
||||||
{
|
{
|
||||||
if (!model.Id.HasValue)
|
if (!model.Id.HasValue && !model.DateFrom.HasValue && !model.DateTo.HasValue)
|
||||||
{
|
{
|
||||||
return new();
|
return new();
|
||||||
}
|
}
|
||||||
|
|
||||||
return source.Orders.Where(x => x.Id==model.Id).Select(x => x.GetViewModel).ToList();
|
return source.Orders.Where(x => x.Id.Equals(model.Id)).Select(x => x.GetViewModel).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<OrderViewModel> GetFullList()
|
public List<OrderViewModel> GetFullList()
|
||||||
|
@ -57,7 +57,7 @@ namespace SoftwareInstallationListImplement.Implements
|
|||||||
|
|
||||||
foreach (var order in _source.Orders)
|
foreach (var order in _source.Orders)
|
||||||
{
|
{
|
||||||
if (model.Id.HasValue && order.Id == model.Id)
|
if (order.Id == model.Id || model.DateFrom <= order.DateCreate && order.DateCreate <= model.DateTo)
|
||||||
{
|
{
|
||||||
result.Add(order.GetViewModel);
|
result.Add(order.GetViewModel);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user