Esempio n. 1
0
        //Add a Requirement
        private void uxAdd_Click(object sender, RoutedEventArgs e)
        {
            var window = new RequirementWindow();

            if (window.ShowDialog() == true)
            {
                var uiRequirementModel         = window.Requirement;
                var repositoryRequirementModel = uiRequirementModel.ToRepositoryModel();
                App.RequirementRepository.Add(repositoryRequirementModel);
                LoadRequirements();
            }
        }
Esempio n. 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);
            }
        }