public void AddSummary(Dictionary <DateTime, int> summaries, Color itemColor, string itemName, string teacherID)
 {
     foreach (DateTime summaryDate in summaries.Keys)
     {
         SummaryGroupCollection.Where(s => s.SummaryDate == summaryDate).First().AddSummaryItem(itemName, summaries[summaryDate], teacherID, itemColor);
     }
     TotalSummary.AddSummaryItem(itemName, summaries.Values.Sum(), teacherID, itemColor);
 }
 public void AddSummary(Dictionary <DateTime, decimal> summaries, Color itemColor, string itemName, StatisticTypeEnum statisticType)
 {
     foreach (DateTime summaryDate in summaries.Keys)
     {
         SummaryGroupCollection.Where(s => s.SummaryDate == summaryDate).First().AddSummaryItem(itemName, summaries[summaryDate], statisticType, itemColor);
     }
     TotalSummary.AddSummaryItem(itemName, summaries.Values.Sum(), statisticType, itemColor);
     if (statisticType == StatisticTypeEnum.Capital)
     {
         TotalSummary.Vis = System.Windows.Visibility.Hidden;
     }
     else
     {
         TotalSummary.Vis = System.Windows.Visibility.Visible;
     }
 }
 private void OnSummaryClicked(string teacherID, Color itemColor, DateTime summaryDate, bool isTotal)
 {
     if (isTotal)
     {
         foreach (TeachingClassCountGroupViewModel item in SummaryGroupCollection)
         {
             item.ChangeGroupState(false);
         }
     }
     else
     {
         foreach (TeachingClassCountGroupViewModel item in SummaryGroupCollection.Where(s => s.SummaryDate != summaryDate))
         {
             item.ChangeGroupState(false);
         }
         TotalSummary.ChangeGroupState(false);
     }
     _bussiness.GetDetails(teacherID, summaryDate, isTotal);
 }
        private void OnSummaryClicked(StatisticTypeEnum statisticType, DateTime summaryDate, bool isTotal, Color itemColor)
        {
            if (isTotal)
            {
                foreach (FinanceSummaryGroupViewModel item in SummaryGroupCollection)
                {
                    item.ChangeGroupState(false);
                }
            }
            else
            {
                foreach (FinanceSummaryGroupViewModel item in SummaryGroupCollection.Where(s => s.SummaryDate != summaryDate))
                {
                    item.ChangeGroupState(false);
                }
                TotalSummary.ChangeGroupState(false);
            }

            _currentItemColor = itemColor;
            _bussiness.GetDetails(statisticType, summaryDate, isTotal);
        }