Interaction logic for ChangeAssignee.xaml
상속: System.Windows.Window
예제 #1
0
        private void ChangeAssign_OnClick(object sender, RoutedEventArgs e)
        {
            if (isAnyProjectSelected())
            {
                return;
            }

            List <User> assignees = getAssigneesProj();

            if (!assignees.Any())
            {
                MessageBox.Show("You don't have permission to Assign people to this Issue");
                return;
                //jira.issuesCollection[jiraPan.issueList.SelectedIndex].transitions = response2.Data.transitions;
            }
            ChangeAssignee cv = new ChangeAssignee(); cv.WindowStartupLocation = WindowStartupLocation.CenterScreen;

            cv.SetList(assignees);

            cv.Title = "Assign to";
            cv.ShowDialog();
            if (cv.DialogResult.HasValue && cv.DialogResult.Value)
            {
                selectedAssignee     = (cv.valuesList.SelectedIndex >= cv.valuesList.Items.Count || cv.valuesList.SelectedIndex == -1) ? null : (User)cv.valuesList.SelectedItem;
                ChangeAssign.Content = (selectedAssignee != null) ? selectedAssignee.displayName : "none";
            }
        }
예제 #2
0
        private void ChangeAssign_OnClick(object sender, RoutedEventArgs e)
        {
            // = getAssigneesIssue();
            if (!assignees.Any())
            {
                MessageBox.Show("You don't have permission to Assign people to this Issue");
                return;
                //jira.issuesCollection[jiraPan.issueList.SelectedIndex].transitions = response2.Data.transitions;
            }
            ChangeAssignee cv = new ChangeAssignee(); cv.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            cv.SetList(assignees);
            cv.valuesList.SelectedIndex = (ChangeAssign.Content.ToString() != "none") ? IndexByName.Get(ChangeAssign.Content.ToString(), "name", assignees) : -1;
            cv.Title = "Assign to";
            cv.ShowDialog();
            if (cv.DialogResult.HasValue && cv.DialogResult.Value)
            {
                User assign = (cv.valuesList.SelectedIndex >= cv.valuesList.Items.Count || cv.valuesList.SelectedIndex == -1) ? null : (User)cv.valuesList.SelectedItem;
                ChangeAssign.Content = (assign != null) ? assign.name : "none";

            }
        }