public void AddQuestionWindow(AddQuestionListWindow window)
 {
     if (Valid(true))
     {
         ErrorMessage = null;
         var QuestionWindow = new AddQuestionWindow();
         QuestionWindow.Owner = window;
         QuestionWindow.Show();
     }
 }
        public void AddVragenlijst(AddQuestionListWindow window)
        {
            if (Valid(false))
            {
                ErrorMessage = null;
                //Vragenlijst toevoegen aan database
                if (this.dataServer.AddVragenlijst(NewVragenlijst.VragenlijstModel))
                {
                    // TODO: Check how to pass to other page to update the datasource.
                    //QuestionList.Add(tmp);
                    RaisePropertyChanged("InspectionList");
                    _oldPage.QuestionList.Add(NewVragenlijst);
                }

                //vragen toevoegen aan database
                //foreach (Vraag v in VragenVerzameling)
                //    dataServer.AddVraag(v);

                CloseAddWindow(window);
            }
        }
 public void OpenNewWindow()
 {
     if (_addListWindow == null)
     {
         _addListWindow       = new AddQuestionListWindow();
         _addListWindow.Owner = Application.Current.MainWindow;
         _addListWindow.Show();
     }
     else
     {
         try
         {
             _addListWindow.Show();
         }
         catch (Exception e)
         {
             _addListWindow       = new AddQuestionListWindow();
             _addListWindow.Owner = Application.Current.MainWindow;
             _addListWindow.Show();
         }
     }
 }
Esempio n. 4
0
 public void AddQuestionWindow(AddQuestionListWindow parent)
 {
     if (_questionWindow == null)
     {
         _questionWindow       = new AddQuestionWindow();
         _questionWindow.Owner = parent;
         _questionWindow.Show();
     }
     else
     {
         try
         {
             _questionWindow.Show();
         }
         catch (Exception e)
         {
             _questionWindow       = new AddQuestionWindow();
             _questionWindow.Owner = parent;
             _questionWindow.Show();
         }
     }
 }
 private void CloseAddWindow(AddQuestionListWindow window)
 {
     _questionListWindow = null;
     window.Close();
 }
 private void CloseEditWindow(EditQuestionListWindow window)
 {
     _questionListWindow = null;
     window.Close();
 }