private void InputChequeDetails() { var req = ItemsList.CurrentItem; if (req == null) { return; } if (!req.Amount.HasValue) { Alert.Show("Amount requested should not be blank."); return; } var pbk = AppArgs.DCDR; if (!PopUpInput.TryGetInt("Cheque Number", out int num)) { return; } if (!PopUpInput.TryGetDate("Cheque Date", out DateTime date)) { return; } pbk.ToPreparedCheque(req, num, date); _mainWin.ClickRefresh(); }
private void EditPRNumber(object seleectedItem) { if (!(seleectedItem is LeaseColxnRow row)) { return; } if (row.IntendedDTO == null && row.AmbulantDTO == null) { throw Null.Ref("LeaseColxnRow.DTO"); } var oldVal = row.IsAmbulant ? row.AmbulantDTO.PRNumber : row.IntendedDTO.PRNumber; if (!PopUpInput.TryGetInt("PR Number", out int newVal, oldVal)) { return; } row.DocumentRef = newVal.ToString(); SaveUpdatedRow(row); DailyStatusReportVM.Current.ClickRefresh(); CloseWindow(); }
protected override void LoadRecordForEditing(RequestedChequeDTO rec) { if (!PopUpInput.TryGetInt("Cheque Number", out int num, rec.ChequeNumber)) { return; } if (!PopUpInput.TryGetDate("Cheque Date", out DateTime date, rec.ChequeDate)) { return; } rec.ChequeNumber = num; rec.ChequeDate = date; Repo.Update(rec); }
private async Task AddMultipleStalls(object cmdParam) { if (!PopUpInput.TryGetInt("How many stalls are we adding?", out int count, 10, "Please enter the number of stalls to add")) { return; } _main.StartBeingBusy($"Adding {count} stalls ..."); for (int i = 0; i < count; i++) { Crud.EncodeNewDraftCmd.ExecuteIfItCan(); await Task.Delay(100); await Crud.SaveDraftCmd.RunAsync(); } _main.StopBeingBusy(); }
protected override void RunMainMethod() { var req = ItemsList.CurrentItem; if (!PopUpInput.TryGetDate("Cheque Date", out DateTime date, DateTime.Now.Date)) { return; } if (!PopUpInput.TryGetInt("Cheque Number", out int num)) { return; } AppArgs.Vouchers.SetAs_Prepared(req, date, num); }
private void EditChequeDetails() { var e = ItemsList.CurrentItem; if (!PopUpInput.TryGetDate("Cheque Date", out DateTime date, e.ChequeDate)) { return; } if (!PopUpInput.TryGetInt("Cheque Number", out int num, e.ChequeNumber)) { return; } e.ChequeDate = date; e.ChequeNumber = num; AppArgs.Vouchers.PreparedCheques.Update(e); }