コード例 #1
0
 private void Ok_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (TxtName.Text == "" || txtDate.Text == "")
         {
             TxtError.Text = "Beide velden moeten ingevuld zijn!";
         }
         else
         {
             travelRepo.CreateTravel(TxtName.Text, txtDate.Text, activeUser.Id);
             travels.Add(new Travel()
             {
                 Id = activeUser.Id + TxtName.Text, Name = TxtName.Text, Date = txtDate.Text, UserId = activeUser.Id
             });
             ClosePopup();
         }
     }
     catch (MobileServiceInvalidOperationException ex)
     {
     }
 }