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); }
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); }