private void CancelTsumiKomi() { new Thread(new ThreadStart(delegate { Activity.RunOnUiThread(() => { Thread.Sleep(1500); Dictionary <string, string> param = GetProcParam(""); MTumikomiProc result = WebService.CallTumiKomiProc(kansen_kbn == "0" ? "090" : "312", param); if (result.poMsg != "") { ShowDialog("エラー", result.poMsg, () => { }); return; } if (result.poRet == "0") { carLabelInputMode = false; } else if (result.poRet == "8") { ShowDialog("エラー", ERR_UPDATE_001, () => { }); return; } } ); } )).Start(); }
// TRG ボタン押した時 public override void OnBarcodeDataReceived(BarcodeDataReceivedEvent_ dataReceivedEvent) { IList <BarcodeDataReceivedEvent_.BarcodeData_> listBarcodeData = dataReceivedEvent.BarcodeData; foreach (BarcodeDataReceivedEvent_.BarcodeData_ barcodeData in listBarcodeData) { this.Activity.RunOnUiThread(() => { if (carLabelInputMode == false) // 出荷ラベル { // 出荷ラベル確認処理 Thread.Sleep(1500); Dictionary <string, string> param = GetProcParam(barcodeData.Data); try { MTumikomiProc result = WebService.CallTumiKomiProc(kansen_kbn == "0" ? "060" : "310", param); if (result.poMsg != "") { ShowDialog("エラー", result.poMsg, () => { }); return; } matehan = result.poMatehan; etKosu.Text = result.poKosuCnt; // 正常登録 carLabelInputMode = true; _IdouButton.Enabled = false; etCarLabel.SetBackgroundColor(Android.Graphics.Color.Yellow); etKosu.SetBackgroundColor(Android.Graphics.Color.White); } catch { ShowDialog("エラー", "更新出来ませんでした。\n再度商品をスキャンして下さい。", () => { }); return; } } else // 車両ラベル { // 作業ステータス更新・積込処理 etCarLabel.Text = barcodeData.Data; UpdateSagyoStatus(barcodeData.Data); } }); } }
// 作業ステータス更新・積込処理 TUMIKOMI080,TUMIKOMI311 private void UpdateSagyoStatus(string saryouData) { ((MainActivity)this.Activity).ShowProgress("作業ステータス更新中..."); int resultCode = 1; new Thread(new ThreadStart(delegate { Activity.RunOnUiThread(async() => { Thread.Sleep(1500); try { Dictionary <string, string> param = GetProcParam(saryouData); MTumikomiProc result = WebService.CallTumiKomiProc(kansen_kbn == "0" ? "080" : "311", param); resultCode = int.Parse(result.poMsg); if (resultCode == 0 || resultCode == 2) { if (kansen_kbn == "0") { if (resultCode == 2) { carLabelInputMode = false; ShowDialog("確認", "積込可能な商品があります。\n積込みを完了\nしますか?", (flag) => { if (flag) { carLabelInputMode = true; Log.Debug(TAG, "CreateTsumiFiles Start"); CreateTsumiFiles(); Log.Debug(TAG, "CreateTsumiFiles End"); //配車テーブルの該当コースの各数量を実績数で更新する var updateResult = WebService.CallTumiKomiProc(kansen_kbn == "0" ? "210" : "314", param); if (updateResult.poRet == "0" || updateResult.poRet == "99") { //editor.PutBoolean("tenpo_zan_flg", updateResult.poRet == "99" ? true : false); //editor.Apply(); //StartFragment(FragmentManager, typeof(TsumikomiCompleteFragment)); Activity.RunOnUiThread(() => { // 正常登録 ShowDialog("報告", "積込検品が\n完了しました。", () => { FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(0).Id, 0); }); }); } else { ShowDialog("エラー", "表示データがありません", () => { FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(0).Id, 0); }); return; } } else { GetTenpoMatehanInfo(); etKosu.SetBackgroundColor(Android.Graphics.Color.Yellow); etCarLabel.SetBackgroundColor(Android.Graphics.Color.White); etKosu.Text = ""; etCarLabel.Text = ""; carLabelInputMode = false; } }); } else { Log.Debug(TAG, "CreateTsumiFiles Start"); CreateTsumiFiles(); Log.Debug(TAG, "CreateTsumiFiles End"); //配車テーブルの該当コースの各数量を実績数で更新する var updateResult = WebService.CallTumiKomiProc(kansen_kbn == "0" ? "210" : "314", param); if (updateResult.poRet == "0" || updateResult.poRet == "99") { //editor.PutBoolean("tenpo_zan_flg", updateResult.poRet == "99" ? true : false); //editor.Apply(); //StartFragment(FragmentManager, typeof(TsumikomiCompleteFragment)); Activity.RunOnUiThread(() => { // 正常登録22 ShowDialog("報告", "積込検品が\n完了しました。", () => { FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(0).Id, 0); }); }); } else { ShowDialog("エラー", "表示データがありません", () => { FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(0).Id, 0); }); return; } } } } else if (resultCode == 1) { // scan_flg = true //スキャン済みフラグ // iniZero(4), Return("sagyou5") GetTenpoMatehanInfo(); Activity.RunOnUiThread(() => { etKosu.SetBackgroundColor(Android.Graphics.Color.Yellow); etCarLabel.SetBackgroundColor(Android.Graphics.Color.White); etKosu.Text = ""; etCarLabel.Text = ""; carLabelInputMode = false; _CompleteButton.Enabled = true; }); } } catch { ShowDialog("エラー", "例外エラーが発生しました。", () => { }); return; } } ); Activity.RunOnUiThread(() => ((MainActivity)this.Activity).DismissDialog()); } )).Start(); }