Esempio n. 1
0
        public static OrdenDTO MostrarOrdenUsuario(int idOrden)
        {
            App_Code.DAL.OrdenDSTableAdapters.orden1TableAdapter adaptador = new App_Code.DAL.OrdenDSTableAdapters.orden1TableAdapter();
            App_Code.DAL.OrdenDS.orden1DataTable tabla = adaptador.MostrarOrdId(idOrden);

            if (tabla.Rows.Count == 0)
            {
                return(null);
            }
            return(filaDTOOrden(tabla[0]));
        }
Esempio n. 2
0
        public static List <OrdenDTO> MostrarTodosProductos()

        {
            List <OrdenDTO> listarOrden = new List <OrdenDTO>();

            App_Code.DAL.OrdenDSTableAdapters.orden1TableAdapter adaptador = new App_Code.DAL.OrdenDSTableAdapters.orden1TableAdapter();
            App_Code.DAL.OrdenDS.orden1DataTable tabla = adaptador.MostrarOrd();
            foreach (App_Code.DAL.OrdenDS.orden1Row filas in tabla)
            {
                listarOrden.Add(filaDTOOrden(filas));
            }

            return(listarOrden);
        }
Esempio n. 3
0
        public double Precio(int id)
        {
            double prec = 0;

            App_Code.DAL.OrdenDSTableAdapters.orden1TableAdapter adaptador = new App_Code.DAL.OrdenDSTableAdapters.orden1TableAdapter();
            App_Code.DAL.OrdenDS.orden1DataTable tabla = adaptador.MostrarOrdId(id);
            foreach (App_Code.DAL.OrdenDS.orden1Row filas in tabla)
            {
                if (filas.idorden == id)
                {
                    prec = Convert.ToDouble(filas.precio);
                }
            }
            return(prec);
        }