public FormStampa(nalaz nalaz) { InitializeComponent(); report = new XtraReport1(); report.Parameters["nalaz"].Value = nalaz.nalaz_tekst; //report.Parameters["datum_pregled"].Value = nalaz.datum_pregleda.ToString("dd.MM.yyyy. HH:mm"); report.Parameters["datum_pregled"].Value = nalaz.info_datum; report.Parameters["Datum_rodj"].Value = (nalaz.datum_rodj != null) ? nalaz.datum_rodj.Value.ToString("dd.MM.yyyy.") : ""; report.Parameters["hospital"].Value = nalaz.hospital.naziv; report.Parameters["Ime"].Value = nalaz.ime; report.Parameters["Prezime"].Value = nalaz.prezime; report.Parameters["Modalitet"].Value = nalaz.modalitet.naziv; report.Parameters["operater"].Value = (nalaz.operater != null) ? nalaz.operater.info_naziv : ""; report.Parameters["doktor"].Value = (nalaz.doktor != null) ? nalaz.doktor.info_naziv : ""; report.Parameters["napomena"].Value = nalaz.napomena; if (String.IsNullOrWhiteSpace(nalaz.napomena)) { report.Napomena_label.Visible = false; report.Napomena_label2.Visible = false; } //report.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0); report.CreateDocument(); ReportPrintTool printtool = new ReportPrintTool(report); printtool.ShowRibbonPreview(); this.Close(); //documentViewer1.DocumentSource = report; //documentViewer1.Refresh(); }
public FormStampa(nalaz nalaz, string hospital, string modalitet, string operater, string doktor) { InitializeComponent(); report = new XtraReport1(); report.Parameters["nalaz"].Value = nalaz.nalaz_tekst; report.Parameters["datum_pregled"].Value = nalaz.datum_pregleda.ToString("dd.MM.yyyy., HH:mm"); report.Parameters["Datum_rodj"].Value = (nalaz.datum_rodj != null) ? nalaz.datum_rodj.Value.ToString("dd.MM.yyyy.") : ""; report.Parameters["hospital"].Value = hospital; report.Parameters["Ime"].Value = nalaz.ime; report.Parameters["Prezime"].Value = nalaz.prezime; report.Parameters["Modalitet"].Value = modalitet; report.Parameters["operater"].Value = operater; report.Parameters["doktor"].Value = doktor; report.Parameters["napomena"].Value = nalaz.napomena; if (String.IsNullOrWhiteSpace(nalaz.napomena)) { report.Napomena_label.Visible = false; report.Napomena_label2.Visible = false; } report.CreateDocument(); ReportPrintTool printtool = new ReportPrintTool(report); printtool.ShowRibbonPreview(); //documentViewer1.DocumentSource = report; //documentViewer1.Refresh(); }
public FormAddEditNalaz(nalaz _nalaz) { InitializeComponent(); Baza = new Database(); lookUpEditDoktor.Properties.DataSource = Baza.doktor.ToList(); lookUpEditHospital.Properties.DataSource = Baza.hospital.ToList(); lookUpEditMaska.Properties.DataSource = Baza.maska.ToList(); lookUpEditModalitet.Properties.DataSource = Baza.modalitet.ToList(); lookUpEditOperater.Properties.DataSource = Baza.operater.ToList(); //lookUpEditSabloni.Properties.DataSource = Baza.nalazDefault.ToList(); isEdit = true; nalaz = Baza.nalaz.First(qq => qq.id_nalaz == _nalaz.id_nalaz); NalazBindingSource.DataSource = nalaz; }
public FormAddEditNalaz() { InitializeComponent(); Baza = new Database(); lookUpEditDoktor.Properties.DataSource = Baza.doktor.ToList(); lookUpEditHospital.Properties.DataSource = Baza.hospital.ToList(); lookUpEditMaska.Properties.DataSource = Baza.maska.ToList(); lookUpEditModalitet.Properties.DataSource = Baza.modalitet.ToList(); lookUpEditOperater.Properties.DataSource = Baza.operater.ToList(); //lookUpEditSabloni.Properties.DataSource = Baza.nalazDefault.ToList(); nalaz = new nalaz(); nalaz.datum_pregleda = DateTime.Now; NalazBindingSource.DataSource = nalaz; }