23 lines
687 B
C#
23 lines
687 B
C#
namespace Thor.Shared.Inspect;
|
|
|
|
public class Inspection
|
|
{
|
|
public string Identifier { get; set; }
|
|
public string Name { get; set; } = string.Empty;
|
|
public Grid Grid { get; } = new();
|
|
public InspectionRegister Register { get; set; } = new();
|
|
|
|
public IEnumerable<InspectionRow> GetRows()
|
|
{
|
|
var items = Grid.GetItems().OrderBy(r => r.OrderId);
|
|
foreach (var item in items)
|
|
{
|
|
if (item is ItemTitle)
|
|
yield return new(item);
|
|
else if (item is ItemVerification)
|
|
yield return new(item, Register.Forge(item.Identifier));
|
|
else throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|