예제 #1
0
 public void UpdateTagChartData()
 {
     if (Operations != null)
     {
         TagChartData = VMUtils.GetTagsRepartition(Operations, _compareDate);// data;
     }
 }
예제 #2
0
        private void UpdateTagDepenses(DateTime compareDate)
        {
            if (Accounts == null)
            {
                return;
            }

            var operations = Accounts.Where(x => x.Operations != null).SelectMany(x => x.Operations);

            TagDepenses = VMUtils.GetTagsRepartition(operations, compareDate);


            //var data = operations
            //    .Where(x=>!String.IsNullOrWhiteSpace(x.TagName))
            //    .Where(x => x.Amount < 0)
            //    .Where(x => x.Date.CompareTo(compareDate) > 0)
            //    .GroupBy(x => x.TagName)
            //    .ToDictionary(x => x.Key, x => Math.Abs(x.Sum(y => y.Amount)));

            //TagDepenses = data;
        }