public Boolean AddItemRegistry(Int32 id, Decimal qty, Common.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;
 }
 partial void DeleteInventoryRegistry(InventoryRegistry instance);
 partial void UpdateInventoryRegistry(InventoryRegistry instance);
 partial void InsertInventoryRegistry(InventoryRegistry instance);
		private void detach_InventoryRegistries(InventoryRegistry entity)
		{
			this.SendPropertyChanging();
			entity.Item = null;
		}