Example #1
0
        static public void insertSum(DocX document, xlsx x_, string[] arrOfICD)
        {
            double sum = 0.0;

            for (int i = 0; i < arrOfICD.Length; i++)
            {
                double tmpVal = x_.findCost(arrOfICD[i]) == 0.0 ? 0 : x_.findCost(arrOfICD[i]);
                sum += tmpVal;
            }
            Console.WriteLine(sum);
            addParagraph(document, "Suma kosztów świadczeń: ", string.Concat(sum.ToString(), " zł"));
        }
Example #2
0
        static public Table addTBRows(DocX document, Table table, string[] arrOfICD, xlsx x_)
        {
            for (int i = 0; i < arrOfICD.Length; i++)
            {
                table.Rows[i + 1].Cells[0].Paragraphs[0].Append(x_.findName(arrOfICD[i]) == null?"BRAK DANYCH": x_.findName(arrOfICD[i]));
                table.Rows[i + 1].Cells[1].Paragraphs[0].Append(x_.findCost(arrOfICD[i]) == 0.0?"BRAK DANYCH": x_.findCost(arrOfICD[i]).ToString());
                table.Rows[i + 1].Cells[2].Paragraphs[0].Append(arrOfICD[i]);
            }

            return(table);
        }