private void Add_Click(object sender, RoutedEventArgs e) { if (Reply != null && MoveToFAQ != null) { if ((bool)MoveToFAQ.IsChecked) { Questions.selectedQuestion.question.FrequentlyAsked = true; QuestionReply questionReply = new QuestionReply(); questionReply.Author = MainWindow.doctor; questionReply.Content = Reply.Text; questionReply.Date = DateTime.Today; questionController.AnswerQuestion(Questions.selectedQuestion.question, questionReply); } else { Questions.selectedQuestion.question.FrequentlyAsked = false; QuestionReply questionReply = new QuestionReply(); questionReply.Author = MainWindow.doctor; questionReply.Content = Reply.Text; questionReply.Date = DateTime.Today; questionController.AnswerQuestion(Questions.selectedQuestion.question, questionReply); } Replies.Navigate(new Uri("/Pages/BlogPages/Questions.xaml", UriKind.Relative)); } }
private void Close_Click(object sender, RoutedEventArgs e) { if (!Reply.Text.Equals("")) { MessageBox.Children.Clear(); MessageBox.Children.Add(new MessageBox()); } else { Replies.Navigate(new Uri("/Pages/BlogPages/Questions.xaml", UriKind.Relative)); } }
private void AddReply_Click(object sender, RoutedEventArgs e) { Replies.Navigate(new Uri("/Pages/BlogPages/Questions.xaml", UriKind.Relative)); }