コード例 #1
0
        public Boolean AddItemRegistry(Int32 id, Decimal qty, CommonUnit.InventoryType type, String comment)
        {
            InventoryRegistry query = new InventoryRegistry();

            try {
                using (menuzRusDataContext db = new menuzRusDataContext(base.connectionString)) {
                    query.Quantity         = qty;
                    query.Type             = (Int32)type;
                    query.AssociatedItemId = id;
                    query.Comment          = comment;
                    db.InventoryRegistries.InsertOnSubmit(query);
                    db.SubmitChanges();
                }
            }
            catch (Exception ex) {
                return(false);
            }
            return(true);
        }
コード例 #2
0
 public static InventoryObj getObj(int objID)
 {
     return(InventoryRegistry.Registry(objID));
 }