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

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        /// <summary>
        /// 領収書出力
        /// </summary>
        /// <param name="data">データ</param>
        private void OutputRyouusyusyo(DataTable data)
        {
            var row = data.Rows[0];

            var ryousyuusyoDataSet = new TempoRegiRyousyuusyo_DataSet();
            var ryousyuusyoRow     = ryousyuusyoDataSet.D_SelectData_ForTempoRegiRyousyuusyo.NewD_SelectData_ForTempoRegiRyousyuusyoRow();

            // お買上番号
            ryousyuusyoRow.SalesNO = Convert.ToString(row["SalesNO"]);

            // 売上日付
            ryousyuusyoRow.UriageDateTime = ConvertDateTime(row["UriageDateTime"], !string.IsNullOrWhiteSpace(txtPrintDate.Text));

            // 相手名
            ryousyuusyoRow.AiteName = Convert.ToString(row["AiteName"]);

            // 売上額
            ryousyuusyoRow.SalesGaku = ConvertDecimal(row["SalesGaku"]);

            // 消費税額
            var salesTax = ConvertDecimal(row["SalesTax"]);

            ryousyuusyoRow.SalesTax = (string.IsNullOrWhiteSpace(salesTax) || salesTax == "0" ? "" : @"\") + ConvertDecimal(row["SalesTax"]);

            // 会社名
            ryousyuusyoRow.CompanyName = Convert.ToString(row["CompanyName"]);

            // 店舗名
            ryousyuusyoRow.StoreName = Convert.ToString(row["StoreName"]);

            // 住所1
            ryousyuusyoRow.Address1 = Convert.ToString(row["Address1"]);

            // 住所2
            ryousyuusyoRow.Address2 = Convert.ToString(row["Address2"]);

            // 電話番号
            ryousyuusyoRow.TelphoneNO = Convert.ToString(row["TelephoneNO"]);

            // 担当-店舗レシート表記
            ryousyuusyoRow.ReceiptPrint = Convert.ToString(row["ReceiptPrint"]);

            // 領収書コメント1
            ryousyuusyoRow.Char1 = Convert.ToString(row["Char1"]);

            // 領収書コメント2
            ryousyuusyoRow.Char2 = Convert.ToString(row["Char2"]);

            // MainKey
            ryousyuusyoRow.MainKey = Convert.ToByte(row["MainKey"]);

            // StoreCD
            ryousyuusyoRow.StoreCD = Convert.ToString(row["StoreCD"]);

            // 更新日付
            ryousyuusyoRow.ChangeDate = ConvertDateTime(row["ChangeDate"], false);

            // 売上日付
            ryousyuusyoRow.SalesDate = ConvertDateTime(row["SalesDate"], false);
            // データセットに追加
            ryousyuusyoDataSet.D_SelectData_ForTempoRegiRyousyuusyo.Rows.Add(ryousyuusyoRow);

            // 出力
            // mmmas
            var report = new TempoRegiRyousyuusyo_Report();

            report.SetDataSource(ryousyuusyoDataSet);
            report.Refresh();
            report.PrintOptions.PrinterName = StorePrinterName;
            report.PrintToPrinter(0, false, 0, 0);
        }