public static async Task <DailyTransactionCell> CheckCache(this DailyTransactionRow row, string cacheDir) { var dates = CacheReader2.GetLoadedDates(cacheDir); if (dates.Contains(row.Date)) { return(ReadLoadedDate(row.Date, cacheDir)); } else { return(await QueryByfServer(row.Date)); } }
public static async Task UpdateRnt(this DailyTransactionRow row) { row.StartBeingBusy("Updating RNT ..."); await Task.Delay(1); await Task.Run(() => { UpdateIntendedColxns(row); UpdateAmbulantColxns(row); UpdateOtherColxns(row); UpdateCashierColxns(row); UpdateBankDeposits(row); }); row.StopBeingBusy(); row.RefreshCmd.ExecuteIfItCan(); }
public static bool CanUpdateRnt(this DailyTransactionRow row) { if (row.IsBusy) { return(false); } if (row.ByfCell == null) { return(false); } if (!row.ByfCell.HasValue) { return(false); } if (!row.ByfCell.IsBalanced) { return(false); } return(true); }
private static void UpdateBankDeposits(DailyTransactionRow row) => new BankDepositConverter1(row.MainWindow) .Rewrite(row.Date);
private static void UpdateCashierColxns(DailyTransactionRow row) => new CashierColxnConverter1(row.MainWindow) .Rewrite(row.Date);