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); }
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ł")); }
public Form1() { InitializeComponent(); _xlsx = new xlsx(); this.BtnConfirm.Click += new EventHandler(btn_Click); this.SrcPath.MouseClick += new MouseEventHandler(showOpenFileDialog); this.SrcPattern.MouseClick += new MouseEventHandler(showOpenFileDialog); this.SrcPath.Text = Settings.read("SrcPath"); this.SrcPattern.Text = Settings.read("SrcPattern"); this.DealNoTb.Text = Settings.read("DealNoTb"); Console.WriteLine("*** Funkcje programu zostały załadowane poprawnie ***"); }