private void btnSendEmail_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.SendEmail(objMaster.Current.InvoiceNo, EmailAddress); } 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.SendEmail(objMaster.Current.InvoiceNo); }
private void btnSendEmail_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.SendEmail(objMaster.Current.InvoiceNo, EmailAddress); }