Esempio n. 1
0
        void WriteAnalysisAttributesSuffix(ATransactionRow transaction)
        {
            FMainDS.ATransAnalAttrib.DefaultView.Sort      = ATransAnalAttribTable.GetAnalysisTypeCodeDBName();
            FMainDS.ATransAnalAttrib.DefaultView.RowFilter =
                String.Format("{0}={1} and {2}={3} and {4}={5} and {6}={7}",
                              ATransAnalAttribTable.GetLedgerNumberDBName(),
                              transaction.LedgerNumber,
                              ATransAnalAttribTable.GetBatchNumberDBName(),
                              transaction.BatchNumber,
                              ATransAnalAttribTable.GetJournalNumberDBName(),
                              transaction.JournalNumber,
                              ATransAnalAttribTable.GetTransactionNumberDBName(),
                              transaction.TransactionNumber);


            DataView anaView = FMainDS.ATransAnalAttrib.DefaultView;

            for (int i = 1; i <= maxNumValuesExport; i++)
            {
                if (i <= anaView.Count)
                {
                    ATransAnalAttribRow ar = (ATransAnalAttribRow)anaView[i - 1].Row;
                    WriteStringQuoted(ar.AnalysisTypeCode, false);
                    WriteStringQuoted(ar.AnalysisAttributeValue, (i == maxNumValuesExport));
                }
                else
                {
                    WriteStringQuoted("", false);
                    WriteStringQuoted("", (i == maxNumValuesExport));
                }
            }
        }