コード例 #1
0
        private void Load()
        {
            var assignmentLogic = new AssignmentLogic();

            this.AssignmentViewModels = assignmentLogic.GetAllAssignments()
                                        .Select(a => new AssignmentViewModel(a))
                                        .OrderBy(avm => avm.DueDate)
                                        .ThenBy(avm => avm.Planned);
            this.FilteredAssignmentViewModels = PipeThroughFilter(this.AssignmentViewModels);
            assignmentLogic.Dispose();
            this.PagingManager.Data         = this.FilteredAssignmentViewModels.ToList();
            this.LoadFromAllProjects        = true;
            this.lv_Assignments.ItemsSource = this.PagingManager.Page(this.PagingManager.CurrentPage);
            if (this.cb_ProjectSelection.SelectedItem != null)
            {
                this.cb_ProjectSelection.SelectedItem = this.SelectedProject;
            }
            if (this.cb_StatusFilter.SelectedItem != null)
            {
                this.cb_StatusFilter.SelectedItem = this.SelectedFilter;
            }
        }