예제 #1
0
        private void GotoTusumikomi()
        {
            List <SndNohinMail>         mailList         = mailHelper.SelectAll();
            List <SndNohinMailKaisyu>   mailKaisyuList   = mailKaisyuHelper.SelectAll();
            List <SndNohinMate>         mateList         = mateHelper.SelectAll();
            List <SndNohinWork>         workList         = workHelper.SelectAll();
            List <SndNohinSyohinKaisyu> syohinKaisyuList = syohinKaisyuHelper.SelectAll();

            int count = mailList.Count + mailKaisyuList.Count + mateList.Count + workList.Count + syohinKaisyuList.Count;

            if (count > 0)
            {
                ShowDialog("警告", "未送信データが存在します。\n削除して業務を続行しますか?", () => {
                    mailHelper.DeleteAll();
                    mailKaisyuHelper.DeleteAll();
                    mateHelper.DeleteAll();
                    workHelper.DeleteAll();
                    syohinKaisyuHelper.DeleteAll();

                    editor.PutBoolean("mailBagFlag", false);
                    editor.PutBoolean("nohinWorkEndFlag", false);
                    editor.PutBoolean("mailKaisyuEndFlag", false);
                    editor.Apply();

                    StartFragment(FragmentManager, typeof(TsumikomiSelectFragment));
                });
            }
            else
            {
                StartFragment(FragmentManager, typeof(TsumikomiSelectFragment));
            }
        }
예제 #2
0
        private void InitComponent()
        {
            SetTitle("メールバック回収");
            SetFooterText("");

            TextView tvTokuisaki = view.FindViewById <TextView>(Resource.Id.txt_nohinKaisyuMail_tokuisakiNm);

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

            TextView tvTodokesaki = view.FindViewById <TextView>(Resource.Id.txt_nohinKaisyuMail_todokisakiNm);

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

            etKaisyuMail = view.FindViewById <EditText>(Resource.Id.et_nohinKaisyuMail_kaisyuMailbag);

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

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

            sndNohinMailKaisyuHelper = new SndNohinMailKaisyuHelper();
            List <SndNohinMailKaisyu> temp = sndNohinMailKaisyuHelper.SelectAll();

            if (temp.Count > 0)
            {
                etKaisyuMail.Text = temp.Count.ToString();
                mail_bag          = 0;
            }
            else
            {
                etKaisyuMail.Text = "0";
                mail_bag          = 0;
            }

            arrMailBag = new List <string>();
        }
예제 #3
0
        private bool HasSendData()
        {
            SndNohinMailHelper         mailHelper         = new SndNohinMailHelper();
            SndNohinMailKaisyuHelper   mailKaisyuHelper   = new SndNohinMailKaisyuHelper();
            SndNohinMateHelper         mateHelper         = new SndNohinMateHelper();
            SndNohinWorkHelper         workHelper         = new SndNohinWorkHelper();
            SndNohinSyohinKaisyuHelper syohinKaisyuHelper = new SndNohinSyohinKaisyuHelper();

            mailList         = mailHelper.SelectAll();
            mailKaisyuList   = mailKaisyuHelper.SelectAll();
            mateList         = mateHelper.SelectAll();
            workList         = workHelper.SelectAll();
            syohinKaisyuList = syohinKaisyuHelper.SelectAll();

            int count = mailList.Count + mailKaisyuList.Count + mateList.Count + workList.Count + syohinKaisyuList.Count;

            return(count != 0);
        }
예제 #4
0
        private void DataSend()
        {
            SndNohinMailHelper         mailHelper         = new SndNohinMailHelper();
            SndNohinMailKaisyuHelper   mailKaisyuHelper   = new SndNohinMailKaisyuHelper();
            SndNohinMateHelper         mateHelper         = new SndNohinMateHelper();
            SndNohinWorkHelper         workHelper         = new SndNohinWorkHelper();
            SndNohinSyohinKaisyuHelper syohinKaisyuHelper = new SndNohinSyohinKaisyuHelper();

            List <SndNohinMail>         mailList         = mailHelper.SelectAll();
            List <SndNohinMailKaisyu>   mailKaisyuList   = mailKaisyuHelper.SelectAll();
            List <SndNohinMate>         mateList         = mateHelper.SelectAll();
            List <SndNohinWork>         workList         = workHelper.SelectAll();
            List <SndNohinSyohinKaisyu> syohinKaisyuList = syohinKaisyuHelper.SelectAll();

            int count = mailList.Count + mailKaisyuList.Count + mateList.Count + workList.Count + syohinKaisyuList.Count;

            if (count > 0)
            {
                new Thread(new ThreadStart(delegate
                {
                    Activity.RunOnUiThread(() =>
                    {
                        // 業務メニューに戻ってよろしいですか?
                        ShowDialog("警告", "納品情報を送信して業務メニューに戻ってよろしいですか?", () => {
                            ((MainActivity)this.Activity).ShowProgress("データ送信中");

                            foreach (SndNohinMail temp in mailList)
                            {
                                Dictionary <string, string> param = SetSendParam(temp);
                                var result = WebService.RequestSend010(param);
                            }

                            Log.Debug(TAG, "メールバックデータ送信完了");

                            foreach (SndNohinMailKaisyu temp in mailKaisyuList)
                            {
                                Dictionary <string, string> param = SetSendParam(temp);
                                var result = WebService.RequestSend010(param);
                            }

                            Log.Debug(TAG, "メールバック回収データ送信完了");

                            foreach (SndNohinMate temp in mateList)
                            {
                                Dictionary <string, string> param = SetSendParam(temp);
                                var result = WebService.RequestSend010(param);
                            }

                            Log.Debug(TAG, "マテハンデータ送信完了");

                            foreach (SndNohinWork temp in workList)
                            {
                                Dictionary <string, string> param = SetSendParam(temp);
                                var result = WebService.RequestSend010(param);
                            }

                            Log.Debug(TAG, "納品作業データ送信完了");

                            foreach (SndNohinSyohinKaisyu temp in syohinKaisyuList)
                            {
                                Dictionary <string, string> param = SetSendParam(temp);
                                var result = WebService.RequestSend010(param);
                            }

                            Log.Debug(TAG, "商品回収データ送信完了");
                        });
                    }
                                           );
                    Activity.RunOnUiThread(() =>
                    {
                        // 削除処理
                        mailHelper.DeleteAll();
                        mailKaisyuHelper.DeleteAll();
                        mateHelper.DeleteAll();
                        workHelper.DeleteAll();
                        syohinKaisyuHelper.DeleteAll();

                        //new MFileHelper().DeleteAll();
                        //new MbFileHelper().DeleteAll();
                    });
                    Activity.RunOnUiThread(() =>
                    {
                        ShowDialog("報告", "データ送信完了しました。", () => {
                            ((MainActivity)this.Activity).DismissDialog();
                            FragmentManager.PopBackStack();
                        });
                    });
                }
                                           )).Start();
            }
        }