Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
0
        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;
            }
        }