Exemple #1
0
        private void LoadWeeks()
        {
            var search = WeekSearch.Text.Length >= 3 ? WeekSearch.Text : string.Empty;

            var weeks = string.IsNullOrWhiteSpace(search)
                ? _weekApplicationService.GetAllOrderByDescending()
                : _weekApplicationService.GetByFilter(search);

            DataGridWeek.ItemsSource = null;
            DataGridWeek.ItemsSource = weeks;
        }
Exemple #2
0
        private void GetDataScreen()
        {
            var assignees = _assigneeApplicationService.GetAll();
            var epics     = _epicApplicationService.GetAllOrderByDescending();
            var weeks     = _weekApplicationService.GetAllOrderByDescending();

            var types = new List <WorkType> {
                WorkType.Bug, WorkType.Story, WorkType.Subtask, WorkType.Task
            };

            CbbWeek.ItemsSource     = new CollectionView(weeks);
            CbbAssignee.ItemsSource = new CollectionView(assignees);
            CbbEpic.ItemsSource     = new CollectionView(epics);
            CbbType.ItemsSource     = types;
        }
        private void LoadAllData()
        {
            var weeks     = _weekApplicationService.GetAllOrderByDescending();
            var assignees = _assigneeApplicationService.GetAll();
            var teams     = _assigneeApplicationService.GetAllTeams();
            var types     = new List <WorkType> {
                WorkType.Bug, WorkType.Story, WorkType.Subtask, WorkType.Task
            };
            var epics = _epicApplicationService.GetAllOrderByDescending();

            _weeks = new CollectionView(weeks);

            CbbWeek.ItemsSource     = _weeks;
            CbbAssignee.ItemsSource = new CollectionView(assignees);
            CbbTeam.ItemsSource     = new CollectionView(teams);
            CbbEpic.ItemsSource     = new CollectionView(epics);
            CbbType.ItemsSource     = types;
            CbbTeam.SelectedItem    = null;
        }
        private void LoadFilters()
        {
            var weeks = _weekApplicationService.GetAllOrderByDescending();

            CbbWeek.ItemsSource = new CollectionView(weeks);

            var epics = _epicApplicationService.GetAllOrderByDescending();

            CbbEpic.ItemsSource = new CollectionView(epics);

            var types = new List <WorkType> {
                WorkType.Bug, WorkType.Story, WorkType.Subtask, WorkType.Task
            };

            CbbType.ItemsSource = new CollectionView(types);

            var status = new List <WorkStatus> {
                WorkStatus.Backlog,
                WorkStatus.ToDo,
                WorkStatus.InProgress,
                WorkStatus.AwaitingCodeReview,
                WorkStatus.Reviewing,
                WorkStatus.AwaitingTests,
                WorkStatus.Testing,
                WorkStatus.AwaitingAcceptanceTests,
                WorkStatus.TestingInAcceptance,
                WorkStatus.AwaitingProduction,
                WorkStatus.Done
            };

            CbbStatus.ItemsSource = new CollectionView(status);

            var assignees = _assigneeApplicationService.GetAll();

            CbbAssignee.ItemsSource = new CollectionView(assignees);

            var teams = _assigneeApplicationService.GetAllTeams();

            CbbTeam.ItemsSource = new CollectionView(teams);
        }
        private void SaveNewWeek()
        {
            if (IncludeDate.SelectedDate == null || EndDate.SelectedDate == null)
            {
                MessageBox.Show("The date fields never could be null.", "Warning!");
                return;
            }

            var weeks    = _weekApplicationService.GetAllOrderByDescending();
            var sequence = weeks.Max(x => x.Sequence) + 1;

            var week = new WeekViewModel
            {
                CreatedBy = "master",
                Start     = IncludeDate.SelectedDate.GetValueOrDefault(),
                End       = EndDate.SelectedDate.GetValueOrDefault(),
                Sequence  = sequence
            };

            _weekApplicationService.Create(week);
            MessageBox.Show("Week has created", "Information.");

            Close();
        }