private void bt_AcceptAdd_Click(object sender, RoutedEventArgs e)
 {
     if (this.dp_Date.SelectedDate != null && this.dp_Date.SelectedDate <= DateTime.Now)
     {
         string about = RichTextBoxController.ConvertFlowDocumentToString(rtb_Description.Document);
         this.NewCalamity  = new Calamity(about, this.dp_Date.SelectedDate.Value);
         this.DialogResult = true;
     }
     else
     {
         MessageBox.Show("Select a valid date");
     }
 }
        private void bt_Accept_Click(object sender, RoutedEventArgs e)
        {
            if (this.dp_Date.SelectedDate != null && this.dp_Date.SelectedDate >= this.Calamity.Date)
            {
                this.Calamity.IsSolvedDate = this.dp_Date.SelectedDate.Value;

                string solution = RichTextBoxController.ConvertFlowDocumentToString(rtb_Solution.Document);
                this.Calamity.IsSolvedSolution = solution;

                this.DialogResult = true;
            }
            else
            {
                MessageBox.Show("Select a valid date");
            }
        }