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); }
public override void Print() { 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(); DockWindow doc = UI.MainMenuForm.MainMenuFrm.GetDockByName("rptfrmCustomerInvoice1"); if (doc != null) { doc.Close(); } UI.MainMenuForm.MainMenuFrm.ShowForm(frm); //if (objMaster.Current == null || objMaster.Current.Id == 0) return; //long id = objMaster.Current.Id; //rptfrmPreCustomerInvoice frm = new rptfrmPreCustomerInvoice(); //var list = General.GetQueryable<vu_Invoice>(a => a.Id == id).ToList(); //int count = list.Count; //frm.DataSource = list; //frm.GenerateReport(); //DockWindow doc = UI.MainMenuForm.MainMenuFrm.GetDockByName("rptfrmPreCustomerInvoice1"); //if (doc != null) //{ // doc.Close(); //} //UI.MainMenuForm.MainMenuFrm.ShowForm(frm); // MainMenuForm.MainMenuFrm.ShowForm(frm); } catch (Exception ex) { ENUtils.ShowMessage(ex.Message); } }
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); }