Exemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            VoidVoucherReceipt rpt = new VoidVoucherReceipt();

            rpt.Site = this.Site;
            return(rpt);
        }
		internal void PrintVoidVoucherReceipt(string sWorkstation, string sVoucherNumber, decimal dAmount, int iTransactionNo,string sCode,int iSequenceNo)
        {
            try
            {
                string sVersion, sSiteName;
                string sCurrency = string.Empty;

                if (ExtensionMethods.CurrentCurrenyCulture.GetCurrencySymbol() == "£")
                {
                    sCurrency = "GBP";                    
                }
                else if (ExtensionMethods.CurrentCurrenyCulture.GetCurrencySymbol() == "€")
                {
                    sCurrency = "EUR";
                }
                else
                {
                    sCurrency = "$";
                }

                var rVoidVoucherReceipt = new VoidVoucherReceipt();
                rVoidVoucherReceipt.SetParameterValue("UserName", Security.SecurityHelper.CurrentUser.First_Name + "," + Security.SecurityHelper.CurrentUser.Last_Name);
                rVoidVoucherReceipt.SetParameterValue("Workstation", sWorkstation);
                GetVersion_SiteName(out  sVersion, out  sSiteName);
                rVoidVoucherReceipt.SetParameterValue("siteName", sSiteName);
                rVoidVoucherReceipt.SetParameterValue("BMCVersion", sVersion);
                rVoidVoucherReceipt.SetParameterValue("CurrencyCulture", ExtensionMethods.CurrentCurrenyCulture);
                rVoidVoucherReceipt.SetParameterValue("CurrencySymbol", sCurrency);
                rVoidVoucherReceipt.SetParameterValue("DateCulture", ExtensionMethods.CurrentDateCulture);
                rVoidVoucherReceipt.SetParameterValue("VoucherNumber", sVoucherNumber);
                rVoidVoucherReceipt.SetParameterValue("Voucher Value", dAmount);
                rVoidVoucherReceipt.SetParameterValue("TransactionNo", iTransactionNo);
                rVoidVoucherReceipt.SetParameterValue("sCode", sCode);
                rVoidVoucherReceipt.SetParameterValue("SequenceNumber", iSequenceNo);
                rVoidVoucherReceipt.SetParameterValue("SHOW_NAME_IN_RECEPIT_SIGNATURE", Settings.SHOW_NAME_IN_RECEPIT_SIGNATURE);
                rVoidVoucherReceipt.SetParameterValue("HeadCashierSig", Convert.ToDouble(Settings.HeadCashierSig) / 100);
                rVoidVoucherReceipt.SetParameterValue("ManagerSig",Convert.ToDouble(Settings.ManagerSig) / 100);


                crystalReportViewer.ReportSource = rVoidVoucherReceipt;
                crystalReportViewer.PrintReport();

                AuditReports();

                strReportName = "Void Voucher Report";
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     VoidVoucherReceipt rpt = new VoidVoucherReceipt();
     rpt.Site = this.Site;
     return rpt;
 }