public void aggregateStoreMonth()
 {
     storeNames.Clear();
     foreach (Item item in itemsModel.GetYearItems(DateTime.Now.Year - selectedYear))
     {
         if (storeNames.ContainsKey(item.Store_name))
         {
             storeNames[item.Store_name][item.Date_of_purchase.Month - 1] += item.Quantity;
         }
         else
         {
             storeNames.Add(item.Store_name, new int[AggregationMonth.Count()]);
             storeNames[item.Store_name][item.Date_of_purchase.Month - 1] = item.Quantity;
         }
     }
 }
 public void aggregateCategoryMonth()
 {
     categories.Clear();
     foreach (Item item in itemsModel.GetYearItems(DateTime.Now.Year - selectedYear))
     {
         if (categories.ContainsKey(item.Categorie))
         {
             categories[item.Categorie][item.Date_of_purchase.Month - 1] += item.Quantity;
         }
         else
         {
             categories.Add(item.Categorie, new int[AggregationMonth.Count()]);
             categories[item.Categorie][item.Date_of_purchase.Month - 1] = item.Quantity;
         }
     }
 }
 public void aggregateProductMonth()
 {
     itemKeys.Clear();
     foreach (Item item in itemsModel.GetYearItems(DateTime.Now.Year - selectedYear))
     {
         if (itemKeys.ContainsKey(item.SerialKey))
         {
             itemKeys[item.SerialKey][item.Date_of_purchase.Month - 1] += item.Quantity;
         }
         else
         {
             itemKeys.Add(item.SerialKey, new int[AggregationMonth.Count()]);
             itemKeys[item.SerialKey][item.Date_of_purchase.Month - 1] = item.Quantity;
         }
     }
 }
Esempio n. 4
0
        public void 集計月度を年月で表示する()
        {
            var act = new AggregationMonth(new DateTime(2020, 9, 25));

            Assert.Equal("2020年9月", act.DisplayValue);
        }
Esempio n. 5
0
        public void Valueの値は常に1日を設定する(int year, int month, int day)
        {
            var act = new AggregationMonth(new DateTime(year, month, day));

            Assert.Equal(new DateTime(year, month, 1), act.Value);
        }
Esempio n. 6
0
        public void HTML要素のValueに設定する用の文字列が0埋めされた形式となっていること(string value, int year, int month, int day)
        {
            var act = new AggregationMonth(new DateTime(year, month, day));

            Assert.Equal(value, act.ElementValue);
        }
Esempio n. 7
0
        public void 集計月度の月が2桁の場合でも正しく表示()
        {
            var act = new AggregationMonth(new DateTime(2020, 10, 25));

            Assert.Equal("2020年10月", act.DisplayValue);
        }