protected void Page_Load(object sender, EventArgs e) { if (Session["id"] == null || Session["nombre"] == null || Session["rol"] == null || (int)Session["rol"] != 2) { Session["id"] = null; Session["nombre"] = null; Session["rol"] = null; Response.Redirect("Loggin.aspx"); Response.Cache.SetNoStore(); } int idp = (int)Session["id"]; EDatos empresa = new EDatos(); Dofertas empresacompleta = new Dofertas(); empresa.Idempresa = Int32.Parse(Convert.ToString(Request.QueryString["valor"])); DataTable datos = empresacompleta.obtenerEmpresa(empresa); DL_datose.DataSource = datos; DL_datose.DataBind(); EEmpresas perfile = new EEmpresas(); perfile.IdEmpresa1 = Int32.Parse(Convert.ToString(Request.QueryString["valor"])); DEmpresas perfilcompletoe = new DEmpresas(); DataTable perfilge = perfilcompletoe.obtenerPuntosE(perfile); GV_puntos.DataSource = perfilge; GV_puntos.DataBind(); DataTable perfilgce = perfilcompletoe.obtenerComentariosE(perfile); GV_comentarios.DataSource = perfilgce; GV_comentarios.DataBind(); }
protected void LinkButton1_Click(object sender, EventArgs e) { Eofertas validar = new Eofertas(); Dofertas validarsoli = new Dofertas(); validar.Idprueba = (int)Session["id"]; DataTable validate = validarsoli.ValidarAgendame(validar); int idp = (int)Session["id"]; Eofertas oferta = new Eofertas(); Dofertas mensaje = new Dofertas(); if (validate.Rows.Count > 0) { LB_ErrorAgendaAsp.Text = "Ya has solicitado una cita, no puedes enviar la solicitud de nuevo"; } else { oferta.Mensaje = "Quiero agendar una cita"; oferta.Idaspirante = (int)Session["id"]; oferta.Idoferta = Int32.Parse(Convert.ToString(Request.QueryString["valor"])); oferta.Fechasolicitud = DateTime.Now; oferta.Sesion = Session.SessionID; mensaje.Mensaje(oferta); Page.Response.Write("<script language='JavaScript'>window.alert('Tu mensaje ha sido enviado, en unos dias la empresa te contactará ');</script>"); //Response.Redirect("VerOfertas.aspx"); } //Response.Redirect("OfertaIndividual.aspx"); }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { Dofertas busqueda = new Dofertas(); DataTable busquedaOferta = busqueda.BuscarOfertas(TB_BuscaOferta.Text.ToString()); if (busquedaOferta.Rows.Count > 0) { DL_Ofertas.DataSource = busquedaOferta; DL_Ofertas.DataBind(); L_ErrorBuscarOferta.Visible = false; } else { L_ErrorBuscarOferta.Visible = true; L_ErrorBuscarOferta.Text = "¡Ops! no hemos encontrado una oferta similar a '" + TB_BuscaOferta.Text + "', prueba quizá con otras palabras"; } }
protected void Page_Load(object sender, EventArgs e) { if (Session["id"] == null || Session["nombre"] == null || Session["rol"] == null || (int)Session["rol"] != 2) { Session["id"] = null; Session["nombre"] = null; Session["rol"] = null; Response.Redirect("Loggin.aspx"); Response.Cache.SetNoStore(); } Eofertas oferta = new Eofertas(); Dofertas ofertacompleta = new Dofertas(); oferta.Idoferta = Int32.Parse(Convert.ToString(Request.QueryString["valor"])); DataTable datos = ofertacompleta.obtenerOferta(oferta); DL_oferta.DataSource = datos; DL_oferta.DataBind(); }