Ejemplo n.º 1
0
        private void saveDBStoresLocally()
        {
            DiscountDataContext db = new DiscountDataContext();

            var lStores = from c in db.Stores select c;

            foreach (var i in lStores)
            {
                db.Stores.DeleteOnSubmit(i);
            }
            db.SubmitChanges();

            foreach (CStore store_i in stores)
            {
                var store = new StoresTable();
                store.storeID   = store_i.storeID;
                store.storeName = store_i.storeName;
                db.Stores.InsertOnSubmit(store);
            }
            db.SubmitChanges();
        }
Ejemplo n.º 2
0
        private void saveDBStoresLocally()
        {
            DiscountDataContext db = new DiscountDataContext();

            var lStores = from c in db.Stores select c;

            foreach (var i in lStores)
            {
                db.Stores.DeleteOnSubmit(i);
            }
            db.SubmitChanges();

            foreach (CStore store_i in stores)
            {
                var store = new StoresTable();
                store.storeID = store_i.storeID;
                store.storeName = store_i.storeName;
                db.Stores.InsertOnSubmit(store);
            }
            db.SubmitChanges();
        }