コード例 #1
0
 private void button_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (textBox.Text == "" || textBox_Copy.Text == "" || textBox_Copy1.Text == "" || textBox_Copy2.Text == "" || textBox_Copy3.Text == "" || textBox_Copy4.Text == "")
         {
             throw new ArgumentNullException("You need to fill all fields");
         }
         bl.AddRequest(req);
         MessageBox.Show("Added");
         req = new GuestRequest();
         this.DataContext = req;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }