| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using System;
- using Comal.Classes;
- using InABox.Core;
- using InABox.DynamicGrid;
- namespace PRSDesktop
- {
- public class QuoteDesignGrid : DynamicDataGrid<QuoteDesign>
- {
- private Guid _quoteid = Guid.Empty;
- public QuoteDesignGrid()
- {
- Options.AddRange(DynamicGridOption.RecordCount, DynamicGridOption.SelectColumns);
- }
- public Guid QuoteID
- {
- get => _quoteid;
- set
- {
- _quoteid = value;
- Refresh(false, true);
- }
- }
- 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;
- }
- }
- }
|