示例#1
0
        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);
            }
        }
示例#2
0
        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);
        }
示例#3
0
        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();
        }