private void btnSendEmail_Click(object sender, EventArgs e)
        {
            try
            {
                if (objMaster.Current == null || objMaster.Current.Id == 0)
                {
                    return;
                }
                long id = objMaster.Current.Id;

                frmInvoiceReport frm = new frmInvoiceReport();
                frm.ObjInvoice = objMaster.Current;

                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, this.companyEmail);
            }
            catch (Exception ex)
            {
                ENUtils.ShowMessage(ex.Message);
            }
            //if (objMaster.Current == null || objMaster.Current.Id == 0) return;
            //long id = objMaster.Current.Id;
            //frmPreAccInvoiceReport frm = new frmPreAccInvoiceReport();
            //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, this.companyEmail);
        }
예제 #2
0
        private void btnSendEmail_Click(object sender, EventArgs e)
        {
            if (objMaster.Current == null || objMaster.Current.Id == 0)
            {
                return;
            }
            long id = objMaster.Current.Id;

            frmInvoiceReport frm = new frmInvoiceReport();


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

            frm.DataSource = list;


            frm.GenerateReport();

            frm.SendEmail(objMaster.Current.InvoiceNo, this.companyEmail);
        }