示例#1
0
 private async void SaveSeatEdit()
 {
     try
     {
         SelectedSeat.CopyFrom(EditableSeat);
         await _service.UpdateSeatAsync((SeatDto)SelectedSeat);
     }
     catch (Exception ex) when(ex is NetworkException || ex is HttpRequestException)
     {
         OnMessageApplication($"Unexpected error occured! ({ex.Message})");
     }
     FinishingSeatEdit?.Invoke(this, EventArgs.Empty);
 }
示例#2
0
 private async void SellSeat()
 {
     try
     {
         if (!EditableSeat.IsValid())
         {
             OnMessageApplication("Minden mezőt ki kell tölteni.");
             return;
         }
         SelectedSeat.CopyFrom(EditableSeat);
         SelectedSeat.Status = 2;
         await _service.UpdateSeatAsync((SeatDto)SelectedSeat);
     }
     catch (Exception ex) when(ex is NetworkException || ex is HttpRequestException)
     {
         OnMessageApplication($"Unexpected error occured! ({ex.Message})");
     }
     FinishingSeatEdit?.Invoke(this, EventArgs.Empty);
 }