コード例 #1
0
        private void RefreshGroupOwner()
        {
            group                   = groupRepository.GetByUser(groupOwner);
            statuses                = issueRepository.GetAllStatuses();
            priorities              = issueRepository.GetAllPriorities();
            membersList             = groupRepository.GetUsersFromGroup(group.GroupID);
            unacceptedList          = groupRepository.GetUnacceptedMembers(group.GroupID);
            listOfTasks.ItemsSource = tasksList;

            CurrentStatus.ItemsSource       = statuses;
            CurrentStatus.DisplayMemberPath = "Name";
            CurrentStatus.SelectedValuePath = ".";
            CurrentStatus.SelectedIndex     = 0;

            CurrentPriority.ItemsSource       = priorities;
            CurrentPriority.DisplayMemberPath = "Name";
            CurrentPriority.SelectedValuePath = ".";
            CurrentPriority.SelectedIndex     = 0;

            CurrentAssignee.ItemsSource       = membersList;
            CurrentAssignee.DisplayMemberPath = "Surname";
            CurrentAssignee.SelectedValuePath = ".";
            CurrentAssignee.SelectedIndex     = 0;

            NewAssignee.ItemsSource       = membersList;
            NewAssignee.DisplayMemberPath = "Surname";
            NewAssignee.SelectedValuePath = ".";
            NewAssignee.SelectedIndex     = 0;

            NewPriority.ItemsSource       = priorities;
            NewPriority.DisplayMemberPath = "Name";
            NewPriority.SelectedValuePath = ".";
            NewPriority.SelectedIndex     = 0;

            group          = groupRepository.GetByUser(groupOwner);
            statuses       = issueRepository.GetAllStatuses();
            priorities     = issueRepository.GetAllPriorities();
            membersList    = groupRepository.GetUsersFromGroup(group.GroupID);
            unacceptedList = groupRepository.GetUnacceptedMembers(group.GroupID);

            listOfMembers.ItemsSource    = membersList;
            listOfUnaccepted.ItemsSource = unacceptedList;

            OwnerMenu.DataContext   = groupOwner;
            EditProfile.DataContext = groupOwner;
            tasksList = new List <IssueDetailsVM>();

            foreach (var task in issueRepository.GetGroupIssues(group.GroupID))
            {
                tasksList.Add(new IssueDetailsVM
                {
                    IssueID      = task.IssueID,
                    Title        = task.Title,
                    Description  = task.Description,
                    Assignee     = task.Assignee.Name + ' ' + task.Assignee.Surname,
                    PriorityName = task.Priority.Name,
                    StatusName   = task.Status.Name
                });
            }
            listOfTasks.ItemsSource = tasksList;
        }