private void button2_Click(object sender, EventArgs e) { DBSummon dbs = new DBSummon(); SummonVO svo = dbs.GetSummonByIDS(dgSummon.SelectedRows[0].Cells["ids"].Value.ToString()); SummonVOForReport svor = new SummonVOForReport(svo); List <SummonVOForReport> sl = new List <SummonVOForReport>(); sl.Add(svor); ShowReport sr = new ShowReport(sl); sr.ShowDialog(); }
private void bPrint_Click(object sender, EventArgs e) { DBSummon dbs = new DBSummon(); SummonVO svo = dbs.GetSummonByIDS(tbIDS.Text); SummonVOForReport svor = new SummonVOForReport(svo); List <SummonVOForReport> sl = new List <SummonVOForReport>(); sl.Add(svor); ShowReport sr = new ShowReport(sl); sr.ShowDialog(); }
private void печатьToolStripMenuItem1_Click(object sender, EventArgs e) { // mf.PrintMenuItem_Click(sender, e); if (dgSummon.SelectedRows.Count == 0) { MessageBox.Show("Извещение не выбрано!"); return; } DBSummon dbs = new DBSummon(); SummonVO svo = dbs.GetSummonByIDS(dgSummon.SelectedRows[0].Cells["ids"].Value.ToString()); SummonVOForReport svor = new SummonVOForReport(svo); List <SummonVOForReport> sl = new List <SummonVOForReport>(); sl.Add(svor); ShowReport sr = new ShowReport(sl); sr.ShowDialog(); }