Example #1
0
        private void ChangeValue(Action <ProductArticleOrder> changeAction)
        {
            DataChange.GetLock();

            using (StoreKeeperDataContext dataContext = new StoreKeeperDataContext())
            {
                Guid id = OrderId;
                ProductArticleOrder order = dataContext.ProductArticleOrders.Find(id);

                changeAction(order);
                dataContext.SaveChanges();
            }
        }
Example #2
0
        private void ChangeValue(Action <ProductArticleItem> changeAction)
        {
            DataChange.GetLock();

            using (StoreKeeperDataContext dataContext = new StoreKeeperDataContext())
            {
                Guid id = ArticleItemId;
                ProductArticleItem articleItem = dataContext.ProductArticleItems.Find(id);

                changeAction(articleItem);

                dataContext.SaveChanges();
            }
        }
        internal void Save()
        {
            DataChange.GetLock();

            using (StoreKeeperDataContext dataContext = new StoreKeeperDataContext())
            {
                Guid    id      = StorageId;
                Storage storage = dataContext.Storages.Find(id);

                storage.Name        = Name;
                storage.Prefix      = id != Constants.CentralStorageId ? Prefix : null;
                storage.IsExtern    = IsExtern;
                storage.CompanyName = CompanyName;
                storage.Street      = Street;
                storage.Number      = Number;
                storage.ZipCode     = ZipCode;
                storage.City        = City;
                storage.CompanyId   = CompanyId;
                storage.TaxId       = TaxId;

                dataContext.SaveChanges();
            }
        }