public int AgregarOrden(TestOrden x) { using (restaurantEntities bdd = new restaurantEntities()) { try { bdd.P_INSERTAR_ORDENES(DateTime.Now, false, x.mesa, x.json); return(1); } catch (Exception ex) { return(0); } } }
public bool testAgregarOrden(string mesa, string json) { using (restaurantEntities bdd = new restaurantEntities()) { try { short m = short.Parse(mesa); bdd.P_INSERTAR_ORDENES(DateTime.Now, false, m, json); return(true); } catch (Exception ex) { return(false); } } }