コード例 #1
0
        private void BackToMainMenu()
        {
            string menu_kbn         = prefs.GetString("menu_kbn", "");
            string driver_nm        = prefs.GetString("driver_nm", "");
            string souko_cd         = prefs.GetString("souko_cd", "");
            string souko_nm         = prefs.GetString("souko_nm", "");
            string driver_cd        = prefs.GetString("driver_cd", "");
            string kitaku_cd        = prefs.GetString("kitaku_cd", "");
            string def_tokuisaki_cd = prefs.GetString("def_tokuisaki_cd", "");
            string tsuhshin_kbn     = prefs.GetString("tsuhshin_kbn", "");
            string souko_kbn        = prefs.GetString("souko_kbn", "");

            editor.Clear();
            editor.Commit();

            editor.PutString("menu_kbn", menu_kbn);
            editor.PutString("driver_nm", driver_nm);
            editor.PutString("souko_cd", souko_cd);
            editor.PutString("souko_nm", souko_nm);
            editor.PutString("driver_cd", driver_cd);
            editor.PutString("kitaku_cd", kitaku_cd);
            editor.PutString("def_tokuisaki_cd", def_tokuisaki_cd);
            editor.PutString("tsuhshin_kbn", tsuhshin_kbn);
            editor.PutString("souko_kbn", souko_kbn);
            editor.Apply();

            FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(0).Id, 0);
        }
コード例 #2
0
        protected virtual Fragment FindFragmentInChildren(string fragmentName, FragmentManager fragManager)
        {
            if (fragManager.BackStackEntryCount == 0)
            {
                return(null);
            }

            for (int i = 0; i < fragManager.BackStackEntryCount; i++)
            {
                var parentFrag = fragManager.FindFragmentById(fragManager.GetBackStackEntryAt(i).Id);

                //let's try again finding it
                var frag = parentFrag?.ChildFragmentManager?.FindFragmentByTag(fragmentName);

                if (frag == null)
                {
                    //reloop for other fragments
                    frag = FindFragmentInChildren(fragmentName, parentFrag?.ChildFragmentManager);
                }

                //if we found the frag lets return it!
                if (frag != null)
                {
                    return(frag);
                }
            }

            return(null);
        }
コード例 #3
0
        public override View OnCreateView(LayoutInflater Inflater, ViewGroup container,
                                          Bundle savedInstanceState)
        {
            View v = Inflater.Inflate(R.Layouts.fragment_stack, container, false);

            // Watch for button clicks.
            Button button = (Button)v.FindViewById(R.Ids.new_fragment);

            button.Click += (o, a) => AddFragmentToStack();

            button        = (Button)v.FindViewById(R.Ids.delete_fragment);
            button.Click += (o, a) => GetChildFragmentManager().PopBackStack();

            button        = (Button)v.FindViewById(R.Ids.home);
            button.Click += (o, a) =>
            {
                // If there is a back stack, pop it all.
                FragmentManager fm = GetChildFragmentManager();
                if (fm.GetBackStackEntryCount() > 0)
                {
                    fm.PopBackStack(fm.GetBackStackEntryAt(0).GetId(),
                                    FragmentManager.POP_BACK_STACK_INCLUSIVE);
                }
                ;
            };

            return(v);
        }
コード例 #4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(R.Layout.fragment_stack);

            // Watch for button clicks.
            Button button = (Button)FindViewById(R.Id.new_fragment);

            button.Click += (s, x) => AddFragmentToStack();

            button        = (Button)FindViewById(R.Id.home);
            button.Click += (s, x) =>
            {
                // If there is a back stack, pop it all.
                FragmentManager fm = GetSupportFragmentManager();
                if (fm.GetBackStackEntryCount() > 0)
                {
                    fm.PopBackStack(fm.GetBackStackEntryAt(0).GetId(),
                                    Android.Support.V4.App.FragmentManager.POP_BACK_STACK_INCLUSIVE);
                }
            };

            if (savedInstanceState == null)
            {
                // Do first time initialization -- Add initial fragment.
                Fragment            newFragment = CountingFragment.NewInstance(mStackLevel);
                FragmentTransaction ft          = GetSupportFragmentManager().BeginTransaction();
                ft.Add(R.Id.simple_fragment, newFragment).Commit();
            }
            else
            {
                mStackLevel = savedInstanceState.GetInt("level");
            }
        }
コード例 #5
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view   = inflater.Inflate(Resource.Layout.fragment_kosu_tyingConfirm, container, false);
            prefs  = PreferenceManager.GetDefaultSharedPreferences(Context);
            editor = prefs.Edit();
            HideFooter();

            string kenpin_souko  = prefs.GetString("souko_cd", "");
            string kitaku_cd     = prefs.GetString("kitaku_cd", "");
            string syuka_date    = prefs.GetString("syuka_date", "");
            string bin_no        = prefs.GetString("bin_no", "");
            string tokuisaki_cd  = prefs.GetString("tokuisaki_cd", "");
            string todokesaki_cd = prefs.GetString("todokesaki_cd", "");
            string vendor_cd     = prefs.GetString("vendor_cd", "");

            view.FindViewById <BootstrapButton>(Resource.Id.stopButton).Click += delegate {
                FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(2).Id, 0);
            };

            try
            {
                KOSU110 nyukaStatus;

                if (prefs.GetInt(Const.KOSU_MENU_FLAG, (int)Const.KOSU_MENU.TODOKE) == (int)Const.KOSU_MENU.TODOKE)
                {
                    SetTitle("届先指定検品");

                    nyukaStatus = WebService.RequestKosu110(kenpin_souko, kitaku_cd, syuka_date, bin_no, tokuisaki_cd, todokesaki_cd);
                }
                else
                {
                    SetTitle("ベンダー指定検品");

                    nyukaStatus = WebService.RequestKosu115(kenpin_souko, kitaku_cd, syuka_date, vendor_cd);
                }

                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_case).Text     = nyukaStatus.sum_case_sumi + "/" + nyukaStatus.sum_case;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_oricon).Text   = nyukaStatus.sum_oricon_sumi + "/" + nyukaStatus.sum_oricon;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_huteikei).Text = nyukaStatus.sum_futeikei_sumi + "/" + nyukaStatus.sum_futeikei;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_hazai).Text    = nyukaStatus.sum_hazai_sumi + "/" + nyukaStatus.sum_hazai;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_miseidou).Text = nyukaStatus.sum_ido_sumi + "/" + nyukaStatus.sum_ido;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_henpin).Text   = nyukaStatus.sum_henpin_sumi + "/" + nyukaStatus.sum_henpin;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_hansoku).Text  = nyukaStatus.sum_hansoku_sumi + "/" + nyukaStatus.sum_hansoku;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_kaisyu).Text   = "0" + "/" + "0";
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_total).Text    = nyukaStatus.total_sumi + "/" + nyukaStatus.total;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_daisu).Text    = nyukaStatus.sum_mate_cnt;
            }
            catch
            {
                Activity.RunOnUiThread(() =>
                {
                    ShowDialog("報告", "表示データがありません。", () => {
                        FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(3).Id, 0);
                    });
                });
            }

            return(view);
        }
コード例 #6
0
ファイル: NohinCompleteFragment.cs プロジェクト: kjh33191/HTT
 public override bool OnKeyDown(Keycode keycode, KeyEvent paramKeyEvent)
 {
     if (keycode == Keycode.Num4)
     {
         FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(1).Id, 0);
     }
     return(true);
 }
コード例 #7
0
        private void Confirm()
        {
            // tenpo_zan_flg > 残り作業が存在留守場合、
            // scan_flg = false <-= 必要?
            // sagyou4

            FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(1).Id, 0);

            // 残り作業ない
            // System: Load("02_MainMenu", JOB: topmenu_flg, 0, 0, 0)
        }
コード例 #8
0
        public static BaseFragment GetCurrentFragment(this FragmentManager fragmentManager)
        {
            if (fragmentManager.BackStackEntryCount > 0)
            {
                var entry = fragmentManager.GetBackStackEntryAt(fragmentManager.BackStackEntryCount - 1);

                var fragment = fragmentManager.FindFragmentByTag(entry.Name) as BaseFragment;

                return(fragment);
            }

            return(null);
        }
コード例 #9
0
        public void DebugBackstack()
        {
            //FragmentManager fm = SupportFragmentManager;

            int i;

            FragmentManager.IBackStackEntry back;

            for (i = 0; i < FragmentManager.BackStackEntryCount; i++)
            {
                back = FragmentManager.GetBackStackEntryAt(i);
                //Log.Info(TAG, string.Format("Back Stack {0} {1} of {2}", back.Name, i + 1, fm.BackStackEntryCount));
            }
        }
コード例 #10
0
        public string GetFragmentOnStack()
        {
            //FragmentManager fm = SupportFragmentManager;

            FragmentManager.IBackStackEntry back;

            if (FragmentManager.BackStackEntryCount == 0)
            {
                return(null);
            }

            back = FragmentManager.GetBackStackEntryAt(0);

            return(back.Name);
        }
コード例 #11
0
 protected void CloseCurrentFragment(int contentId)
 {
     //Mvx.Trace("BaseCachingFragmentActivity:CloseCurrentFragment");
     // find the target fragment
     if (FragmentManager.BackStackEntryCount == 1)
     {
         var targetFragmentTypeName = _currentRootTag;
         FragmentManager.PopBackStackImmediate();
         _currentFragments.Remove(contentId);
         _currentFragments[contentId] = targetFragmentTypeName;
     }
     else
     {
         var targetFragmentTypeName = FragmentManager.GetBackStackEntryAt(FragmentManager.BackStackEntryCount - 2).Name;
         FragmentManager.PopBackStackImmediate();
         _currentFragments.Remove(contentId);
         _currentFragments[contentId] = targetFragmentTypeName;
     }
 }
コード例 #12
0
ファイル: NohinCompleteFragment.cs プロジェクト: kjh33191/HTT
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate(Resource.Layout.fragment_nohin_complete, container, false);

            prefs  = PreferenceManager.GetDefaultSharedPreferences(Context);
            editor = prefs.Edit();

            SetTitle("納品検品");
            SetFooterText("");

            string menuFlag = prefs.GetString("menu_flg", "1");

            TextView message = view.FindViewById <TextView>(Resource.Id.txt_nohinComplete_message);

            if (menuFlag == "1")
            {
                message.Text = "メールバッグの\n納品が完了しました。";
            }
            else
            {
                message.Text = "納品検品が\n完了しました。\n\nお疲れ様でした!";
            }

            Button confirmButton = view.FindViewById <Button>(Resource.Id.btn_nohinComplete_confirm);

            confirmButton.Click += delegate {
                if (menuFlag == "1")
                {
                    editor.PutBoolean("mailBagFlag", true);
                    editor.Apply();
                }
                else
                {
                }

                FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(2).Id, 0);
            };

            return(view);
        }
コード例 #13
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate(Resource.Layout.fragment_nohin_mailBag_password, container, false);
            prefs = PreferenceManager.GetDefaultSharedPreferences(Context);
            editor = prefs.Edit();

            SetTitle("メールバック");

            etPassword = view.FindViewById<EditText>(Resource.Id.et_nohinMailbagPwd_password);

            string menuFlag = prefs.GetString("menu_flg", "1");
            
            BootstrapButton button = view.FindViewById<BootstrapButton>(Resource.Id.btn_nohinMailbagPwd_confirm);
            button.Click += delegate {
                //StartFragment(FragmentManager, typeof(NohinCompleteFragment));
                if (menuFlag == "1")
                {
                    editor.PutBoolean("mailBagFlag", true);
                    editor.Apply();

                    ShowDialog("報告", "メールバッグの\n納品が完了しました。", () => { FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(2).Id, 0); });
                }
                else
                {
                    ShowDialog("報告", "納品検品が\n完了しました。\n\nお疲れ様でした!", () => { FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(2).Id, 0); });
                }

                
            };
            
            return view;
        }
コード例 #14
0
ファイル: TsumikomiPassFragment.cs プロジェクト: kjh33191/HTT
        // 積込完了時に生成されるファイル(納品で使います。)
        private void CreateTsumiFiles()
        {
            string souko_cd      = prefs.GetString("souko_cd", "");
            string kitaku_cd     = prefs.GetString("kitaku_cd", "");
            string syuka_date    = prefs.GetString("syuka_date", "");
            string tokuisaki_cd  = prefs.GetString("tokuisaki_cd", "");
            string todokesaki_cd = prefs.GetString("todokesaki_cd", "");
            string bin_no        = prefs.GetString("bin_no", "");
            string course        = prefs.GetString("course", "");

            // CRATE TUMIKOMI FILE
            // MAIN FILE
            List <MFile> mFiles = WebService.RequestTumikomi100(souko_cd, kitaku_cd, syuka_date, bin_no, course, tokuisaki_cd, todokesaki_cd);

            new MFileHelper().InsertALL(mFiles);

            // It would be useless..
            //PsFile psFile = WebService.RequestTumikomi180();
            PsFile psFile = new PsFile {
                pass = ""
            };

            new PsFileHelper().Insert(psFile);

            // MAILBACK FILE
            List <MbFile> mbFiles = WebService.RequestTumikomi140(souko_cd, kitaku_cd, syuka_date, bin_no, course);

            new MbFileHelper().InsertAll(mbFiles);

            // SOUKO FILE
            SoFile soFile = WebService.RequestTumikomi160(souko_cd);

            new SoFileHelper().Insert(soFile);

            // VENDOR FILE
            List <MateFile> mateFile = WebService.RequestTumikomi260();

            new MateFileHelper().InsertAll(mateFile);

            // TOKUISAKI FILE
            List <TokuiFile> tokuiFile = WebService.RequestTumikomi270();

            new TokuiFileHelper().InsertAll(tokuiFile);

            Log.Debug(TAG, "CreateTsumiFiles end");

            Dictionary <string, string> param = new Dictionary <string, string>
            {
                { "pTerminalID", prefs.GetString("terminal_id", "") },
                { "pProgramID", "TUM" },
                { "pSagyosyaCD", prefs.GetString("sagyousya_cd", "") },
                { "pSoukoCD", souko_cd },
                { "pSyukaDate", syuka_date },
                { "pBinNo", bin_no },
                { "pCourse", course },
                { "pTokuisakiCD", tokuisaki_cd },
                { "pTodokesakiCD", todokesaki_cd },
                { "pHHT_No", prefs.GetString("hht_no", "") }
            };

            //配車テーブルの該当コースの各数量を実績数で更新する
            var updateResult = WebService.CallTumiKomiProc("210", param);

            if (updateResult.poRet == "0" || updateResult.poRet == "99")
            {
                editor.PutBoolean("tenpo_zan_flg", updateResult.poRet == "99" ? true : false);
                editor.Apply();

                Activity.RunOnUiThread(() =>
                {
                    //	正常登録
                    ShowDialog("報告", "積込検品が\n完了しました。", () => {
                        FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(0).Id, 0);
                    });
                });
            }
            else
            {
                ShowDialog("エラー", "表示データがありません", () => {});
                return;
            }
        }
コード例 #15
0
        // 作業ステータス更新・積込処理 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();
        }
コード例 #16
0
        public void SelectListViewItem(int index)
        {
            if (matehanList.Count > index)
            {
                string msg = matehanList[index].matehan_nm + "でよろしいですか?";

                ShowDialog("警告", msg, () =>
                {
                    editor.PutString("mateno", matehanList[index].matehan_cd);
                    editor.Apply();

                    string sin_matehan = "";
                    string mateno      = matehanList[index].matehan_cd;
                    string hht_no      = "99";
                    string tokuiCd     = prefs.GetString("tmptokui_cd", "");
                    string todokeCd    = prefs.GetString("tmptodoke_cd", "");
                    string mate_renban = GetMateRandomNo();

                    sin_matehan = mateno + hht_no + tokuiCd + todokeCd + mate_renban;

                    if (menuFlag == 3)
                    {
                        Dictionary <string, string> param = new Dictionary <string, string>
                        {
                            { "pTerminalID", prefs.GetString("terminal_id", "") },
                            { "pProgramID", "IDO" },
                            { "pSagyosyaCD", prefs.GetString("sagyousya_cd", "") },
                            { "pSoukoCD", prefs.GetString("souko_cd", "") },
                            { "pKitakuCD", prefs.GetString("kitaku_cd", "") },
                            { "pMotoMatehan", motoInfoList[0].motoMateCode },
                            { "pSakiMatehan", sin_matehan },
                            { "pGyomuKbn", "04" },
                            { "pVendorCd", prefs.GetString("tsumi_vendor_cd", "") }
                        };

                        IDOU070 idou070 = WebService.RequestIdou070(param);

                        if (idou070.poRet != "0")
                        {
                            ShowDialog("エラー", idou070.poMsg, () => { });
                            return;
                        }

                        // 積替処理完了
                        ShowDialog("報告", "移動処理が\n完了しました。", () => { FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(0).Id, 0); });
                    }
                    else
                    {
                        // 単品マテハン登録

                        if (mate_renban.Length > 0)
                        {
                            foreach (Ido motoInfo in motoInfoList)
                            {
                                Dictionary <string, string> param = new Dictionary <string, string>
                                {
                                    { "pTerminalID", prefs.GetString("terminal_id", "") },
                                    { "pProgramID", "IDO" },
                                    { "pSagyosyaCD", prefs.GetString("pSagyosyaCD", "") },
                                    { "pSoukoCD", prefs.GetString("souko_cd", "") },
                                    { "pMotoKamotsuNo", motoInfo.kamotsuNo },
                                    { "pSakiMatehan", sin_matehan },
                                    { "pGyomuKbn", "04" },
                                    { "pVendorCd", prefs.GetString("tsumi_vendor_cd", "") }
                                };

                                IDOU090 idou090 = WebService.RequestIdou090(param);
                                if (idou090.poMsg != "")
                                {
                                    ShowDialog("エラー", idou090.poMsg, () => { });
                                    return;
                                }
                            }

                            // 積替処理完了
                            ShowDialog("報告", "移動処理が\n完了しました。", () => { FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(0).Id, 0); });
                        }
                    }
                });
            }
        }
コード例 #17
0
        private void InitComponent()
        {
            SetTitle("納品検品");

            TextView txtTokuisaki = view.FindViewById <TextView>(Resource.Id.txt_nohinwork_tokuisakiNm);

            txtTokuisaki.Text = prefs.GetString("tokuisaki_nm", "");
            TextView txtTodokesaki = view.FindViewById <TextView>(Resource.Id.txt_nohinwork_todokesakiNm);

            txtTodokesaki.Text = prefs.GetString("todokesaki_nm", "");;

            tvCase                 = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_case);
            tvOricon               = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_oricon);
            tvSonota               = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_sonota);
            tvIdo                  = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_ido);
            tvMail                 = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_mail);
            tvFuteikei             = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_futeikei);
            tvHansoku              = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_hansoku);
            tvTc                   = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_tc);
            tvTsumidai             = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_tsumidaisu);
            tvAll                  = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_all);
            tvmatehanNm            = view.FindViewById <TextView>(Resource.Id.matehanNm);
            nohinWorkButton        = view.FindViewById <BootstrapButton>(Resource.Id.nohinButton);
            nohinWorkButton.Click += delegate {
                if (tsumikomiDataList.Count == ko_su)
                {
                    Log.Debug(TAG, "MAIN NOHIN COMPLETE");
                    editor.PutString("menu_flg", "2");
                    editor.PutBoolean("nohinWorkEndFlag", true);
                    editor.Apply();

                    ShowDialog("報告", "納品検品が\n完了しました。\n\nお疲れ様でした!", () => { FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(2).Id, 0); });
                }
                else
                {
                    nohinWorkButton.Visibility = ViewStates.Gone;
                    kaizoButton.Visibility     = ViewStates.Visible;

                    tvCase.Text     = "0";
                    tvOricon.Text   = "0";
                    tvFuteikei.Text = "0";
                    tvTc.Text       = "0";
                    tvIdo.Text      = "0";
                    tvMail.Text     = "0";
                    tvHansoku.Text  = "0";
                    tvSonota.Text   = "0";
                }
            };

            kaizoButton        = view.FindViewById <BootstrapButton>(Resource.Id.kaizoButton);
            kaizoButton.Click += delegate {
                editor.PutString("menu_flg", "2");
                editor.Apply();
                StartFragment(FragmentManager, typeof(NohinMailBagPasswordFragment));
            };

            nohinWorkButton.Visibility = ViewStates.Gone;
            kaizoButton.Visibility     = ViewStates.Visible;
        }
コード例 #18
0
ファイル: KosuWorkFragment.cs プロジェクト: kjh33191/HTT
        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;
            }
        }