private void tsItemDruckenDatenblattVorschau_Click(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; //Alle angezeigten KundenID's auslesen. List<int> data = new List<int>(); foreach (DataGridViewRow row in dgrKunden.Rows) { DataGridViewCheckBoxCell cell = row.Cells[0] as DataGridViewCheckBoxCell; if (cell.Value != null) { data.Add((int)row.Cells["KundeID"].Value); } } var report = ReportManager.GetReportByNameForSelectedRecord(EReports.Kundendatenblatt, data); var r = new Form_Report(report); r.Show(); r.Refresh(); this.Cursor = Cursors.Default; }
private void tsItemDrucken_Click(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; var report = ReportManager.GetReportByName(EReports.Inventurliste); var r = new Form_Report(report); r.Show(); r.Refresh(); this.Cursor = Cursors.Default; }
private void button1_Click(object sender, EventArgs e) { //this.Cursor = Cursors.WaitCursor; using (var dbContext = new DataBaseDataContext()) { // Tabelleninhalt löschen dbContext.ExecuteCommand("TRUNCATE TABLE Brief"); dbContext.SubmitChanges(); var brief = new Brief { Betreff = tbxBetreff.Text, Text = tbxText.Text, Bauvorhaben = tbxBauvorhaben.Text, ZuHaenden = tbxHaenden.Text, Anrede = cobAnrede.Text }; dbContext.Brief.InsertOnSubmit(brief); dbContext.SubmitChanges(); } //Close(); //Func.FBrief = null; switch (reportType) { case EReports.Brief: report = ReportManager.GetReportByNameForSelectedRecord(EReports.Brief, kundennr); break; case EReports.AbsageProgramm: report = ReportManager.GetReportByNameForSelectedRecord(EReports.AbsageProgramm, kundennr); break; case EReports.AbsageWirkungskreis: report = ReportManager.GetReportByNameForSelectedRecord(EReports.AbsageWirkungskreis, kundennr); break; } var r = new Form_Report(report); r.Show(); // r.Refresh(); // this.Cursor = Cursors.Default; }