private async void LoadData() { mGlobalLocations = await mLocationDataService.GetAll(); mGlobalProducts = await mProductDataService.GetAll(); mGlobalStorages = await mStorageDataService.GetAll(); mGlobalCategories = await mCategoryDataService.GetAll(); mGlobalUserLocs = await mUserLocationDataService.GetAll(); mGlobalUserDatas = await mUserDataDataService.GetAll(); mGlobalInventories = new List <InventoryViewModel>(); List <InventoryViewModel> tempInventories = await mInventoryDataService.GetAll(); for (int i = 0; i < tempInventories.Count(); i++) { for (int j = 0; j < mGlobalProducts.Count(); j++) { if (tempInventories[i].ProductId == mGlobalProducts[j].Id) { tempInventories[i].ItemName = mGlobalProducts[j].Name; mGlobalInventories.Add(tempInventories[i]); } } } }
private async void LoadData() { LoginPageActivity.mGlobalLocations = await mLocationDataService.GetAll(); LoginPageActivity.mGlobalStorages = await mStorageDataService.GetAll(); LoginPageActivity.mGlobalCategories = await mCategoryDataService.GetAll(); LoginPageActivity.mGlobalUserLocs = await mUserLocationDataService.GetAll(); LoginPageActivity.mGlobalUserDatas = await mUserDataDataService.GetAll(); LoginPageActivity.mGlobalShopList = await mShopListDataService.GetAll(); LoginPageActivity.mGlobalShopItem = await mShopItemDataService.GetAll(); LoginPageActivity.mGlobalProducts = await mProductDataService.GetAll(); LoginPageActivity.mGlobalInventories = new List <InventoryViewModel>(); List <InventoryViewModel> tempInventories = await mInventoryDataService.GetAll(); for (int i = 0; i < tempInventories.Count(); i++) { for (int j = 0; j < LoginPageActivity.mGlobalProducts.Count(); j++) { if (tempInventories[i].ProductId == LoginPageActivity.mGlobalProducts[j].Id) { tempInventories[i].ItemName = LoginPageActivity.mGlobalProducts[j].Name; LoginPageActivity.mGlobalInventories.Add(tempInventories[i]); } if (LoginPageActivity.mGlobalProducts[j].AddedUserId == LoginPageActivity.StaticUserClass.ID.ToString()) { LoginPageActivity.mGlobalProductsByUser.Add(LoginPageActivity.mGlobalProducts[j]); } } } }
private async void LoadLocationData() { mProgressDialog = ProgressDialog.Show(this, "Please wait...", "Getting location data...", true); //this.mListViewLocations = this.FindViewById<RecyclerView>(Resource.Id.recyclerViewLocations); List <LocationViewModel> mLocationsByUser = await mLocationDataService.GetAll(); mLocations = new List <LocationViewModel>(); for (int i = 0; mLocationsByUser.Count > i; i++) { if (mLocationsByUser[i].AddedUserId == LoginActivity.StaticUserClass.ID.ToString()) { mLocations.Add(mLocationsByUser[i]); } } if (mLocations != null) { this.mLocationsAdapter = new LocationsRecycleAdapter(mLocations, this); this.mLocationsAdapter.ItemClick += OnLocationClicked; this.mListViewLocations.SetAdapter(this.mLocationsAdapter); } mProgressDialog.Hide(); }
private async void LoadData() { LoginPageActivity.mGlobalLocations.Clear(); LoginPageActivity.mGlobalLocations = await mLocationDataService.GetAll(); }
public IEnumerable <locationModel> GetAll() { return(LocationDataAccessLayer.GetAll()); }