/// <summary> /// Construtor padrão /// </summary> public Document() { Expenses = new List <DocumentAdditionalExpenses>(); DocumentRefenceList = new List <DocumentReferenceInformation>(); Lines = new List <Line>(); TaxExtension = new DocumentTaxExtension(); DownPaymentsToDraw = new List <DocumentDownPaymentsToDraw>(); }
/// <summary> /// Instancia um novo documento /// </summary> /// <param name="pCompanyDb">Banco de dados da empresa</param> /// <param name="pDocumentObjectType">Tipo do Objeto</param> public Document(string pCompanyDb, eDocumentObjectType pDocumentObjectType) : base(pCompanyDb, "O" + pDocumentObjectType.GetTableNameSufix()) { Expenses = new List <DocumentAdditionalExpenses>(); DocumentRefenceList = new List <DocumentReferenceInformation>(); Lines = new List <Line>(); TaxExtension = new DocumentTaxExtension(pCompanyDb, pDocumentObjectType); DownPaymentsToDraw = new List <DocumentDownPaymentsToDraw>(); }
public void FillTaxExtension() { var docObjCode = GetObjType(); TaxExtension = new DocumentTaxExtension(DBName, docObjCode) { DocEntry = DocEntry }; TaxExtension.GetByKey(); }
/// <summary> /// Clona o objeto /// </summary> /// <param name="pDoc">Documento de Origem</param> public Document(Document pDoc) : this(pDoc.DBName, pDoc.ObjType) { CopyBy(pDoc); pDoc.Lines.ForEach( l => Lines.Add(new Line(l))); TaxExtension = new DocumentTaxExtension(pDoc.TaxExtension); pDoc.DownPaymentsToDraw.ForEach( l => DownPaymentsToDraw.Add(new DocumentDownPaymentsToDraw(l))); pDoc.Expenses.ForEach( l => this.Expenses.Add(new DocumentAdditionalExpenses(l))); }
public DocumentTaxExtension(DocumentTaxExtension pDocumentTaxExtension) : this() { CopyBy(pDocumentTaxExtension); }