private bool ExecPrint(string no, string reissue) { //Parameter受取 OperatorCD← Parameter受取 OperatorCD // ProcessingPC ← ProcessingPC // StoreCD ←StoreCD // SalesNO ←売上 売上番号 // 領収書FLG← Form.領収書必要ONの場合、1。以外は0. // レシートFLG ←1 // 領収書印字日付← //↑ Table転送仕様A で採番 //↑お客さんを待たせたくないので、 // レシート発行を先にする // 実行モジュールと同一フォルダのファイルを取得 System.Uri u = new System.Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase); string filePath = System.IO.Path.GetDirectoryName(u.LocalPath) + @"\" + TempoRegiRyousyuusyo; if (System.IO.File.Exists(filePath)) { string receipte = "0"; //領収書必要ONの場合、1。以外は0. //2020/07/20 Y.Nishikawa CHG 引数を整備↓↓ //string cmdLine = InCompanyCD + " " + InOperatorCD + " " + InPcID + " " + dse.StoreCD + " " + no + " " + receipte + " 1 " + bbl.GetDate() + " " + reissue; string cmdLine = InCompanyCD + " " + InOperatorCD + " " + InPcID + " " + no + " " + receipte + " 1 " + bbl.GetDate() + " " + reissue; //2020/07/20 Y.Nishikawa CHG 引数を整備↑↑ try { cdo.RemoveDisplay(true); cdo.RemoveDisplay(true); } catch { } /// System.Diagnostics.Process.Start(filePath, cmdLine); Just wait to PTK //エラーでない場合 if (bbl.Z_Set(txtAzukari.Text) > 0) { var pro = System.Diagnostics.Process.Start(filePath, cmdLine); pro.WaitForExit(); // MessageBox.Show("Printed"); //Todo:預り額>0の場合、ドロワー開く // PTK to be Continued try { EPSON_TM30.CashDrawerOpen cdo = new EPSON_TM30.CashDrawerOpen(); cdo.OpenCashDrawer(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } cdo.SetDisplay(false, false, "", Up, Lp); } else { //EXEが存在しない時エラー return(false); } return(true); }
public TempoRegiSiharaiTouroku(Base.Client.FrmMainForm.EOperationMode mode, D_Sales_Entity dse1, D_StorePayment_Entity dspe1, EPSON_TM30.CashDrawerOpen cdo, string Up, string Lp) { this.Up = Up; this.Lp = Lp; this.cdo = cdo; InitializeComponent(); ckmShop_Label7.Visible = false; lblZan.Visible = false; ShowCloseMessage = false; OperationMode = mode; dse = dse1; dspe = dspe1; }