private void button2_Click(object sender, EventArgs e)
        {
            if (gv_fatura.SelectedRowsCount <= 0)
            {
                return;
            }

            rp_fatura s = new rp_fatura(Convert.ToInt32(gv_fatura.GetDataRow(gv_fatura.GetSelectedRows()[0])["fatura_id"].ToString()));

            s.CreateDocument();
            disa_aktar d = new disa_aktar();

            d.rp_viewer.DocumentSource = s;
            d.ShowDialog();
        }
Esempio n. 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (gv_fatura.SelectedRowsCount <= 0)
            {
                return;
            }

            /*rp_fatura s = new rp_fatura(Convert.ToInt32(gv_fatura.GetDataRow(gv_fatura.GetSelectedRows()[0])["fatura_id"].ToString()));
             * s.CreateDocument();
             * disa_aktar d = new disa_aktar();
             * d.rp_viewer.DocumentSource = s;
             * d.ShowDialog();*/

            rp_fatura       s         = new rp_fatura(Convert.ToInt32(gv_fatura.GetDataRow(gv_fatura.GetSelectedRows()[0])["fatura_id"].ToString()));
            ReportPrintTool printTool = new ReportPrintTool(s);

            try { printTool.Print(text); } catch (Exception ect) { printTool.Print(); }
        }