public void ProcessRequest(HttpContext context) { HttpCookie usuario = HttpContext.Current.Request.Cookies["loginInfo"]; if (usuario != null) { ContextoPDENegocio negocio = new ContextoPDENegocio(); E_USUARIO vUsuario = negocio.AutenticaUsuario(usuario.Values[1].ToString());//usuario.Values[1].ToString() if (vUsuario.FG_ACTIVO == true) { FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(TICKET_VERSION, FormsAuthentication.FormsCookieName, DateTime.Now, DateTime.Now.AddMinutes(FormsAuthentication.Timeout.TotalMinutes), false, string.Empty, FormsAuthentication.FormsCookiePath); string cookie = FormsAuthentication.Encrypt(ticket); context.Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName, cookie)); context.Session["UniqueUserId"] = Guid.NewGuid(); ContextoUsuario.oUsuario = vUsuario; context.Response.Redirect("VentanaInicioPDE.aspx"); } else { context.Response.Redirect(ConfigurationManager.AppSettings["siteSIGEIN"].ToString()); } } else { context.Response.Redirect(ConfigurationManager.AppSettings["siteSIGEIN"].ToString()); } }
protected void grdEmpleados_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { ContextoPDENegocio negocio = new ContextoPDENegocio(); List <SPE_OBTIENE_EMPLEADOS_GENERA_CONTRASENA_Result> vListaEmpleados = new List <SPE_OBTIENE_EMPLEADOS_GENERA_CONTRASENA_Result>(); vListaEmpleados = negocio.ObtenerEmpleados_Pde(); grdEmpleados.DataSource = vListaEmpleados; }