Ejemplo n.º 1
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view   = inflater.Inflate(Resource.Layout.fragment_mail_manage_input, container, false);
            prefs  = PreferenceManager.GetDefaultSharedPreferences(Context);
            editor = prefs.Edit();

            // コンポーネント初期化
            registFlg = prefs.GetBoolean("registFlg", true);
            if (registFlg)
            {
                SetTitle("メールバッグ登録");
            }
            else
            {
                SetTitle("メールバッグ削除");
            }

            BootstrapButton btnComplete = view.FindViewById <BootstrapButton>(Resource.Id.btn_mailRegistInput_complete);

            btnComplete.Click += delegate { Complete(); };

            etMailBag = view.FindViewById <BootstrapEditText>(Resource.Id.et_mailRegistInput_mail);
            mailBagSu = view.FindViewById <TextView>(Resource.Id.txt_mailRegistInput_mailbagSu);
            mail_back = 0;

            etMailBag.RequestFocus();

            return(view);
        }
Ejemplo n.º 2
0
        // コンポーネント初期化
        private void InitComponent()
        {
            etKaisyuLabel         = view.FindViewById <BootstrapEditText>(Resource.Id.et_kaisyuLabel);
            etIdouTenpo           = view.FindViewById <BootstrapEditText>(Resource.Id.et_idouTenpo);
            etIdouTenpo.Focusable = false;

            etIdouTokuisaki  = view.FindViewById <BootstrapEditText>(Resource.Id.et_idouTokuisaki);
            etIdouTodokesaki = view.FindViewById <BootstrapEditText>(Resource.Id.et_idouTodokesaki);

            _ConfirmButton         = view.FindViewById <BootstrapButton>(Resource.Id.btn_confirm);
            _ConfirmButton.Enabled = false;
            _ConfirmButton.Click  += delegate { Confirm(); };

            etKaisyuLabel.KeyPress += (sender, e) => {
                if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                {
                    e.Handled = true;
                    CommonUtils.HideKeyboard(Activity);
                    CheckKaisyuLabel();
                }
                else
                {
                    e.Handled = false;
                }
            };

            etKaisyuLabel.RequestFocus();
        }
Ejemplo n.º 3
0
        // コンポーネント初期化
        private void InitComponent()
        {
            etKaisyuDate              = view.FindViewById <BootstrapEditText>(Resource.Id.et_idouRegistSelect_kaisyuDate);
            etKaisyuDate.FocusChange += (sender, e) => {
                if (e.HasFocus)
                {
                    etKaisyuDate.Text = etKaisyuDate.Text.Replace("/", "");
                    etKaisyuDate.SetSelection(etKaisyuDate.Text.Length);
                }
                else
                {
                    try
                    {
                        etKaisyuDate.Text = CommonUtils.GetDateYYYYMMDDwithSlash(etKaisyuDate.Text);
                    }
                    catch
                    {
                        ShowDialog("エラー", "正しい日付を入力してください。", () => {
                            etKaisyuDate.Text = "";
                            etKaisyuDate.RequestFocus();
                        });
                    }
                }
            };

            etHaisoDate              = view.FindViewById <BootstrapEditText>(Resource.Id.et_idouRegistSelect_haisoDate);
            etHaisoDate.FocusChange += (sender, e) => {
                if (e.HasFocus)
                {
                    etHaisoDate.Text = etHaisoDate.Text.Replace("/", "");
                    etHaisoDate.SetSelection(etHaisoDate.Text.Length);
                }
                else
                {
                    try
                    {
                        etHaisoDate.Text = CommonUtils.GetDateYYYYMMDDwithSlash(etKaisyuDate.Text);
                    }
                    catch
                    {
                        ShowDialog("エラー", "正しい日付を入力してください。", () => {
                            etHaisoDate.Text = "";
                            etHaisoDate.RequestFocus();
                        });
                    }
                }
            };

            BootstrapButton btnConfirm = view.FindViewById <BootstrapButton>(Resource.Id.btn_idouRegistSelect_confirm);

            btnConfirm.Click += delegate { Confirm(); };

            etKaisyuDate.Text = DateTime.Now.ToString("yyyy/MM/dd");
            etHaisoDate.Text  = DateTime.Now.AddDays(1).ToString("yyyy/MM/dd");
        }
Ejemplo n.º 4
0
        // コンポーネント初期化
        private void InitComponent()
        {
            BootstrapButton completeButton = view.FindViewById <BootstrapButton>(Resource.Id.btn_confirm);

            completeButton.Click += delegate { Confirm(); };

            BootstrapEditText etKaisyuLabel = view.FindViewById <BootstrapEditText>(Resource.Id.et_kaisyuLabel);

            TextView task_cnt = view.FindViewById <TextView>(Resource.Id.kaisyuLabelSu);

            etKaisyuLabel.RequestFocus();
        }
Ejemplo n.º 5
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view   = inflater.Inflate(Resource.Layout.fragment_matehan_work, container, false);
            prefs  = PreferenceManager.GetDefaultSharedPreferences(Context);
            editor = prefs.Edit();

            // DB helper
            nohinMateHelper = new SndNohinMateHelper();
            mateFileHelper  = new MateFileHelper();

            // コンポーネント初期化
            SetTitle("貸出登録");

            TextView vendorNm = view.FindViewById <TextView>(Resource.Id.txt_nohinKaisyuMatehan_vendorName);

            matehan1Nm = view.FindViewById <TextView>(Resource.Id.txt_nohinKaisyuMatehan_matehan1);
            matehan2Nm = view.FindViewById <TextView>(Resource.Id.txt_nohinKaisyuMatehan_matehan2);
            matehan3Nm = view.FindViewById <TextView>(Resource.Id.txt_nohinKaisyuMatehan_matehan3);
            matehan4Nm = view.FindViewById <TextView>(Resource.Id.txt_nohinKaisyuMatehan_matehan4);

            matehan1Su = view.FindViewById <BootstrapEditText>(Resource.Id.et_nohinKaisyuMatehan_matehan1);
            matehan2Su = view.FindViewById <BootstrapEditText>(Resource.Id.et_nohinKaisyuMatehan_matehan2);
            matehan3Su = view.FindViewById <BootstrapEditText>(Resource.Id.et_nohinKaisyuMatehan_matehan3);
            matehan4Su = view.FindViewById <BootstrapEditText>(Resource.Id.et_nohinKaisyuMatehan_matehan4);

            mateRental1 = view.FindViewById <TextView>(Resource.Id.matehanRental1);
            mateRental2 = view.FindViewById <TextView>(Resource.Id.matehanRental2);
            mateRental3 = view.FindViewById <TextView>(Resource.Id.matehanRental3);
            mateRental4 = view.FindViewById <TextView>(Resource.Id.matehanRental4);

            BootstrapButton button1 = view.FindViewById <BootstrapButton>(Resource.Id.btn_nohinKaisyuMatehan_confirm);

            button1.Click += delegate { ConfirmMatehanKaisyu(); };

            vendorNm.Text = prefs.GetString("vendor_nm", "");

            mate030List = WebService.RequestMate030(prefs.GetString("vendor_cd", ""));
            matehanList = new List <MateFile>();

            foreach (MATE030 mate030 in mate030List)
            {
                string   code_name = WebService.RequestMate040(mate030.matehan_cd);
                MateFile mateFile  = new MateFile();
                mateFile.matehan_cd = mate030.matehan_cd;
                mateFile.matehan_nm = code_name;
                matehanList.Add(mateFile);
            }

            SetMateVendorInfo(prefs.GetString("vendor_cd", ""));
            matehan1Su.RequestFocus();

            return(view);
        }
Ejemplo n.º 6
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view               = inflater.Inflate(Resource.Layout.fragment_nohin_mailBag_nohin, container, false);
            prefs              = PreferenceManager.GetDefaultSharedPreferences(Context);
            editor             = prefs.Edit();
            sndNohinMailHelper = new SndNohinMailHelper();
            mbFileHelper       = new MbFileHelper();

            tokuisakiCd  = prefs.GetString("tokuisaki_cd", "");
            todokesakiCd = prefs.GetString("todokesaki_cd", "");

            SetTitle("メールバック納品");
            SetFooterText(" F1:解除");

            TextView txtTokusakiName = view.FindViewById <TextView>(Resource.Id.txt_nohinMailBagNohin_tokuisakiNm);

            txtTokusakiName.Text = prefs.GetString("tokuisaki_nm", "");

            etMailBagNumber      = view.FindViewById <BootstrapEditText>(Resource.Id.et_nohinMailBagNohin_mailbagNumber);
            etMailBagNumber.Text = "0";

            List <SndNohinMail> mailList = sndNohinMailHelper.SelectAll();

            if (mailList.Count > 0)
            {
                etMailBagNumber.Text = mailList.Count.ToString();
            }

            // メールバッグ件数取得
            mailbackCnt = mbFileHelper.GetMailbackCount();

            BootstrapButton kaizoButton = view.FindViewById <BootstrapButton>(Resource.Id.btn_nohinMailBagNohin_kaizo);

            kaizoButton.Click += delegate {
                //menu_flg
                editor.PutString("menu_flg", "1");
                editor.Apply();
                StartFragment(FragmentManager, typeof(NohinMailBagPasswordFragment));
            };

            BootstrapButton muButton = view.FindViewById <BootstrapButton>(Resource.Id.btn_nohinMailBagNohin_mu);

            muButton.Click += delegate { CompleteMailNohin(); };

            if (mailbackCnt != 0)
            {
                muButton.Enabled = false;
            }

            return(view);
        }
Ejemplo n.º 7
0
        // コンポーネント初期化
        private void InitComponent()
        {
            bool registFlg = prefs.GetBoolean("registFlg", true);

            if (registFlg)
            {
                SetTitle("メールバッグ登録");
            }
            else
            {
                SetTitle("メールバッグ削除");
            }

            etBin = view.FindViewById <BootstrapEditText>(Resource.Id.et_mailRegistSelect_bin);

            BootstrapButton btnConfirm = view.FindViewById <BootstrapButton>(Resource.Id.btn_mailRegistSelect_confirm);

            btnConfirm.Click += delegate { Confirm(); };

            etHaisoDate              = view.FindViewById <BootstrapEditText>(Resource.Id.et_mailRegistSelect_haiso);
            etHaisoDate.FocusChange += (sender, e) => {
                if (e.HasFocus)
                {
                    etHaisoDate.Text = etHaisoDate.Text.Replace("/", "");
                    etHaisoDate.SetSelection(etHaisoDate.Text.Length);
                }
                else
                {
                    try
                    {
                        etHaisoDate.Text = CommonUtils.GetDateYYYYMMDDwithSlash(etHaisoDate.Text);
                    }
                    catch
                    {
                        ShowDialog("エラー", "日付を正しく入力してください。", () => {
                            etHaisoDate.Text = "";
                            etHaisoDate.RequestFocus();
                        });
                    }
                }
            };

            etHaisoDate.Text = DateTime.Now.ToString("yyyy/MM/dd");
            etBin.RequestFocus();
        }
Ejemplo n.º 8
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view   = inflater.Inflate(Resource.Layout.fragment_kosu_mantan, container, false);
            prefs  = PreferenceManager.GetDefaultSharedPreferences(Context);
            editor = prefs.Edit();
            HideFooter();

            kosuMenuflag = prefs.GetInt(Const.KOSU_MENU_FLAG, (int)Const.KOSU_MENU.TODOKE); // 画面区分

            listView            = view.FindViewById <ListView>(Resource.Id.lv_matehanList);
            listView.ItemClick += (object sender, ItemClickEventArgs e) =>
            {
                SelectListViewItem(e.Position);
            };

            txtVenderName      = view.FindViewById <TextView>(Resource.Id.vendorName);
            txtVenderName.Text = prefs.GetString("vendor_nm", "");

            etMantanVendor      = view.FindViewById <BootstrapEditText>(Resource.Id.et_mantan_vendor);
            etMantanVendor.Text = prefs.GetString("vendor_cd", "");

            BootstrapButton vendorSearchButton = view.FindViewById <BootstrapButton>(Resource.Id.vendorSearch);

            vendorSearchButton.Click += delegate { StartFragment(FragmentManager, typeof(KosuVendorAllSearchFragment)); };

            etMantanVendor.KeyPress += (sender, e) => {
                if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                {
                    e.Handled = true;
                    CommonUtils.HideKeyboard(Activity);
                    SetMatehanList();
                }
                else
                {
                    e.Handled = false;
                }
            };

            SetMatehanList();

            return(view);
        }
Ejemplo n.º 9
0
        // コンポーネント初期化
        private void InitComponent()
        {
            etTokuisakiCd            = view.FindViewById <BootstrapEditText>(Resource.Id.et_tokuisakiCd);
            etTodokesakiCd           = view.FindViewById <BootstrapEditText>(Resource.Id.et_todokesakiCd);
            etTodokesakiCd.KeyPress += (sender, e) => {
                if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                {
                    e.Handled = true;
                    CommonUtils.HideKeyboard(Activity);
                    Confirm();
                }
                else
                {
                    e.Handled = false;
                }
            };
            txtTodokesakiNm = view.FindViewById <TextView>(Resource.Id.txt_todokesakiName);
            BootstrapButton btnConfirm = view.FindViewById <BootstrapButton>(Resource.Id.btn_confirm);

            btnConfirm.Click += delegate { Confirm(); };
        }
Ejemplo n.º 10
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view   = inflater.Inflate(Resource.Layout.fragment_kosu_bin_input, container, false);
            prefs  = PreferenceManager.GetDefaultSharedPreferences(Context);
            editor = prefs.Edit();

            SetTitle("届先指定検品");
            SetFooterText("");

            deliveryDate = prefs.GetString("deliveryDate", "");
            tokuisaki    = prefs.GetString("tokuisaki", "");
            todokesaki   = prefs.GetString("todokesaki", "");
            menuKbn      = prefs.GetInt("menuKbn", 1);

            etDeliveryDate      = view.FindViewById <BootstrapEditText>(Resource.Id.syukaDate);
            etDeliveryDate.Text = deliveryDate;

            etBinNo           = view.FindViewById <BootstrapEditText>(Resource.Id.binNo);
            etBinNo.KeyPress += (sender, e) => {
                if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                {
                    e.Handled = true;
                    Confirm();
                }
                else
                {
                    e.Handled = false;
                }
            };
            etBinNo.RequestFocus();

            btnConfirm        = view.FindViewById <BootstrapButton>(Resource.Id.btn_binInput_confirm);
            btnConfirm.Click += delegate { Confirm(); };

            return(view);
        }
Ejemplo n.º 11
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view   = inflater.Inflate(Resource.Layout.fragment_nohin_select, container, false);
            prefs  = PreferenceManager.GetDefaultSharedPreferences(Context);
            editor = prefs.Edit();

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

            etTokuisaki      = view.FindViewById <BootstrapEditText>(Resource.Id.et_nohinSelect_tokuisaki);
            etTokuisaki.Text = prefs.GetString("def_tokuisaki_cd", "");
            etTodokesaki     = view.FindViewById <BootstrapEditText>(Resource.Id.et_nohinSelect_todokesaki);
            etReceipt        = view.FindViewById <BootstrapEditText>(Resource.Id.et_nohinSelect_receipt);

            BootstrapButton confirm = view.FindViewById <BootstrapButton>(Resource.Id.btn_nohinSelect_confirm);

            confirm.FocusChange += delegate { if (confirm.IsFocused)
                                              {
                                                  CommonUtils.HideKeyboard(this.Activity);
                                              }
            };
            confirm.Click += delegate {
                // 得意先チェック
                string tokui = etTokuisaki.Text;
                if (tokui == "")
                {
                    ShowDialog("エラー", "得意先コードを入力してください。", () => { etTokuisaki.RequestFocus(); });
                    return;
                }

                // 届先チェック
                string todoke = etTodokesaki.Text;
                if (todoke == "")
                {
                    ShowDialog("エラー", "届先コードを入力してください。", () => { etTodokesaki.RequestFocus(); });
                    return;
                }

                // 受領書チェック
                string jyuryo = etReceipt.Text;
                if (jyuryo == "")
                {
                    ShowDialog("エラー", "受領書をスキャンしてください。", () => { etReceipt.RequestFocus(); });
                    return;
                }

                if (jyuryo[0] != 'J' || jyuryo.Length != 9)
                {
                    ShowDialog("エラー", "受領書ではありません。", () => { etReceipt.RequestFocus(); });
                    return;
                }

                if (jyuryo.Substring(1, 4) != etTokuisaki.Text || jyuryo.Substring(5, 4) != etTodokesaki.Text)
                {
                    ShowDialog("エラー", "納入先店舗が違います。", () => { etReceipt.RequestFocus(); });
                    return;
                }

                Confirm();
            };

            etReceipt.KeyPress += (sender, e) => {
                if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                {
                    e.Handled = true;
                    CommonUtils.HideKeyboard(Activity);
                    // 得意先チェック
                    string tokui = etTokuisaki.Text;
                    if (tokui == "")
                    {
                        ShowDialog("エラー", "得意先コードを入力してください。", () => { etTokuisaki.RequestFocus(); });
                        return;
                    }

                    // 届先チェック
                    string todoke = etTodokesaki.Text;
                    if (todoke == "")
                    {
                        ShowDialog("エラー", "届先コードを入力してください。", () => { etTodokesaki.RequestFocus(); });
                        return;
                    }

                    // 受領書チェック
                    string jyuryo = etReceipt.Text;
                    if (jyuryo == "")
                    {
                        ShowDialog("エラー", "受領書をスキャンしてください。", () => { etReceipt.RequestFocus(); });
                        return;
                    }

                    if (jyuryo[0] != 'J' || jyuryo.Length != 9)
                    {
                        ShowDialog("エラー", "受領書ではありません。", () => { etReceipt.RequestFocus(); });
                        return;
                    }


                    if (jyuryo.Substring(1, 4) != etTokuisaki.Text || jyuryo.Substring(5, 4) != etTodokesaki.Text)
                    {
                        ShowDialog("エラー", "納入先店舗が違います。", () => { etReceipt.RequestFocus(); });
                        return;
                    }

                    Confirm();
                }
                else
                {
                    e.Handled = false;
                }
            };


            etTodokesaki.RequestFocus();

            return(view);
        }
Ejemplo n.º 12
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view   = inflater.Inflate(Resource.Layout.fragment_login, container, false);
            prefs  = PreferenceManager.GetDefaultSharedPreferences(Context);
            editor = prefs.Edit();
            HideFooter();

            loginHelper = new LoginHelper();

            ((MainActivity)this.Activity).SupportActionBar.Title = "ログイン";

            etSoukoCode              = view.FindViewById <BootstrapEditText>(Resource.Id.soukoCode);
            etSoukoCode.FocusChange += delegate {
                if (!etSoukoCode.IsFocused)
                {
                    ((MainActivity)this.Activity).ShowProgress("読み込み中");

                    new Thread(new ThreadStart(delegate
                    {
                        Activity.RunOnUiThread(() =>
                        {
                            SetSoukoName(etSoukoCode.Text);
                        });
                        Activity.RunOnUiThread(() => ((MainActivity)this.Activity).DismissDialog());
                    }
                                               )).Start();
                }
            };

            txtSoukoName = view.FindViewById <TextView>(Resource.Id.tv_login_soukoName);

            etDriverCode           = view.FindViewById <BootstrapEditText>(Resource.Id.tantoCode);
            etDriverCode.KeyPress += (sender, e) => {
                if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                {
                    e.Handled = true;
                    CommonUtils.HideKeyboard(Activity);
                    var editText = (EditText)sender;
                    Login();
                }
                else
                {
                    e.Handled = false;
                }
            };

            btnLogin        = view.FindViewById <BootstrapButton>(Resource.Id.loginButton);
            btnLogin.Click += delegate { Login(); };

            btnLogin.FocusChange += delegate {
                if (btnLogin.IsFocused)
                {
                    CommonUtils.HideKeyboard(this.Activity);
                }
            };

            // 以前ログイン情報を設定する。
            //SetLastLoginInfo();
            LoadLastLoginFromDB();

            // 担当者マスタ情報をロカールDBに保存する。
            //SaveTantoMaster();

            return(view);
        }
Ejemplo n.º 13
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view   = inflater.Inflate(Resource.Layout.fragment_nohin_kaisyu_matehan, container, false);
            prefs  = PreferenceManager.GetDefaultSharedPreferences(Context);
            editor = prefs.Edit();

            // DB helper
            nohinMateHelper = new SndNohinMateHelper();
            mateFileHelper  = new MateFileHelper();

            // コンポーネント初期化
            SetTitle("マテハン回収");
            SetFooterText("");

            _VendorNameTextView = view.FindViewById <TextView>(Resource.Id.txt_nohinKaisyuMatehan_vendorName);
            matehan1Nm          = view.FindViewById <TextView>(Resource.Id.txt_nohinKaisyuMatehan_matehan1);
            matehan2Nm          = view.FindViewById <TextView>(Resource.Id.txt_nohinKaisyuMatehan_matehan2);
            matehan3Nm          = view.FindViewById <TextView>(Resource.Id.txt_nohinKaisyuMatehan_matehan3);
            matehan4Nm          = view.FindViewById <TextView>(Resource.Id.txt_nohinKaisyuMatehan_matehan4);

            matehan1Su = view.FindViewById <BootstrapEditText>(Resource.Id.et_nohinKaisyuMatehan_matehan1);
            matehan2Su = view.FindViewById <BootstrapEditText>(Resource.Id.et_nohinKaisyuMatehan_matehan2);
            matehan3Su = view.FindViewById <BootstrapEditText>(Resource.Id.et_nohinKaisyuMatehan_matehan3);
            matehan4Su = view.FindViewById <BootstrapEditText>(Resource.Id.et_nohinKaisyuMatehan_matehan4);

            BootstrapButton _ConfirmButton = view.FindViewById <BootstrapButton>(Resource.Id.btn_nohinKaisyuMatehan_confirm);

            _ConfirmButton.Click += delegate { ConfirmMatehanKaisyu(); };

            BootstrapButton _VendorSearchButton = view.FindViewById <BootstrapButton>(Resource.Id.vendorSearch);

            _VendorSearchButton.Click += delegate {
                editor.PutBoolean("kounaiFlag", false);
                editor.Apply();
                StartFragment(FragmentManager, typeof(KosuVendorAllSearchFragment));
            };

            _VendorCdEditText           = view.FindViewById <BootstrapEditText>(Resource.Id.et_nohinKaisyuMatehan_vendorCode);
            _VendorCdEditText.KeyPress += (sender, e) => {
                if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                {
                    e.Handled = true;

                    matehanList = mateFileHelper.SelectByVendorCd(_VendorCdEditText.Text);

                    if (matehanList.Count == 0)
                    {
                        ShowDialog("エラー", "ベンダーコードが存在しません。", () => { _VendorCdEditText.Text = motoVendorCd; _VendorCdEditText.RequestFocus(); });
                        return;
                    }
                    else
                    {
                        SetMateVendorInfo(_VendorCdEditText.Text);
                        motoVendorCd             = _VendorCdEditText.Text;
                        _VendorNameTextView.Text = matehanList[0].vendor_nm;

                        editor.PutString("mate_vendor_cd", _VendorCdEditText.Text);
                        editor.PutString("mate_vendor_nm", matehanList[0].vendor_nm);
                        editor.Apply();
                    }
                }
                else
                {
                    e.Handled = false;
                }
            };

            return(view);
        }
Ejemplo n.º 14
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view   = inflater.Inflate(Resource.Layout.fragment_tsumikomi_select, container, false);
            prefs  = PreferenceManager.GetDefaultSharedPreferences(Context);
            editor = prefs.Edit();

            // TITLE SETTING
            SetTitle("積込検品");

            // PARAMETER SETTING
            souko_cd   = prefs.GetString("souko_cd", "");
            kitaku_cd  = prefs.GetString("kitaku_cd", "");
            syuka_date = prefs.GetString("syuka_date", "");
            nohin_date = prefs.GetString("nohin_date", "");
            course     = prefs.GetString("course", "");
            bin_no     = prefs.GetString("bin_no", "");
            kansen_kbn = prefs.GetString("kansen_kbn", "");

            // ITEM EVENT SETTING
            etSyukaDate              = view.FindViewById <BootstrapEditText>(Resource.Id.et_tsumikomiSelect_syukaDate);
            etSyukaDate.FocusChange += (sender, e) => {
                if (e.HasFocus)
                {
                    etSyukaDate.Text = etSyukaDate.Text.Replace("/", "");
                    etSyukaDate.SetSelection(etSyukaDate.Text.Length);
                }
                else
                {
                    if (etSyukaDate.Text != "")
                    {
                        try
                        {
                            etSyukaDate.Text = CommonUtils.GetDateYYYYMMDDwithSlash(etSyukaDate.Text);
                        }
                        catch
                        {
                            ShowDialog("エラー", "正しい日付を入力してください。", () => {
                                etSyukaDate.Text = "";
                                etSyukaDate.RequestFocus();
                            });
                        }
                    }
                }
            };

            etCourse           = view.FindViewById <BootstrapEditText>(Resource.Id.et_tsumikomiSelect_course);
            etCourse.KeyPress += (sender, e) => {
                if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                {
                    e.Handled = true;
                    CommonUtils.HideKeyboard(Activity);
                    Confirm();
                }
                else
                {
                    e.Handled = false;
                }
            };

            btnConfirm        = view.FindViewById <BootstrapButton>(Resource.Id.btn_tsumikomiSelect_confirm);
            btnConfirm.Click += delegate { Confirm(); };

            // FIRST FOCUS
            etCourse.RequestFocus();

            // DUMMY DATA
            //etSyukaDate.Text = "18/03/20";
            etSyukaDate.Text = DateTime.Now.ToString("yyyy/MM/dd");
            return(view);
        }
Ejemplo n.º 15
0
        private void InitComponent()
        {
            txtConfirm  = view.FindViewById <TextView>(Resource.Id.txt_kosuSelect_confirmMsg);
            etSyukaDate = view.FindViewById <BootstrapEditText>(Resource.Id.todoke_et_deliveryDate);

            //etSyukaDate.Text = "2018/03/20"; // テスト用
            etSyukaDate.Text = DateTime.Now.ToString("yyyy/MM/dd");

            etSyukaDate.FocusChange += (sender, e) => {
                if (e.HasFocus)
                {
                    etSyukaDate.Text = etSyukaDate.Text.Replace("/", "");
                    etSyukaDate.SetSelection(etSyukaDate.Text.Length);
                }
                else
                {
                    CheckDate();
                }
            };

            confirmButton        = view.FindViewById <BootstrapButton>(Resource.Id.btn_todoke_confirm);
            confirmButton.Click += delegate { Confirm(); };

            if (kosuMenuflag == (int)Const.KOSU_MENU.TODOKE)
            {
                SetTitle("届先指定検品");
                SetFooterText("");

                GridLayout gl = view.FindViewById <GridLayout>(Resource.Id.gl_kosuSelect_Todoke);
                gl.Visibility = ViewStates.Visible;

                BootstrapButton searchButton = view.FindViewById <BootstrapButton>(Resource.Id.todokeSearch);
                searchButton.Click  += delegate { SearchTodokesaki(); };
                searchButton.Enabled = false;

                etTokuisaki  = view.FindViewById <BootstrapEditText>(Resource.Id.tokuiCode);
                etTodokesaki = view.FindViewById <BootstrapEditText>(Resource.Id.todokeCode);

                etTodokesaki.FocusChange += (sender, e) =>
                {
                    if (e.HasFocus)
                    {
                        SetFooterText("F1:検索");
                        searchButton.Enabled = true;
                    }
                    else
                    {
                        SetFooterText("");
                        searchButton.Enabled = false;
                    }
                };
                etTodokesaki.KeyPress += (sender, e) => {
                    if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                    {
                        e.Handled = true;
                        Confirm();
                    }
                    else
                    {
                        e.Handled = false;
                    }
                };

                //初期フォーカス
                if (etTokuisaki.Text == "")
                {
                    etTokuisaki.Text = prefs.GetString("def_tokuisaki_cd", "");
                    etTodokesaki.RequestFocus();
                }
            }
            else if (kosuMenuflag == (int)Const.KOSU_MENU.VENDOR)
            {
                SetTitle("ベンダー指定検品");
                SetFooterText("");

                GridLayout gl = view.FindViewById <GridLayout>(Resource.Id.gl_kosuSelect_Vendor);
                gl.Visibility = ViewStates.Visible;


                btnVendorSearch            = view.FindViewById <BootstrapButton>(Resource.Id.btn_kosuSelect_vendorSearch);
                btnVendorSearch.Click     += delegate { GoVendorSearchPage(); };
                btnVendorSearch.Visibility = ViewStates.Visible;
                btnVendorSearch.Enabled    = false;

                etVendorCode              = view.FindViewById <BootstrapEditText>(Resource.Id.vendorCode);
                etVendorCode.FocusChange += (sender, e) => {
                    if (e.HasFocus)
                    {
                        SetFooterText("F1:検索");
                        btnVendorSearch.Enabled = true;
                    }
                    else
                    {
                        SetFooterText("");
                        btnVendorSearch.Enabled = false;
                    }
                };

                etVendorCode.KeyPress += (sender, e) => {
                    if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                    {
                        e.Handled = true;
                        Confirm();
                    }
                    else
                    {
                        e.Handled = false;
                    }
                };

                //初期フォーカス
                etVendorCode.RequestFocus();
            }
            else if (kosuMenuflag == (int)Const.KOSU_MENU.BARA)
            {
                SetTitle("バラ検品");
                etSyukaDate.KeyPress += (sender, e) => {
                    if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                    {
                        e.Handled = true;
                        Confirm();
                    }
                    else
                    {
                        e.Handled = false;
                    }
                };
                etSyukaDate.SetSelection(etSyukaDate.Text.Length);
                etSyukaDate.RequestFocus();
            }
        }