예제 #1
0
 public void Clear()
 {
     Data = null;
     Players.Clear();
     Monsters.Clear();
     Npcs.Clear();
     Others.Clear();
 }
예제 #2
0
        private void FillOtherCollections(ITenantDBsDir dir)
        {
            Others.Clear();

            var othrColxns = dir.Collections.For(Date).OtherColxns
                             .GetAll().GroupBy(_ => _.GetGLId());

            foreach (var othr in othrColxns)
            {
                Others.Add(othr.Key, othr.Sum(_ => _.Amount));
            }
        }
예제 #3
0
 private void Reset_Click(object sender, EventArgs e)
 {
     MName.Clear();
     LanguageBox.SelectedItem = null;
     Lead.Clear();
     Others.Clear();
     Genre.SelectedItem = null;
     YearPicker.ResetText();
     DatePicker.ResetText();
     R1.Checked      = false;
     R2.Checked      = false;
     R3.Checked      = false;
     R4.Checked      = false;
     R5.Checked      = false;
     movier.Checked  = false;
     seriesr.Checked = false;
     changeMade      = false;
 }
예제 #4
0
        public async Task <ApplicationProductList> GetAllProductsAsync()
        {
            var uri = UriHelper.CombineUri(GlobalSetting.Instance.GatewayShoppingEndpoint, $"{ApiUrlBase}/all");

            ApplicationProductList result = await _requestProvider.GetAsync <ApplicationProductList>(uri);

            _applicationProductList = result;

            if (Beverages != null)
            {
                Beverages.Clear();
                CannedGoods.Clear();
                Cleaners.Clear();
                DryGoods.Clear();
                PaperGoods.Clear();
                PersonalCare.Clear();
                Others.Clear();
            }

            // populate product types
            foreach (var i in result.Items)
            {
                if (i.Type == null)
                {
                    i.Type = "others";
                }

                switch (i.Type.ToLower())
                {
                case "beverage":
                    Beverages.Add(new ProductModel(i));
                    break;

                case "canned goods":
                    CannedGoods.Add(new ProductModel(i));
                    break;

                case "cleaners":
                    Cleaners.Add(new ProductModel(i));
                    break;

                case "dry goods":
                    DryGoods.Add(new ProductModel(i));
                    break;

                case "paper goods":
                    PaperGoods.Add(new ProductModel(i));
                    break;

                case "personal care":
                    PersonalCare.Add(new ProductModel(i));
                    break;

                default:
                    Others.Add(new ProductModel(i));
                    break;
                }
            }

            Beverages    = SortCategory(_beverages);
            CannedGoods  = SortCategory(_cannedGoods);
            Cleaners     = SortCategory(_cleaners);
            DryGoods     = SortCategory(_dryGoods);
            PaperGoods   = SortCategory(_paperGoods);
            PersonalCare = SortCategory(_personalCare);
            Others       = SortCategory(_others);

            return(result);
        }