Exemplo n.º 1
0
 private void btnPrintInvoice_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtInvoiceNo.Text != "" && Convert.ToInt32(txtInvoiceNo.Text) != 0)
         {
             DataHolder.InvoiceNo = Convert.ToInt32(txtInvoiceNo.Text);
             db.Execute("delete from Temp");
             db.Execute("insert into Temp (F1) values(" + DataHolder.InvoiceNo + ")");
             frmReport frm = new frmReport();
             frm.rptViewer.ReportSource = new Invoice();
             frm.Text = "Inovice";
             frm.Show();
         }
         else
         {
             MessageBox.Show("Please Enter Bill Number", "Bill Number Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 2
0
 private void btnInvoice_Click(object sender, EventArgs e)
 {
     frmReport frm = new frmReport();
     frm.rptViewer.ReportSource = new PurchaseRpt();
     frm.Show();
 }
Exemplo n.º 3
0
        //############################################ Print Invoice Button ############################//
        private void btnInvoice_Click(object sender, EventArgs e)
        {
            db.Execute("delete from Temp");
            db.Execute("insert into Temp (F1) values(" + DataHolder.InvoiceNo + ")");
            frmReport frm = new frmReport();
            frm.rptViewer.ReportSource = new Invoice();
            frm.Text = "Inovice";
            frm.Show();
            //frm.rptViewer.PrintReport();

            // InvPrintPreviewDialog.Document = InvPrintDocument;
            // InvPrintPreviewDialog.ShowDialog();
        }