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