Exemple #1
0
        private void ReadBody()
        {
            int i           = (_invoice.IsRub) ? 12 : 11; //первая строка с данными
            int incement    = (_invoice.IsRub) ? 7 : 4;
            int readBlocks  = 0;
            int countBlocks = GetCountBlocks();

            while (readBlocks < countBlocks)
            {
                currentCell = (_invoice.IsRub) ? "Q" + i : "D" + i;
                while (_excelBook.getValue(currentCell, currentCell) != null)
                {
                    DCRow dcRow = new DCRow();

                    currentCell = (_invoice.IsRub) ? "Q" + i : "D" + i; //№ документа
                    dcRow.SetNumber(_excelBook.getValue(currentCell, currentCell));

                    currentCell = (_invoice.IsRub) ? "F" + i : "E" + i; //Счёт дебет
                    dcRow.SetOrdp(_excelBook.getValue(currentCell, currentCell));

                    currentCell = (_invoice.IsRub) ? "J" + i : "G" + i; //Счёт кредит
                    dcRow.SetBenm(_excelBook.getValue(currentCell, currentCell));

                    currentCell = (_invoice.IsRub) ? "AA" + i : "Y" + i; //Назначение платежа
                    dcRow.SetCom(_excelBook.getValue(currentCell, currentCell));

                    currentCell = (_invoice.IsRub) ? "L" + i : "I" + i; //Сумма по дебету
                    if ((_excelBook.getValue(currentCell, currentCell) != null) && (_excelBook.getValue(currentCell, currentCell).ToString() != string.Empty))
                    {
                        dcRow.SetSum(_excelBook.getValue(currentCell, currentCell));

                        if (dcRow.Sum != 0.0)
                        {
                            Debet.Add(dcRow);
                        }
                    }
                    else
                    {
                        currentCell = (_invoice.IsRub) ? "P" + i : "O" + i; //Сумма по кредиту
                        dcRow.SetSum(_excelBook.getValue(currentCell, currentCell));

                        if (dcRow.Sum != 0.0)
                        {
                            Credit.Add(dcRow);
                        }
                    }

                    i++;
                    currentCell = (_invoice.IsRub) ? "Q" + i : "D" + i;
                }

                i += incement;
                readBlocks++;
            }

            ReadTails(i - incement);
        }
Exemple #2
0
        private void ReadBody()
        {
            int i = (_invoice.IsRub) ? 12 : 11; //первая строка с данными
            int incement = (_invoice.IsRub) ? 7 : 4;
            int readBlocks = 0;
            int countBlocks = GetCountBlocks();

            while (readBlocks < countBlocks)
            {
                currentCell = (_invoice.IsRub) ? "Q" + i : "D" + i;
                while (_excelBook.getValue(currentCell, currentCell) != null)
                {
                    DCRow dcRow = new DCRow();

                    currentCell = (_invoice.IsRub) ? "Q" + i : "D" + i; //№ документа
                    dcRow.SetNumber(_excelBook.getValue(currentCell, currentCell));

                    currentCell = (_invoice.IsRub) ? "F" + i : "E" + i; //Счёт дебет
                    dcRow.SetOrdp(_excelBook.getValue(currentCell, currentCell));

                    currentCell = (_invoice.IsRub) ? "J" + i : "G" + i; //Счёт кредит
                    dcRow.SetBenm(_excelBook.getValue(currentCell, currentCell));

                    currentCell = (_invoice.IsRub) ? "AA" + i : "Y" + i; //Назначение платежа
                    dcRow.SetCom(_excelBook.getValue(currentCell, currentCell));

                    currentCell = (_invoice.IsRub) ? "L" + i : "I" + i; //Сумма по дебету
                    if ((_excelBook.getValue(currentCell, currentCell) != null) && (_excelBook.getValue(currentCell, currentCell).ToString() != string.Empty))
                    {
                        dcRow.SetSum(_excelBook.getValue(currentCell, currentCell));

                        if (dcRow.Sum != 0.0)
                            Debet.Add(dcRow);
                    }
                    else
                    {
                        currentCell = (_invoice.IsRub) ? "P" + i : "O" + i; //Сумма по кредиту
                        dcRow.SetSum(_excelBook.getValue(currentCell, currentCell));

                        if (dcRow.Sum != 0.0)
                            Credit.Add(dcRow);
                    }

                    i++;
                    currentCell = (_invoice.IsRub) ? "Q" + i : "D" + i;
                }

                i += incement;
                readBlocks++;
            }

            ReadTails(i - incement);
        }
Exemple #3
0
 public void Add(DCRow row)
 {
     _list.Add(row);
 }
Exemple #4
0
 public void Add(DCRow row)
 {
     _list.Add(row);
 }