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