Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         string item = base.Request.QueryString["SessionId"];
         if (string.IsNullOrEmpty(item))
         {
             item = this.Session["SessionId"] as string;
         }
         if (!string.IsNullOrEmpty(item))
         {
             SessionAfiliado sessionAfiliado = HelperSession.SA_GetSession(item);
             if (sessionAfiliado.SES_CodStatus.Equals("D"))
             {
                 sessionAfiliado.SES_CodStatus = "I";
                 HelperSession.SA_UpdateSession(sessionAfiliado);
             }
         }
     }
 }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.liFecha.Text = DateTime.Now.ToString("dd/MM/yyyy hh:mm");
            string item = this.Session["SessionID"] as string;

            if (!string.IsNullOrEmpty(item))
            {
                SessionAfiliado now = HelperSession.SA_GetSession(item);
                if (now != null)
                {
                    now.TiempoFin     = DateTime.Now;
                    now.SES_CodStatus = "I";
                    HelperSession.SA_UpdateSession(now);
                }
            }
            else
            {
                base.Response.Redirect("~/Login.aspx");
            }
            this.Session.Abandon();
        }