123456789101112131415161718192021222324 |
- using Comal.Classes;
- using InABox.Core;
- using InABox.DynamicGrid;
- using InABox.WPF;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Media.Imaging;
- namespace PRSDesktop.Panels.PurchaseOrders;
- public class PurchaseOrderItemAllocationGrid : DynamicOneToManyGrid<PurchaseOrderItem, PurchaseOrderItemAllocation>
- {
- protected override void DoValidate(PurchaseOrderItemAllocation[] items, List<string> errors)
- {
- base.DoValidate(items, errors);
- if(items.Any(x => x.Job.ID == Item.Job.ID && x.JobRequisitionItem.ID == Guid.Empty))
- {
- errors.Add("[Job] may not be equivalent to the Job on the PurchaseOrderItem.");
- }
- }
- }
|