fix and complete

This commit is contained in:
Павел Путилин 2023-04-10 21:59:50 +04:00
parent 82465e1684
commit a519f3a5e4
4 changed files with 14 additions and 5 deletions

View File

@ -118,28 +118,28 @@
// reinforcedToolStripMenuItem // reinforcedToolStripMenuItem
// //
this.reinforcedToolStripMenuItem.Name = "reinforcedToolStripMenuItem"; this.reinforcedToolStripMenuItem.Name = "reinforcedToolStripMenuItem";
this.reinforcedToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.reinforcedToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.reinforcedToolStripMenuItem.Text = "Изделия"; this.reinforcedToolStripMenuItem.Text = "Изделия";
this.reinforcedToolStripMenuItem.Click += new System.EventHandler(this.ReinforcedToolStripMenuItem_Click); this.reinforcedToolStripMenuItem.Click += new System.EventHandler(this.ReinforcedToolStripMenuItem_Click);
// //
// componentToolStripMenuItem // componentToolStripMenuItem
// //
this.componentToolStripMenuItem.Name = "componentToolStripMenuItem"; this.componentToolStripMenuItem.Name = "componentToolStripMenuItem";
this.componentToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.componentToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.componentToolStripMenuItem.Text = "Компоненты"; this.componentToolStripMenuItem.Text = "Компоненты";
this.componentToolStripMenuItem.Click += new System.EventHandler(this.ComponentsToolStripMenuItem_Click); this.componentToolStripMenuItem.Click += new System.EventHandler(this.ComponentsToolStripMenuItem_Click);
// //
// clientsToolStripMenuItem // clientsToolStripMenuItem
// //
this.clientsToolStripMenuItem.Name = "clientsToolStripMenuItem"; this.clientsToolStripMenuItem.Name = "clientsToolStripMenuItem";
this.clientsToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.clientsToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.clientsToolStripMenuItem.Text = "Клиенты"; this.clientsToolStripMenuItem.Text = "Клиенты";
this.clientsToolStripMenuItem.Click += new System.EventHandler(this.ClientsToolStripMenuItem_Click); this.clientsToolStripMenuItem.Click += new System.EventHandler(this.ClientsToolStripMenuItem_Click);
// //
// исполнителиToolStripMenuItem // исполнителиToolStripMenuItem
// //
this.исполнителиToolStripMenuItem.Name = сполнителиToolStripMenuItem"; this.исполнителиToolStripMenuItem.Name = сполнителиToolStripMenuItem";
this.исполнителиToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.исполнителиToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
this.исполнителиToolStripMenuItem.Text = "Исполнители"; this.исполнителиToolStripMenuItem.Text = "Исполнители";
this.исполнителиToolStripMenuItem.Click += new System.EventHandler(this.ImplementersToolStripMenuItem_Click); this.исполнителиToolStripMenuItem.Click += new System.EventHandler(this.ImplementersToolStripMenuItem_Click);
// //

View File

@ -93,6 +93,7 @@ namespace PrecastConcretePlantDatabaseImplement.Models
DateCreate = DateCreate, DateCreate = DateCreate,
DateImplement = DateImplement, DateImplement = DateImplement,
ImplementerId = ImplementerId, ImplementerId = ImplementerId,
ImplementerFIO = Implementer?.ImplementerFIO ?? string.Empty,
Id = Id, Id = Id,
}; };
} }

View File

@ -37,7 +37,7 @@ namespace PrecastConcretePlantFileImplement
public List<OrderViewModel> GetFilteredList(OrderSearchModel model) public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
{ {
if (!model.Id.HasValue && model.DateFrom.HasValue && model.DateTo.HasValue) // если не ищем по айдишнику, значит ищем по диапазону дат if (!model.Id.HasValue && model.DateFrom.HasValue && model.DateTo.HasValue)
{ {
return _source.Orders return _source.Orders
.Where(x => model.DateFrom <= x.DateCreate.Date && x.DateCreate <= model.DateTo) .Where(x => model.DateFrom <= x.DateCreate.Date && x.DateCreate <= model.DateTo)

View File

@ -142,6 +142,14 @@ namespace PrecastConcretePlantListImplement
break; break;
} }
} }
foreach (var implement in _source.Implementers)
{
if (implement.Id == res.ImplementerId)
{
res.ClientFIO = implement.ImplementerFIO;
break;
}
}
return res; return res;
} }
} }