Esempio n. 1
0
 partial void DeleteInitialSetup(InitialSetup instance);
Esempio n. 2
0
 partial void InsertInitialSetup(InitialSetup instance);
Esempio n. 3
0
 partial void UpdateInitialSetup(InitialSetup instance);
Esempio n. 4
0
        private void SaveSetUp()
        {
            using (PawnGuardDBDataContext db = new PawnGuardDBDataContext()) {
                LinqExt.Truncate(db.Branches);
                LinqExt.Truncate(db.AppSettings);
                LinqExt.Truncate(db.Moneys);
                LinqExt.Truncate(db.Currencies);
                LinqExt.Truncate(db.ItemCategories);
                LinqExt.Truncate(db.Golds);
                LinqExt.Truncate(db.Stones);
                LinqExt.Truncate(db.InitialSetups);

                db.Branches.InsertOnSubmit(Branch);
                db.AppSettings.InsertOnSubmit(BranchPrimaryCurreny);
                db.Moneys.InsertAllOnSubmit(BranchMoney);
                db.Currencies.InsertAllOnSubmit(BranchCurrency);
                db.ItemCategories.InsertAllOnSubmit(ItemCategories);
                db.Golds.InsertAllOnSubmit(GoldList);
                db.Stones.InsertAllOnSubmit(StoneList);

                InitialSetup inSetup = new InitialSetup() {
                    parentId = "000001",
                    step = "SetState",
                    createdAt = DateTime.Now,
                    updateAt = DateTime.Now
                };

                db.InitialSetups.InsertOnSubmit(inSetup);
                db.SubmitChanges();

                ProgressBarFinal.Dispatcher.Invoke(new Action(() => {
                    ProgressBarFinal.Visibility = Visibility.Hidden;
                }));
                ButtonStartApp.Dispatcher.Invoke(new Action(() => {
                    ButtonStartApp.Visibility = Visibility.Visible;
                }));
            }
        }