Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CashDispenserReceipt rpt = new CashDispenserReceipt();

            rpt.Site = this.Site;
            return(rpt);
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     CashDispenserReceipt rpt = new CashDispenserReceipt();
     rpt.Site = this.Site;
     return rpt;
 }
        internal void PrintCashDispenserReceipt(string sWorkstation, string primaryFieldName, string primaryFieldvalue, decimal dAmount)
        {
            try
            {
                string sVersion, sSiteName;

                var rCashDispenserReceipt = new CashDispenserReceipt();

                //rCashDispenserReceipt.SetDataSource(DSDeclaration);
                rCashDispenserReceipt.SetParameterValue("UserName", Security.SecurityHelper.CurrentUser.UserName);
                rCashDispenserReceipt.SetParameterValue("Workstation", sWorkstation);
                GetVersion_SiteName(out  sVersion, out  sSiteName);
                rCashDispenserReceipt.SetParameterValue("siteName", sSiteName);
                rCashDispenserReceipt.SetParameterValue("BMCVersion", sVersion);
                rCashDispenserReceipt.SetParameterValue("CurrencyCulture", ExtensionMethods.CurrentCurrenyCulture);
                rCashDispenserReceipt.SetParameterValue("CurrencySymbol", ExtensionMethods.CurrentCurrenyCulture.GetCurrencySymbol());
                rCashDispenserReceipt.SetParameterValue("DateCulture", ExtensionMethods.CurrentDateCulture);
                rCashDispenserReceipt.SetParameterValue("PrimaryFieldName", primaryFieldName);
                rCashDispenserReceipt.SetParameterValue("VoucherNumber", primaryFieldvalue);
                rCashDispenserReceipt.SetParameterValue("Voucher Value", dAmount);

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

                AuditReports();

                strReportName = "Cash Dispenser Report";
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }