private async void UpdateStatusAction(object obj) { try { IsBusy = true; var result = await PenjualanStore.UpdateDeliveryStatusById(Model.DeliveryStatus.Id, Model.DeliveryStatus); if (result != null) { await MessageHelper.InfoAsync("Update Status Berhasil !"); } else { throw new SystemException("Status Tidak Berhasil Di Simpan !"); } } catch (Exception ex) { await MessageHelper.ErrorAsync(ex.Message); } finally { IsBusy = false; } }
private async void SearchAction(object obj) { try { IsBusy = true; var result = await PenjualanStore.GetBySTT(STT); if (result != null) { IsFound = true; result.Colly = result.Colly.OrderBy(x => x.CollyNumber).ToList(); Model = result; Model.DeliveryStatus.IsSignIn = true; Model.DeliveryStatus.PropertyChanged += (_, __) => UpdateStatusCommand.ChangeCanExecute(); } else { throw new SystemException("STT tidak Ditemukan !"); } } catch (Exception ex) { await MessageHelper.ErrorAsync(ex.Message); } finally { IsBusy = false; } }