예제 #1
0
        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));
            }
        }
예제 #2
0
        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();
        }
예제 #3
0
 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);
 }
예제 #4
0
 private static void UpdateBankDeposits(DailyTransactionRow row)
 => new BankDepositConverter1(row.MainWindow)
 .Rewrite(row.Date);
예제 #5
0
 private static void UpdateCashierColxns(DailyTransactionRow row)
 => new CashierColxnConverter1(row.MainWindow)
 .Rewrite(row.Date);