Beispiel #1
0
        public int DevolverID(string nombre)
        {
            int             identificador = 0;
            ConexionGeneral CG            = new ConexionGeneral();

            identificador = int.Parse(CG.ValorUnico("SELECT codItem FROM ItemStock WHERE nombre = '" + nombre + "'"));
            return(identificador);
        }
Beispiel #2
0
        public string MostrarPrecio(string nombre)
        {
            string          precio   = "0";
            string          consulta = "SELECT precio FROM ItemStock WHERE nombre = '" + nombre + "'";
            ConexionGeneral CG       = new ConexionGeneral();

            precio = CG.ValorUnico(consulta).ToString();
            return(precio);
        }
Beispiel #3
0
        public int CrearPedido(int mesa)
        {
            ConexionGeneral CG = new ConexionGeneral();

            CG.Ejecutor("INSERT INTO Pedido (idCliente, tipo, mesa, idEmpleado) VALUES (0, 0," + mesa + ", 0)");
            string pedidoString = CG.ValorUnico("SELECT idPedido FROM Pedido ORDER BY idPedido DESC LIMIT 1 ");
            int    pedidoNum    = int.Parse(pedidoString);

            return(pedidoNum);
        }
Beispiel #4
0
        public bool MesaEstado(int mesa)
        {
            bool            MesaEst = false;
            ConexionGeneral CG      = new ConexionGeneral();
            string          mesaTexto;

            mesaTexto = CG.ValorUnico("SELECT estadoMesa FROM Mesa WHERE idMesa = " + mesa + "");
            if (mesaTexto == "1")
            {
                MesaEst = true;
            }
            return(MesaEst);
        }
        public int FacturaProductoUltimoID()
        {
            ConexionGeneral CG = new ConexionGeneral();

            return(Int32.Parse(CG.ValorUnico("SELECT facturaID FROM Factura ORDER BY facturaID DESC LIMIT 1 ")));
        }
Beispiel #6
0
        public int MesaVerPedido(int mesa)
        {
            ConexionGeneral CG = new ConexionGeneral();

            return(int.Parse(CG.ValorUnico("SELECT pedidoMesa FROM Mesa WHERE idMesa = " + mesa + "")));
        }