public override void Print()
        {
            if (objMaster.Current == null || objMaster.Current.Id == 0)
            {
                return;
            }
            long id = objMaster.Current.Id;

            frmEscortInvoiceReport frm = new frmEscortInvoiceReport();


            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("frmEscortInvoiceReport1");

            if (doc != null)
            {
                doc.Close();
            }

            UI.MainMenuForm.MainMenuFrm.ShowForm(frm);
            //  MainMenuForm.MainMenuFrm.ShowForm(frm);
        }
        private void ExportReport(string exportTo)
        {
            if (objMaster.Current == null || objMaster.Current.Id == 0)
            {
                return;
            }
            long id = objMaster.Current.Id;

            frmEscortInvoiceReport frm = new frmEscortInvoiceReport();


            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, "pdf");
        }
        private void btnSendEmail_Click(object sender, EventArgs e)
        {
            if (objMaster.Current == null || objMaster.Current.Id == 0)
            {
                return;
            }
            long id = objMaster.Current.Id;

            frmEscortInvoiceReport frm = new frmEscortInvoiceReport();


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

            frm.DataSource = list;


            frm.GenerateReport();

            this.companyEmail = General.GetObject <Gen_Escort>(c => c.Id == objMaster.Current.EscortId).DefaultIfEmpty().EmailAddress.ToStr().Trim();

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