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); }
public static InventoryObj getObj(int objID) { return(InventoryRegistry.Registry(objID)); }