private void btnPrint_Click(object sender, EventArgs e)
        {
            string sql = "";

            System.Collections.Hashtable ht = new System.Collections.Hashtable();

            ht.Add("paramCompany", bllUtility.LoggedInSystemInformation.CompanyName);
            ht.Add("paramComAddress", bllUtility.LoggedInSystemInformation.CompanyAddress);
            ht.Add("paramComContact", bllUtility.LoggedInSystemInformation.CompanyContactNo);
            ht.Add("paramRptTitle", "Purchase Invoice");

            sql = "USP_RptPurchaseInvoice '" + txtPurchaseNo.Text.Trim() + "'";
            rptPurchaseInvoice irptPurchaseInvoice = new rptPurchaseInvoice();

            iReportUtility.PrintPreview(irptPurchaseInvoice, sql, ht, false);
            btnPrint.Enabled = false;
            btnResetForm.Focus();
        }
Example #2
0
        private void PrintPreview(bool IsPrint)
        {
            if (_SelctedInvoice == "")
            {
                XtraMessageBox.Show("You have not selected any Invoice. Please select an Invoice.", "Information");
            }
            else
            {
                string    sql = "";
                Hashtable ht  = new Hashtable();

                ht.Add("paramCompany", bllUtility.LoggedInSystemInformation.CompanyName);
                ht.Add("paramComAddress", bllUtility.LoggedInSystemInformation.CompanyAddress);
                ht.Add("paramComContact", bllUtility.LoggedInSystemInformation.CompanyContactNo);
                ht.Add("paramRptTitle", "Purchase Invoice");

                //string invoiceID = "PUR00000000038";
                sql = "USP_RptPurchaseInvoice '" + _SelctedInvoice.Trim() + "'";
                rptPurchaseInvoice irptPurchaseInvoice = new rptPurchaseInvoice();
                iReportUtility.PrintPreview(irptPurchaseInvoice, sql, ht, IsPrint);
            }
        }