Esempio n. 1
0
 private void AddItemRegistry(Int32 id, Decimal qty, CommonUnit.InventoryType type, String comment)
 {
     try {
         _inventoryService.AddItemRegistry(id, qty, type, comment);
     }
     catch (Exception ex) {
         base.Log(ex);
     }
     finally {
     }
 }
        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);
        }