public List <PortafolioLiberar_Response> BuscarPortafolios(PortafolioLiberar_Request entidad) { List <PortafolioLiberar_Response> retorno = null; PortafolioLiberar_Response tmp = null; try { using (SqlConnection conection = new SqlConnection(ConfigurationManager.ConnectionStrings["cnxIndra"].ConnectionString)) { conection.Open(); using (SqlCommand command = new SqlCommand("[pa_sps_portafolio_liberar]", conection)) { command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@vi_codigo", entidad.codigo); command.Parameters.AddWithValue("@vi_nombre", entidad.nombre); using (SqlDataReader dr = command.ExecuteReader()) { retorno = new List <PortafolioLiberar_Response>(); if (dr.HasRows) { while (dr.Read()) { tmp = new PortafolioLiberar_Response(); tmp.codigo = dr.GetString(dr.GetOrdinal("no_codigo")); tmp.nombre = dr.GetString(dr.GetOrdinal("no_nombre")); tmp.descripcion = dr.GetString(dr.GetOrdinal("tx_descripcion")); tmp.fecha_creacion = dr.GetString(dr.GetOrdinal("fecha_creacion")); tmp.prioridad = dr.GetString(dr.GetOrdinal("prioridad")); tmp.categoria = dr.GetString(dr.GetOrdinal("categoria")); tmp.responsable = dr.GetString(dr.GetOrdinal("responsable")); tmp.codigo_portafolio = dr.GetInt32(dr.GetOrdinal("nid_portafolio")); retorno.Add(tmp); } } else { retorno = new List <PortafolioLiberar_Response>(); } } } conection.Close(); } return(retorno); } catch (Exception ex) { throw (ex); } }
public List <RecursosComponente_Response> BuscarRecursosComponente(PortafolioLiberar_Request obj) { try { return(liberarBL.BuscarRecursosComponente(obj)); } catch (Exception) { throw; } }
public List <ComponenteCerrado_Response> BuscarComponentesCerrados(PortafolioLiberar_Request obj) { try { return(liberarBL.BuscarComponentesCerrados(obj)); } catch (Exception) { throw; } }
public List <PortafolioLiberar_Response> BuscarPortafolios(PortafolioLiberar_Request obj) { try { return(liberarBL.BuscarPortafolios(obj)); } catch (Exception) { throw; } }
public List <RecursolioLiberar_Response> BuscarRecursos(PortafolioLiberar_Request obj) { try { return(liberarservice.BuscarRecursos(obj)); } catch (Exception) { throw; } }
public List <RecursosComponente_Response> BuscarRecursosComponente(PortafolioLiberar_Request entidad) { List <RecursosComponente_Response> retorno = null; RecursosComponente_Response tmp = null; try { using (SqlConnection conection = new SqlConnection(ConfigurationManager.ConnectionStrings["cnxIndra"].ConnectionString)) { conection.Open(); using (SqlCommand command = new SqlCommand("[pa_sps_portafolio_componente_recurso_disponible]", conection)) { command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@nid_portafolio", entidad.codigo_portafolio); command.Parameters.AddWithValue("@filtro", entidad.tipo_filtro); command.Parameters.AddWithValue("@nid_filtro", entidad.codigo_filtro); using (SqlDataReader dr = command.ExecuteReader()) { retorno = new List <RecursosComponente_Response>(); if (dr.HasRows) { while (dr.Read()) { tmp = new RecursosComponente_Response(); tmp.codigo_componente = dr.GetInt32(dr.GetOrdinal("nid_componente")); tmp.componente = dr.GetString(dr.GetOrdinal("componente")); tmp.prioridad = dr.GetString(dr.GetOrdinal("prioridad")); tmp.codigo_recurso = dr.GetInt32(dr.GetOrdinal("nid_recurso")); tmp.recurso = dr.GetString(dr.GetOrdinal("no_nombre")); tmp.total_recurso = dr.GetInt32(dr.GetOrdinal("nu_recursototal")); retorno.Add(tmp); } } else { retorno = new List <RecursosComponente_Response>(); } } } conection.Close(); } return(retorno); } catch (Exception ex) { throw (ex); } }
public List <PortafolioLiberar_Response> BuscarPortafolios(PortafolioLiberar_Request obj) { try { if (obj.codigo == null) { obj.codigo = ""; } if (obj.nombre == null) { obj.nombre = ""; } return(liberarRecursosDA.BuscarPortafolios(obj)); } catch (Exception) { throw; } }