コード例 #1
0
        private async void UpdateInventories()
        {
            InventoryDataService mInventoryDataService = new InventoryDataService();
            ProductDataService   mProductDataService   = new ProductDataService();

            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]);
                    }
                }
            }
        }
コード例 #2
0
        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]);
                    }
                }
            }
        }
コード例 #3
0
        private async void LoadAdapterData()
        {
            this.mInventories = await mInventoryDataService.GetAll();

            this.mProducts = await mProductDataService.GetAll();

            mProducts.Count();
            //for(int i=0;i< mInventoriesTemp.Count();i++)
            //{
            //    if(mInventoriesTemp[i].IsDeleted && mInventoriesTemp[i].IsConsumed==false)
            //    {
            //        mInventories.Add(mInventoriesTemp[i]);
            //    }
            //}

            this.mInventories = mInventories.OrderBy(e => e.ItemName).ToList();
        }
コード例 #4
0
        private async void LoadInventoryData()
        {
            mProgressDialog = ProgressDialog.Show(this, "Please wait...", "Getting data...", true);
            mStorages       = await mStorageDataService.GetAll();

            this.mInventories = await mInventoryDataService.GetAll();

            this.mProducts = await mProductDataService.GetAll();

            if (mInventories != null)
            {
                this.mInventoryAdapter            = new MainAdapter(this.mInventories, this.mProducts, this);
                this.mInventoryAdapter.ItemClick += OnInventoryClick;
                this.mListViewInventory.SetAdapter(this.mInventoryAdapter);
            }
            mProgressDialog.Hide();
        }
コード例 #5
0
        private async void UpdateInventories()
        {
            LoginPageActivity.mGlobalInventories.Clear();
            List <ProductViewModel>   mProducts       = LoginPageActivity.mGlobalProducts;
            List <InventoryViewModel> tempInventories = await mInventoryDataService.GetAll();

            for (int i = 0; i < tempInventories.Count(); i++)
            {
                for (int j = 0; j < mProducts.Count(); j++)
                {
                    if (tempInventories[i].ProductId == mProducts[j].Id)
                    {
                        tempInventories[i].ItemName = mProducts[j].Name;
                        LoginPageActivity.mGlobalInventories.Add(tempInventories[i]);
                    }
                }
            }
        }
コード例 #6
0
        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]);
                    }
                }
            }
        }