Esempio n. 1
0
        public byte[] Export(IEnumerable <ClaimRUTROTProcess.DocumentDetails> documents)
        {
            using (var stream = new MemoryStream())
            {
                using (Writer = XmlWriter.Create(stream, new XmlWriterSettings {
                    Indent = true
                }))
                {
                    WriteRoot();

                    var claims = RUTExportItem.Create(documents);

                    WriteClaimsStart(documents.First().ClaimNbr.ToString());

                    foreach (var c in claims)
                    {
                        WritePersonClaim(c);
                    }

                    WriteEnd();

                    Writer.Flush();
                    return(stream.ToArray());
                }
            }
        }
Esempio n. 2
0
 protected override void WriteSpecialPersonClaimInfo(RUTExportItem item)
 {
     if (IsForProperty(item.RutRotInvoice))
     {
         WriteHtko(PropertyID, item.RutRotInvoice.ROTEstateAppartment);
     }
     else
     {
         WriteHtko(ApartmentID, item.RutRotInvoice.ROTEstateAppartment);
         WriteHtko(OrganizationNbr, OrgNbrPrefix + item.RutRotInvoice.ROTOrganizationNbr);
     }
 }
Esempio n. 3
0
        protected void WritePersonClaim(RUTExportItem item)
        {
            WriteStartHtko(Claim);

            WriteHtko(Buyer, item.PersonID);
            WriteHtko(PayDate, item.PayDate.ToString("yyyy-MM-dd"));
            WriteHtko(InvoiceAmt, AmountString(item.TotalAmtForWork));
            WriteHtko(PaidAmt, AmountString(item.PaidAmt));
            WriteHtko(ClaimedAmt, AmountString(item.ClaimedAmt));
            if (!String.IsNullOrWhiteSpace(item.InvoiceNbr))
            {
                WriteHtko(InvoiceNbr, item.InvoiceNbr);
            }

            WriteSpecialPersonClaimInfo(item);

            Writer.WriteEndElement();
        }
Esempio n. 4
0
        protected void WritePersonClaim(RUTExportItem item)
        {
            WriteStartHtko(Claim);

            WriteHtko(Buyer, item.PersonID);
            WriteHtko(PayDate, item.PayDate.ToString("yyyy-MM-dd"));
            WriteHtko(InvoiceAmt, AmountString(item.TotalAmtForWork));
            WriteHtko(PaidAmt, AmountString(item.PaidAmt));
            WriteHtko(ClaimedAmt, AmountString(item.ClaimedAmt));
            if (!String.IsNullOrWhiteSpace(item.InvoiceNbr))
            {
                WriteHtko(InvoiceNbr, item.InvoiceNbr);
            }

            WriteSpecialPersonClaimInfo(item);

            Writer.WriteEndElement();
        }
Esempio n. 5
0
 protected virtual void WriteSpecialPersonClaimInfo(RUTExportItem item)
 {
 }
Esempio n. 6
0
 protected virtual void WriteSpecialPersonClaimInfo(RUTExportItem item)
 {
 }
Esempio n. 7
0
 protected override void WriteSpecialPersonClaimInfo(RUTExportItem item)
 {
     if (IsForProperty(item.RutRotInvoice))
     {
         WriteHtko(PropertyID, item.RutRotInvoice.ROTEstateAppartment);
     }
     else
     {
         WriteHtko(ApartmentID, item.RutRotInvoice.ROTEstateAppartment);
         WriteHtko(OrganizationNbr, OrgNbrPrefix + item.RutRotInvoice.ROTOrganizationNbr);
     }
 }