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); }
// 積込完了時に生成されるファイル(納品で使います。) private void CreateTsumiFiles() { // CRATE TUMIKOMI FILE // MAIN FILE List <MFile> mFiles = WebService.RequestTumikomi100(souko_cd, kitaku_cd, syuka_date, bin_no, course, tokuisaki_cd, todokesaki_cd); MFileHelper mFileHelper = new MFileHelper(); mFileHelper.DeleteAll(); mFileHelper.InsertALL(mFiles); //PsFile psFile = WebService.RequestTumikomi180(souko_cd, syuka_date); /* * PsFileHelper psFileHelper = new PsFileHelper(); * PsFile psFile = new PsFile(); * psFileHelper.DeleteAll(); * psFileHelper.Insert(psFile); */ // MAILBACK FILE List <MbFile> mbFiles = WebService.RequestTumikomi140(souko_cd, kitaku_cd, syuka_date, bin_no, course); MbFileHelper mbFileHelper = new MbFileHelper(); mbFileHelper.DeleteAll(); mbFileHelper.InsertAll(mbFiles); // SOUKO FILE SoFile soFile = WebService.RequestTumikomi160(souko_cd); SoFileHelper soFileHelper = new SoFileHelper(); soFileHelper.DeleteAll(); soFileHelper.Insert(soFile); // VENDOR FILE string nohin_date = DateTime.Now.ToString("yyyyMMdd"); List <MateFile> mateFile = WebService.RequestTumikomi260(); MateFileHelper mateFileHelper = new MateFileHelper(); mateFileHelper.DeleteAll(); mateFileHelper.InsertAll(mateFile); // TOKUISAKI FILE List <TokuiFile> tokuiFile = WebService.RequestTumikomi270(); TokuiFileHelper tokuiFileHelper = new TokuiFileHelper(); tokuiFileHelper.DeleteAll(); tokuiFileHelper.InsertAll(tokuiFile); Log.Debug(TAG, "CreateTsumiFiles end"); }
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(); }); } }
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); }