/// <summary> /// Makes a copy of contractor from document containg payments /// </summary> /// <param name="document">Document containing payments and contractor</param> public void CopyDocumentContractor() { IContractorContainingDocument document = this.Parent as IContractorContainingDocument; if (document != null) { foreach (Payment payment in this.Children) { payment.CopyDocumentContractor(document); } } }
/// <summary> /// Makes a copy of contractor from document containg payment /// </summary> /// <param name="document">Document containing payment</param> public void CopyDocumentContractor(IContractorContainingDocument document) { this.Contractor = document.Contractor; this.ContractorAddressId = document.ContractorAddressId; }