public List mostrardatos(listadoinfo pEN) {
IDbConnection _conn = DBCommon.conexion(); _conn.Open();
SqlCommand __command = new SqlCommand("GET_SP_INFO", _conn as SqlConnection); __command.CommandType = CommandType.StoredProcedure; __command.Parameters.Add(new SqlParameter("@folio", pEN.folio));
IDataReader _reader = __command.ExecuteReader(); List lista = new List(); while (_reader.Read()) {
mostrarofertas.folio = _reader.GetInt32(0);
mostrarofertas.nombre = !_reader.IsDBNull(1) ? _reader.GetString(1) : "N/A";
mostrarofertas.tipo = !_reader.IsDBNull(2) ? _reader.GetString(2) : "N/A";
mostrarofertas.titulo = !_reader.IsDBNull(3) ? _reader.GetString(3) : "N/A";
public List<listadoinfo> mostrardatos(listadoinfo pEN) {
IDbConnection _conn = DBCommon.conexion();
_conn.Open();
SqlCommand __command = new SqlCommand("GET_SP_INFO", _conn as
SqlConnection);
__command.CommandType = CommandType.StoredProcedure;
__command.Parameters.Add(new SqlParameter("@folio", pEN.folio));
IDataReader _reader = __command.ExecuteReader();
List<listadoinfo> lista = new List<listadoinfo>();
while (_reader.Read())
{
mostrarofertas.folio = _reader.GetInt32(0);
mostrarofertas.nombre = !_reader.IsDBNull(1) ? _reader.GetString(1) : "N/A";
mostrarofertas.tipo = !_reader.IsDBNull(2) ? _reader.GetString(2) : "N/A";
mostrarofertas.titulo = !_reader.IsDBNull(3) ? _reader.GetString(3) : "N/A";
}
_conn.Close();
return lista;
}
protected void Page_Load(object sender, EventArgs e){
protected void Page_Load(object sender, EventArgs e){
if (!Page.IsPostBack)
{
if (!IsPostBack && !string.IsNullOrWhiteSpace(Request.QueryString["folio"]))
if (!IsPostBack && !string.IsNullOrWhiteSpace(Request.QueryString["folio"]))
{
ViewState["folio"] = Request.QueryString["folio"];
var folio = int.Parse(Request.QueryString["folio"]);
}
else if (!IsPostBack)
{
Response.Redirect("~/mostrar.aspx", true);
}
}