Exemplo n.º 1
0
        private void attFBLalways(int hID, string rptKod)
        {
            string       fn  = "FBL" + hID + ".pdf";
            FblXR        rpr = new FblXR(hID, true);
            MemoryStream ms  = new MemoryStream();

            rpr.ExportToPdf(ms);
            ms.Seek(0, System.IO.SeekOrigin.Begin);

            RPT rpt = new RPT();

            rpt.rptKod     = rptKod;
            rpt.refTO      = "OPH";
            rpt.refID      = hID;
            rpt.info       = string.Format("H:{0}", hID);
            rpt.attachment = new Attachment(ms, fn);
            attCheckedListBoxControl.Items.Add(rpt, string.Format("{0}", fn), CheckState.Checked, true);

            Application.DoEvents();
        }
Exemplo n.º 2
0
        private void attFBL(int hID)
        {
            if (pvtQueriesTableAdapter.RPH_CHECK("FBL", "OPH", hID).ToString() == "T")    // House'dan basildiysa
            {
                string       fn  = "FBL" + hID + ".pdf";
                FblXR        rpr = new FblXR(hID, true);
                MemoryStream ms  = new MemoryStream();
                rpr.ExportToPdf(ms);
                ms.Seek(0, System.IO.SeekOrigin.Begin);

                RPT rpt = new RPT();
                rpt.rptKod     = "FBL";
                rpt.refTO      = "OPH";
                rpt.refID      = hID;
                rpt.info       = string.Format("H:{0}", hID);
                rpt.attachment = new Attachment(ms, fn);
                attCheckedListBoxControl.Items.Add(rpt, string.Format("{0}", fn), CheckState.Checked, true);

                Application.DoEvents();
            }
        }