Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Security;
- using System.Web.SessionState;
- namespace Lab2
- {
- public class Global : System.Web.HttpApplication
- {
- UserDataContext udc = new UserDataContext();
- protected void Application_Start(object sender, EventArgs e)
- {
- foreach (User u in udc.Users)
- {
- u.Aktywny = false;
- u.ileAplikacji = 0;
- }
- udc.SubmitChanges();
- }
- protected void Session_Start(object sender, EventArgs e)
- {
- Session.Timeout = 1;
- }
- protected void Application_BeginRequest(object sender, EventArgs e)
- {
- }
- protected void Application_AuthenticateRequest(object sender, EventArgs e)
- {
- }
- protected void Application_Error(object sender, EventArgs e)
- {
- }
- protected void Session_End(object sender, EventArgs e)
- {
- foreach (User u in udc.Users)
- {
- if (u.idSesji == this.Session.SessionID.ToString())
- {
- u.Aktywny = false;
- }
- }
- udc.SubmitChanges();
- }
- protected void Application_End(object sender, EventArgs e)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement