private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (Requirement != null)
            {
                if (Requirement.Type == "SW")
                {
                    uxSW.IsChecked = true;
                }
                else
                {
                    uxHW.IsChecked = true;
                }
                if (Requirement.Status == "Open")
                {
                    uxOpen.IsChecked = true;
                }
                else
                {
                    uxClosed.IsChecked = true;
                }

                uxSubmit.Content = "Modify";
            }
            else
            {
                Requirement = new UIRequirementModel();
            }

            uxGrid.DataContext = Requirement;
        }
Exemple #2
0
        private void OnUpdateRequirement(UIRequirementModel selectedRequirement)
        {
            var window = new RequirementWindow();

            window.Requirement = selectedRequirement;
            if (window.ShowDialog() == true)
            {
                var uiRequirement = window.Requirement;
                var repositoryRequirementModel = uiRequirement.ToRepositoryModel();
                App.RequirementRepository.Update(repositoryRequirementModel);
            }
        }
Exemple #3
0
 private bool CanDeleteRequirement(UIRequirementModel arg)
 {
     return(uxDataGrid.SelectedItem != null);
 }
Exemple #4
0
 private void OnDeleteRequirement(UIRequirementModel uIRequirementModel)
 {
     App.RequirementRepository.Delete(uIRequirementModel.Id);
     LoadRequirements();
 }
Exemple #5
0
        //Get Requirements
        private void LoadRequirements()
        {
            var requirements = App.RequirementRepository.GetAll();

            Requirements = new ObservableCollection <UIRequirementModel>(requirements.Select(x => UIRequirementModel.ToModel(x)));
        }