public Transporte SelectTransporte(int?Id)
        {
            Data.dsTransporteTableAdapters.TransporteTableAdapter adapter = new Data.dsTransporteTableAdapters.TransporteTableAdapter();
            Data.dsTransporte.TransporteDataTable dt = adapter.SelectTransporte(Id);

            var Transporte = new Transporte();

            if (dt.Rows.Count == 0)
            {
                return(Transporte);
            }

            foreach (Data.dsTransporte.TransporteRow data in dt)
            {
                Transporte.Id     = data.IdTransporte;
                Transporte.Nombre = data.Nombre;
            }

            return(Transporte);
        }
        public List <Transporte> SelectTransportes()
        {
            Data.dsTransporteTableAdapters.TransportesTableAdapter adapter = new Data.dsTransporteTableAdapters.TransportesTableAdapter();
            Data.dsTransporte.TransportesDataTable dt = adapter.SelectTransportes();

            var Transportes = new List <Transporte>();

            if (dt.Rows.Count == 0)
            {
                return(Transportes);
            }

            foreach (Data.dsTransporte.TransportesRow data in dt)
            {
                var Transporte = new Transporte();

                Transporte.Id     = data.IdTransporte;
                Transporte.Nombre = data.Nombre;

                Transportes.Add(Transporte);
            }

            return(Transportes);
        }