private void zobraz() { try { XPathDocument doc = new XPathDocument(najdiXmlko(cestaKXmlkam)); XPathNavigator navigator = doc.CreateNavigator(); textBox2.Text = nacitajParameter(navigator, "/FILE/ZMLUVA/CENAO").Replace(".00", ""); textBox3.Text = nacitajParameter(navigator, "/FILE/ZMLUVA/SPLODB"); textBox4.Text = nacitajParameter(navigator, "/FILE/ZMLUVA/EVIDCO"); textBox5.Text = nacitajParameter(navigator, "/FILE/ZMLADR/STAT", 1) + " " + nacitajParameter(navigator, "/FILE/ZMLADR/MESTO", 1); textBox6.Text = nacitajParameter(navigator, "/FILE/ZMLADR/STAT", 2) + " " + nacitajParameter(navigator, "/FILE/ZMLADR/MESTO", 2); textBox7.Text = nacitajParameter(navigator, "/FILE/ORGAN/ORGANOF") + "\r\n" + nacitajParameter(navigator, "/FILE/ORGAN/ORGAN3") + "\r\n" + nacitajParameter(navigator, "/FILE/ORGAN/ORGAN4") + "\r\n" + nacitajParameter(navigator, "/FILE/ORGAN/PSC") + "\r\n" + "IČO " + nacitajParameter(navigator, "/FILE/ORGAN/ICO") + "\r\n" + "DIČ " + nacitajParameter(navigator, "/FILE/ORGAN/DIC") + "\r\n" + "IČ DPH " + nacitajParameter(navigator, "/FILE/ORGAN/VAT") + "\r\n"; DateTime d = DateTime.ParseExact(nacitajParameter(navigator, "/FILE/ZMLADR/TERMDAT", 1), "yyyy-MM-dd", null); textBox8.Text = d.ToString("dd.MM.yyyy"); textBox1.Text = (1 + zistiCisloOstatnej(cestaKFakturam)).ToString("000"); o = new Obsah(); o.rok = DateTime.ParseExact(nacitajParameter(navigator, "/FILE/ZMLADR/TERMDAT", 1), "yyyy-MM-dd", null).ToString("yyyy"); o.cislo_faktury_trojmiestne = (1 + zistiCisloOstatnej(cestaKFakturam)).ToString("000"); o.cislo_objednavky = nacitajParameter(navigator, "/FILE/ZMLUVA/EVIDCO"); o.splatnost_pocet_dni = nacitajParameter(navigator, "/FILE/ZMLUVA/SPLODB"); o.datum_dodania_sluzby_dd_MM_yyyy = DateTime.ParseExact(nacitajParameter(navigator, "/FILE/ZMLADR/TERMDAT", 1), "yyyy-MM-dd", null).ToString("dd.MM.yyyy"); o.adresa = "<text:p text:style-name=\"P1\">" + nacitajParameter(navigator, "/FILE/ORGAN/ORGANOF") + "</text:p>" + "\r\n" + "<text:p text:style-name=\"P1\">" + nacitajParameter(navigator, "/FILE/ORGAN/ORGAN3") + "</text:p>" + "\r\n" + "<text:p text:style-name=\"P1\">" + nacitajParameter(navigator, "/FILE/ORGAN/ORGAN4") + "</text:p>" + "\r\n" + "<text:p text:style-name=\"P1\">" + nacitajParameter(navigator, "/FILE/ORGAN/PSC") + "</text:p>" + "\r\n" + "<text:p text:style-name=\"P1\"/>\r\n" + "<text:p text:style-name=\"P1\">" + "IČO " + nacitajParameter(navigator, "/FILE/ORGAN/ICO") + "</text:p>" + "\r\n" + "<text:p text:style-name=\"P1\">" + "DIČ " + nacitajParameter(navigator, "/FILE/ORGAN/DIC") + "</text:p>" + "\r\n" + "<text:p text:style-name=\"P1\">" + "IČ DPH " + nacitajParameter(navigator, "/FILE/ORGAN/VAT") + "</text:p>" + "\r\n"; o.cena_bez_desatinnej_casti = nacitajParameter(navigator, "/FILE/ZMLUVA/CENAO").Replace(".00", ""); o.miesto_nakladky = nacitajParameter(navigator, "/FILE/ZMLADR/STAT", 1) + " " + nacitajParameter(navigator, "/FILE/ZMLADR/MESTO", 1); o.miesto_vykladky = nacitajParameter(navigator, "/FILE/ZMLADR/STAT", 2) + " " + nacitajParameter(navigator, "/FILE/ZMLADR/MESTO", 2); } catch (Exception ee) { MessageBox.Show(ee.Message); } }