1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- using System;
- using System.Collections.Generic;
- using InABox.Core;
- namespace Comal.Classes
- {
- public class QuoteDataModel : BaseDataModel<Quote>
- {
- public QuoteDataModel(Filter<Quote> filter) : base(filter)
- {
- //AddChildTable<Quote, QuoteDocument>(x => x.ID, x => x.EntityLink.ID);
- //AddChildTable<Quote, QuoteDiagram>(x => x.ID, x => x.Quote.ID);
- //AddChildTable<Quote, QuoteTakeoff>(x => x.ID, x => x.Quote.ID);
- //AddChildTable<Quote, QuoteDesign>(x => x.ID, x => x.Quote.ID);
- AddChildTable<QuoteDesign, QuoteDesignItem>(
- x => x.ID, x => x.Design.ID,
- parentalias: "Quote_QuoteDesign",
- childalias: "Quote_QuoteDesign_QuoteDesignItem"
- );
- AddChildTable<Quote, QuoteCostSheet>(
- x => x.ID, x => x.Quote.ID,
- parentalias: "Quote",
- childalias: "Quote_QuoteCostSheet"
- );
- AddChildTable<QuoteCostSheet, QuoteCostSheetItem>(
- x => x.ID, x => x.CostSheet.ID,
- parentalias: "Quote_QuoteCostSheet",
- childalias: "Quote_QuoteCostSheet_QuoteCostSheetItem"
- );
- //AddChildTable<Quote, QuoteProposal>(x => x.ID, x => x.Quote.ID);
- AddChildTable<QuoteProposal, QuoteProposalCostSheet>(
- x => x.ID, x => x.Proposal.ID,
- parentalias: "Quote_QuoteProposal",
- childalias: "Quote_QuoteProposal_QuoteProposalCostSheet"
- );
- AddChildTable<QuoteProposalCostSheet, QuoteCostSheetItem>(
- x => x.CostSheet.ID, x => x.CostSheet.ID, isdefault: false,
- parentalias: "Quote_QuoteProposal_QuoteProposalCostSheet",
- childalias: "Quote_QuoteProposal_QuoteProposalCostSheet_QuoteCostSheetItem"
- );
- /*AddChildTable<Quote, QuoteContract>(
- x => x.ID, x => x.Quote.ID,
- parentalias: "Quote",
- childalias: "Quote_QuoteContract"
- );*/
- AddChildTable<QuoteContract, QuoteContractProposal>(
- x => x.ID, x => x.Contract.ID,
- parentalias: "Quote_QuoteContract",
- childalias: "Quote_QuoteContract_QuoteContractProposal"
- );
- }
- public override string Name => "Quotes";
- }
- }
|