public List <Estados> GetEstados() { Datos data = new Datos(); data.conectar(); SqlCommand command = data.sqlConnection.CreateCommand(); command.CommandText = "Select * from ESTADOS"; command.CommandType = CommandType.Text; SqlDataReader reader = command.ExecuteReader(); while (reader.Read()) { Estados uEstado = new Estados(); uEstado.EstadoId = (int)reader["ESTADO_ID"]; uEstado.EstadoDescripcion = reader["ESTADO_DESCRIPCION"].ToString(); estadosList.Add(uEstado); } reader.Close(); data.sqlConnection.Close(); return(estadosList); }
public Solicitudes() { categoria = new Categorias(); subcategoria = new SubCategorias(); estado = new Estados(); }