Beispiel #1
0
        public static void SaveProductMap(short varLocationID, short[] itemList)
        {
            QueryCommandCollection coll = new SubSonic.QueryCommandCollection();
            //delete out the existing
            QueryCommand cmdDel = new QueryCommand("DELETE FROM ProductInventory WHERE LocationID=@LocationID", Location.Schema.Provider.Name);

            cmdDel.AddParameter("@LocationID", varLocationID);
            coll.Add(cmdDel);
            DataService.ExecuteTransaction(coll);
            foreach (short item in itemList)
            {
                ProductInventory varProductInventory = new ProductInventory();
                varProductInventory.SetColumnValue("LocationID", varLocationID);
                varProductInventory.SetColumnValue("ProductID", item);
                varProductInventory.Save();
            }
        }
Beispiel #2
0
        public void Update(int ProductID, short LocationID, string Shelf, byte Bin, short Quantity, Guid Rowguid, DateTime ModifiedDate)
        {
            ProductInventory item = new ProductInventory();

            item.ProductID = ProductID;

            item.LocationID = LocationID;

            item.Shelf = Shelf;

            item.Bin = Bin;

            item.Quantity = Quantity;

            item.Rowguid = Rowguid;

            item.ModifiedDate = ModifiedDate;

            item.MarkOld();
            item.Save(UserName);
        }