public void SmartCascadingDeleteOfAll(List <long> duplicateCrcsToRemove, int idToStay)
        {
            foreach (int idToLeave in duplicateCrcsToRemove)
            {
                SmartCascadingDelete(idToLeave, idToStay);
            }

            int rows = DbSaveMsgBox.CheckAskSave(_db);
        }
Example #2
0
        public static void DoAll()
        {
            _now = DateTime.Now;
            LoadFolderCsvsToDb(PreSet.PathToCibcVisa, "cibccreditcard*.ofx", Vs);
            UpdateTxCoreWith_VI();

            LoadFolderCsvsToDb(PreSet.PathToPcMaster, "report*.csv", Mc);
            UpdateTxCoreWith_MC();

            LoadFolderCsvsToDb(PreSet.PathToTdAavPro, "account*.csv", Td);
            LoadFolderCsvsToDb(PreSet.PathToTdPerson, "account*.csv", Td);
            UpdateTxCoreWith_TD();

            DbSaveMsgBox.CheckAskSave(_db);
        }
        public static void SetNewName(int ID, string fullNewName, DdjEf4DBContext db)
        {
            //DdjEf4DBContext db = new DdjEf4DBContext();

            var query = from ap in db.MediaUnits
                        where ap.ID == ID
                        select ap;

            foreach (MediaUnit ap in query)
            {
                ap.PathFileExtOrg = fullNewName;
            }

            int rows = DbSaveMsgBox.CheckAskSave(db);
        }
        async void onReLoad(object s, RoutedEventArgs e)
        {
            switch (DbSaveMsgBox.CheckAskSave(_db))
            {
            case (int)MsgBoxDbRslt.Yes: break;

            default: break;

            case (int)MsgBoxDbRslt.Cancel: return;

            case (int)MsgBoxDbRslt.No: break;
            }

            await reLoadTxCore();

            onClear1(s, e);
        }
        async void onBalanceToDb(object s, RoutedEventArgs e)
        {
            try
            {
                bBalance.Visibility = Visibility.Collapsed;
                await Task.Delay(9);

                using (var db = A0DbContext.Create())
                {
                    var tmsdb = db.TxMoneySrcs.FirstOrDefault(r => r.Id == _tmsId);
                    if (tmsdb != null)
                    {
                        tmsdb.IniBalance += _balDelta;
                        var rowsSaved = DbSaveMsgBox.CheckAskSave(db);
                        tBalance.Text = $"{rowsSaved} row saved.";
                        await reload();

                        chartuc.RmvSeries(_tmsFla);
                        addSeries(tmsdb.Id, tmsdb.Fla, tmsdb.IniBalance);
                    }
                }
            }
            finally { /*bBalance.Visibility = Visibility.Visible;*/ }
        }
Example #6
0
 void onCheckSave(object x)
 {
     DbSaveMsgBox.CheckAskSave(Db);
 }