Exemplo n.º 1
0
        void OnSetChanged(LeasingSet set)
        {
            if (set == null)
            {
                return;
            }

            switch (set.Monthes.Count)
            {
            case 0:
                break;

            case 1:
                FromMonth = set.Monthes[0].Month;
                ToMonth   = set.Monthes[0].Month;
                break;

            default:
                FromMonth = set.Monthes[0].Month;
                ToMonth   = set.Monthes[set.Monthes.Count - 1].Month;
                break;
            }

            if (m_Window != null)
            {
                m_Window.LeasingChart.LeasingSet = set;
            }

            Statistic = new StatisticModel();
            Statistic.Load(set);
        }
Exemplo n.º 2
0
        private void LeasingChart_RowSelectionChanged(RowManager.Row row)
        {
            var vm = DataContext as LeasingViewViewModel;

            if (vm != null)
            {
                if (row.Selected)
                {
                    var s = new StatisticModel();
                    s.Load(row, vm.LeasingSet);
                    vm.Statistic = s;
                }
                else
                {
                    var s = new StatisticModel();
                    s.Load(vm.LeasingSet);
                    vm.Statistic = s;
                }
            }
        }