Example #1
0
        private void SetTodokesakiAsync()
        {
            ((MainActivity)this.Activity).ShowProgress("読み込み中");

            List <KOSU190> todokeList = WebService.RequestMate020(souko_cd);

            if (todokeList.Count > 0)
            {
                ListView listView = view.FindViewById <ListView>(Resource.Id.listView1);
                listView.ItemClick += listView_ItemClick;

                todokesakiAdapter = new VendorAllAdapter(todokeList);
                listView.Adapter  = todokesakiAdapter;
            }
            else
            {
                ShowDialog("報告", "表示データがありません。", () => {
                    FragmentManager.PopBackStack();
                });
            }

            new Thread(new ThreadStart(delegate
            {
                Activity.RunOnUiThread(() => ((MainActivity)this.Activity).DismissDialog());
            }
                                       )).Start();
        }
Example #2
0
        private void SetTodokesakiAsync()
        {
            string soukoCd    = prefs.GetString("souko_cd", "");
            string kitakuCd   = prefs.GetString("kitaku_cd", "");
            string syuka_date = prefs.GetString("syuka_date", "");

            if (prefs.GetBoolean("kounaiFlag", true))
            {
                vendorList = WebService.RequestKosu190();;
            }
            else
            {
                vendorList = new List <KOSU190>();
                List <MateFile> mateList = new MateFileHelper().SelectAll();

                string tempVendorCd = "";

                foreach (MateFile mfile in mateList)
                {
                    // ベンダーに紐づくマテハン情報も複数持つので、ベンダーコードで分ける
                    if (tempVendorCd != mfile.vendor_cd)
                    {
                        tempVendorCd = mfile.vendor_cd;

                        KOSU190 kosu190 = new KOSU190();
                        kosu190.vendor_cd = mfile.vendor_cd;
                        kosu190.vendor_nm = mfile.vendor_nm;

                        vendorList.Add(kosu190);
                    }
                }
            }

            if (vendorList.Count > 0)
            {
                ListView listView = view.FindViewById <ListView>(Resource.Id.listView1);
                listView.ItemClick += listView_ItemClick;

                vendorAdapter    = new VendorAllAdapter(vendorList);
                listView.Adapter = vendorAdapter;
            }
            else
            {
                ShowDialog("報告", "表示データがありません。", () =>
                {
                    FragmentManager.PopBackStack();
                });
            }
        }