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
//
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.Click += new System.EventHandler(this.ReinforcedToolStripMenuItem_Click);
//
// 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.Click += new System.EventHandler(this.ComponentsToolStripMenuItem_Click);
//
// 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.Click += new System.EventHandler(this.ClientsToolStripMenuItem_Click);
//
// исполнители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.Click += new System.EventHandler(this.ImplementersToolStripMenuItem_Click);
//

View File

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

View File

@ -37,7 +37,7 @@ namespace PrecastConcretePlantFileImplement
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
.Where(x => model.DateFrom <= x.DateCreate.Date && x.DateCreate <= model.DateTo)

View File

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