private void CMprintToolStripMenuItem_Click(object sender, EventArgs e) { int OPMid = (int)opmGridView.GetFocusedRowCellValue(colOPMID); CargoManifestXR rpr = new CargoManifestXR(OPMid); using (ReportPrintTool printTool = new ReportPrintTool(rpr)) { printTool.ShowPreviewDialog(); rpti.put("CM", "OPM", OPMid, Program.USR, "F", null); Program.MF.reportDone(rpti); } }
private void CMeMailToolStripMenuItem_Click(object sender, EventArgs e) { int OPMid = (int)opmGridView.GetFocusedRowCellValue(colOPMID); CargoManifestXR rpr = new CargoManifestXR(OPMid); if (string.IsNullOrWhiteSpace(rpr.eMails)) { XtraMessageBox.Show("eMail adresi bulunamadı", "eMail Cargo Manifest", MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } rpti.put("CM", "OPM", OPMid, Program.USR, "F", "eMail"); MailClass.MailReportTask(rpti, "eMail CargoManifest", rpr, rpr.eMails, rpr.eMailSubject, rpr.eMailBody); }
private void attCargoManifest(int mID) { string fn = "CargoManifest" + mID + ".pdf"; CargoManifestXR rpr = new CargoManifestXR(mID); MemoryStream ms = new MemoryStream(); rpr.ExportToPdf(ms); ms.Seek(0, System.IO.SeekOrigin.Begin); RPT rpt = new RPT(); rpt.rptKod = "CM"; rpt.refTO = "OPM"; rpt.refID = mID; rpt.info = string.Format("M:{0}", mID); rpt.attachment = new Attachment(ms, fn); attCheckedListBoxControl.Items.Add(rpt, string.Format("{0}", fn), CheckState.Checked, true); Application.DoEvents(); }