private void InitComponents() { txtVendorName = view.FindViewById <TextView>(Resource.Id.vendorName); txtMiseName = view.FindViewById <TextView>(Resource.Id.txtMiseName); txtTenpoLocation = view.FindViewById <TextView>(Resource.Id.txt_todoke_tenpoLocation); txtCase = view.FindViewById <TextView>(Resource.Id.txt_todoke_case); txtHuteikei = view.FindViewById <TextView>(Resource.Id.txt_todoke_huteikei); txtMiseidou = view.FindViewById <TextView>(Resource.Id.txt_todoke_miseidou); txtHansoku = view.FindViewById <TextView>(Resource.Id.txt_todoke_hansoku); txtTotal = view.FindViewById <TextView>(Resource.Id.txt_todoke_total); txtOricon = view.FindViewById <TextView>(Resource.Id.txt_todoke_oricon); txtHazai = view.FindViewById <TextView>(Resource.Id.txt_todoke_hazai); txtHenpin = view.FindViewById <TextView>(Resource.Id.txt_todoke_henpin); txtKaisyu = view.FindViewById <TextView>(Resource.Id.txt_todoke_kaisyu); txtDaisu = view.FindViewById <TextView>(Resource.Id.txt_todoke_daisu); btnStop = view.FindViewById <BootstrapButton>(Resource.Id.btn_todoke_stop); btnStop.Click += delegate { StartFragment(FragmentManager, typeof(KosuWorkConfirmFragment)); }; // 中断 btnMantan = view.FindViewById <BootstrapButton>(Resource.Id.btn_todoke_mantan); // 届先検品の満タンボタン btnMantan.Click += delegate { GoMantanPage(); }; // 満タン btnCancel = view.FindViewById <BootstrapButton>(Resource.Id.btn_todoke_cancel); btnCancel.Click += delegate { CancelKamotsuScan(false); }; // 取消 btnComplete = view.FindViewById <BootstrapButton>(Resource.Id.completeButton); // バラ検品の完了ボタン btnComplete.Visibility = ViewStates.Gone; btnComplete.Click += delegate { try { KOSU070 kosu070 = WebService.RequestKosu180(GetProcedureParam("")); if (kosu070.poRet == "0") { if (int.Parse(kosu070.poMsg) > 0) { // 完了OK txtCase.Text = "0"; txtHuteikei.Text = "0"; txtMiseidou.Text = "0"; txtHansoku.Text = "0"; txtOricon.Text = "0"; txtHazai.Text = "0"; txtHenpin.Text = "0"; txtKaisyu.Text = "0"; txtDaisu.Text = (int.Parse(txtDaisu.Text) + 1).ToString(); btnComplete.Visibility = ViewStates.Invisible; hasKamotsuScanned = false; } else { // 完了OK editor.PutString("dai_su", (int.Parse(txtDaisu.Text) + 1).ToString()); editor.Apply(); FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(2).Id, 0); } } else { ShowDialog("エラー", "更新出来ませんでした。\n管理者に連絡してください。", () => { }); } } catch { ShowDialog("エラー", "満タン処理完了に失敗しました。", () => { }); Log.Error(Tag, "満タン処理完了に失敗しました。"); return; } }; gdTyingCanman = view.FindViewById <GridLayout>(Resource.Id.gd_tying_canman); txtMiseName.Text = prefs.GetString("tokuisaki_nm", ""); txtCase.Text = prefs.GetString("case_su", "0"); txtOricon.Text = prefs.GetString("oricon_su", "0"); txtHuteikei.Text = prefs.GetString("futeikei_su", "0"); txtMiseidou.Text = prefs.GetString("ido_su", "0"); txtHazai.Text = prefs.GetString("hazai_su", "0"); txtHenpin.Text = prefs.GetString("henpin_su", "0"); txtHansoku.Text = prefs.GetString("hansoku_su", "0"); txtKaisyu.Text = prefs.GetString("kaisyu_su", "0"); txtDaisu.Text = prefs.GetString("dai_su", "0"); tempTotal = prefs.GetString("tmp_kosu", "0"); tempDaisu = txtDaisu.Text; // 満タンまたは中断画面から戻った場合はボタン表示 int count = int.Parse(txtCase.Text) + int.Parse(txtOricon.Text) + int.Parse(txtHuteikei.Text) + int.Parse(txtMiseidou.Text) + int.Parse(txtHazai.Text) + int.Parse(txtHenpin.Text) + int.Parse(txtHansoku.Text) + int.Parse(txtKaisyu.Text); txtTotal.Text = count.ToString(); if (count == 0) { hasKamotsuScanned = false; } else { hasKamotsuScanned = true; btnStop.Visibility = ViewStates.Gone; gdTyingCanman.Visibility = ViewStates.Visible; } try { kosuMax = WebService.RequestKosu210(); } catch { kosuMax = 100; } }
public void SelectListViewItem(int index) { if (matehanList.Count > index) { string msg = matehanList[index].matehan_nm + "でよろしいですか?"; ShowDialog("確認", msg, () => { try { KOSU070 result = new KOSU070(); if (kosuMenuflag == (int)Const.KOSU_MENU.TODOKE) { result = WebService.RequestKosu080(GetProcedureParam(matehanList[index].matehan_cd)); } else if (kosuMenuflag == (int)Const.KOSU_MENU.VENDOR) { result = WebService.RequestKosu160(GetProcedureParam(matehanList[index].matehan_cd)); } string dai_su = prefs.GetString("dai_su", "0"); int dai_su_intValue = int.TryParse(dai_su, out dai_su_intValue) ? dai_su_intValue : 0; if (result.poRet == "0") { dai_su_intValue = dai_su_intValue + 1; //台数加算 editor.PutString("dai_su", dai_su_intValue.ToString()); editor.Apply(); if (int.Parse(result.poMsg) == 0) { StartFragment(FragmentManager, typeof(KosuCompleteFragment)); } else if (int.Parse(result.poMsg) > 0) { // 正常に処理されたが、残り作業がある場合、 // 紐づけ画面に遷移する。 editor.PutString("case_su", "0"); editor.PutString("oricon_su", "0"); editor.PutString("futeikei_su", "0"); editor.PutString("ido_su", "0"); editor.PutString("hazai_su", "0"); editor.PutString("henpin_su", "0"); editor.PutString("hansoku_su", "0"); editor.PutString("kaisyu_su", "0"); editor.PutString("tmp_kosu", prefs.GetString("ko_su", "0")); editor.Apply(); this.Activity.FragmentManager.PopBackStack(); } } else { ShowDialog("エラー", "更新出来ませんでした。\n管理者に連絡してください。", () => { }); return; } } catch { ShowDialog("エラー", "更新出来ませんでした。\n管理者に連絡してください。", () => { }); return; } }); } }
public void CountItem(IList <BarcodeDataReceivedEvent_.BarcodeData_> listBarcodeData) { foreach (BarcodeDataReceivedEvent_.BarcodeData_ barcodeData in listBarcodeData) { string kamotsu_no = barcodeData.Data; Dictionary <string, string> param = GetProcedureParam(kamotsu_no); KOSU070 kosuKenpin = new KOSU070(); try { if (kosuMenuflag == (int)Const.KOSU_MENU.TODOKE) { kosuKenpin = WebService.RequestKosu070(param); } else if (kosuMenuflag == (int)Const.KOSU_MENU.VENDOR) { kosuKenpin = WebService.RequestKosu150(param); } else if (kosuMenuflag == (int)Const.KOSU_MENU.BARA) { kosuKenpin = WebService.RequestKosu170(param); } if (kosuKenpin.poMsg != "") { ShowDialog("エラー", kosuKenpin.poMsg, () => { }); return; } switch (kosuKenpin.poLabelType) { case "0": txtCase.Text = (Int32.Parse(txtCase.Text) + 1).ToString(); break; case "1": txtOricon.Text = (Int32.Parse(txtOricon.Text) + 1).ToString(); break; case "2": txtHuteikei.Text = (Int32.Parse(txtHuteikei.Text) + 1).ToString(); break; case "3": txtMiseidou.Text = (Int32.Parse(txtMiseidou.Text) + 1).ToString(); break; case "4": txtHazai.Text = (Int32.Parse(txtHazai.Text) + 1).ToString(); break; case "5": txtHenpin.Text = (Int32.Parse(txtHenpin.Text) + 1).ToString(); break; case "6": txtHansoku.Text = (Int32.Parse(txtHansoku.Text) + 1).ToString(); break; case "7": txtKaisyu.Text = (Int32.Parse(txtKaisyu.Text) + 1).ToString(); break; } txtMiseName.Text = kosuKenpin.poTokuisakiNm; txtTenpoLocation.Text = kosuKenpin.poTenpoLocaCD; txtTotal.Text = (Int32.Parse(txtTotal.Text) + 1).ToString(); editor.PutString("todokesaki_cd", kosuKenpin.poTodokesakiCD); editor.Apply(); hasKamotsuScanned = true; if (kosuMenuflag == (int)Const.KOSU_MENU.TODOKE) { btnStop.Visibility = ViewStates.Gone; gdTyingCanman.Visibility = ViewStates.Visible; } else if (kosuMenuflag == (int)Const.KOSU_MENU.VENDOR) { btnStop.Visibility = ViewStates.Gone; gdTyingCanman.Visibility = ViewStates.Visible; } else if (kosuMenuflag == (int)Const.KOSU_MENU.BARA) { SetFooterText(""); btnComplete.Visibility = ViewStates.Visible; } } catch { ShowDialog("エラー", "更新出来ませんでした。\n管理者に連絡してください。", () => { }); Log.Error(Tag, ""); return; } } }