1234567891011121314151617181920212223242526272829303132 |
- using System;
- using Comal.Classes;
- using InABox.Core;
- using InABox.DynamicGrid;
- namespace PRSDesktop
- {
- public class QuoteDesignGrid : DynamicDataGrid<QuoteDesign>
- {
- public QuoteDesignGrid()
- {
- Options.AddRange(DynamicGridOption.RecordCount, DynamicGridOption.SelectColumns);
- }
- public Guid QuoteID { get; set; }
- protected override void Reload(Filters<QuoteDesign> criteria, Columns<QuoteDesign> columns, ref SortOrder<QuoteDesign> sort,
- Action<CoreTable, Exception> action)
- {
- criteria.Add(new Filter<QuoteDesign>(x => x.Quote.ID).IsEqualTo(QuoteID));
- base.Reload(criteria, columns, ref sort, action);
- }
- protected override QuoteDesign CreateItem()
- {
- var result = base.CreateItem();
- result.Quote.ID = QuoteID;
- return result;
- }
- }
- }
|