Exemplo n.º 1
0
 private void btnExportPDF_Click(object sender, EventArgs e)
 {
     try
     {
         if (objMaster.Current == null || objMaster.Current.Id == 0)
         {
             return;
         }
         long id = objMaster.Current.Id;
         rptfrmCustomerInvoice frm = new rptfrmCustomerInvoice();
         var list  = General.GetQueryable <vu_Invoice>(a => a.Id == id).ToList();
         int count = list.Count;
         frm.DataSource = list;
         frm.GenerateReport();
         frm.ExportReport(objMaster.Current.InvoiceNo);
     }
     catch (Exception ex)
     {
         ENUtils.ShowMessage(ex.Message);
     }
     //if (objMaster.Current == null || objMaster.Current.Id == 0) return;
     //long id = objMaster.Current.Id;
     //rptfrmCustomerInvoice frm = new rptfrmCustomerInvoice();
     //var list = General.GetQueryable<vu_Invoice>(a => a.Id == id).ToList();
     //int count = list.Count;
     //frm.DataSource = list;
     //frm.GenerateReport();
     //frm.ExportReport(objMaster.Current.InvoiceNo);
 }
        private void btnExportPDF_Click(object sender, EventArgs e)
        {
            if (objMaster.Current == null || objMaster.Current.Id == 0)
            {
                return;
            }
            long id = objMaster.Current.Id;

            rptfrmCustomerInvoice frm = new rptfrmCustomerInvoice();


            var list  = General.GetQueryable <vu_Invoice>(a => a.Id == id).ToList();
            int count = list.Count;

            frm.DataSource = list;


            frm.GenerateReport();

            frm.ExportReport(objMaster.Current.InvoiceNo);
        }