Exemplo n.º 1
0
        private void btUpdate_Click(object sender, RoutedEventArgs e)
        {
            if (ProjectView.IsVisible)
            {
                AddEditProjectDialog addEditProject = new AddEditProjectDialog();
                addEditProject.ShowDialog();
                LoadDataFromDb(Globals.currentUser);
            }

            if (SprintView.IsVisible)
            {
                EditSelectedSprint();
            }

            if (UserStoryView.IsVisible)
            {
                EditSelectedUserStory();
            }

            if (IssueView.IsVisible)
            {
                if (IssueListView.SelectedItem != null)
                {
                    AddEditIssueDialog addEditIssue = new AddEditIssueDialog((IssueListItem)IssueListView.SelectedItem);
                    addEditIssue.ShowDialog();
                    IssueListView.ItemsSource = null;
                    LoadDataFromDb(Globals.currentUser);
                }
                else
                {
                    new MessageBoxCustom("Please choose one defect to update", MessageBoxCustom.MessageType.Info, MessageBoxCustom.MessageButtons.Ok);
                }
            }
        }
Exemplo n.º 2
0
        private void btNew_Click(object sender, RoutedEventArgs e)
        {
            if (ProjectView.IsVisible)
            {
                AddEditProjectDialog addEditProject = new AddEditProjectDialog();
                addEditProject.ShowDialog();
                LoadDataFromDb(Globals.currentUser);
            }

            if (SprintView.IsVisible)
            {
                AddEditSprintDialog addEditSprint = new AddEditSprintDialog(null);
                addEditSprint.ShowDialog();
                LoadDataFromDb(Globals.currentUser);
            }

            if (UserStoryView.IsVisible)
            {
                AddEditUserStoryDialog addEditUserStory = new AddEditUserStoryDialog(null);
                addEditUserStory.ShowDialog();
                LoadDataFromDb(Globals.currentUser);
            }

            if (IssueView.IsVisible)
            {
                AddEditIssueDialog addEditIssue = new AddEditIssueDialog(null);
                addEditIssue.ShowDialog();
                IssueListView.ItemsSource = null;
                LoadDataFromDb(Globals.currentUser);
            }
        }