using Utilities;

 

namespace StateManagement

{

    public class Global : System.Web.HttpApplication

    {

 

        // Fires when the application is started

        protected void Application_Start(object sender, EventArgs e)

        {

            Application["VoteCount"] = 0;

            Application["Christopher M. Pascucci"] = 0;

            Application["George Clooney"] = 0;

            Application["Matt Damon"] = 0;

            Application["Denzel Washington"] = 0;

        }

 

        // Fires when the session is started

        protected void Session_Start(object sender, EventArgs e)

        {

            DBConnect objDB = new DBConnect();

            String strSQL = "SELECT * FROM Product";

            Session["DS"] = objDB.GetDataSet(strSQL);

        }

 

        // Fires at the beginning of each request

        protected void Application_BeginRequest(object sender, EventArgs e)

        {

 

        }

 

        // Fires upon attempting to authenticate the user

        protected void Application_AuthenticateRequest(object sender, EventArgs e)

        {

 

        }

 

        // Fires when an error occurs

        protected void Application_Error(object sender, EventArgs e)

        {

 

        }

 

        // Fires when the session ends

        protected void Session_End(object sender, EventArgs e)

        {

            Session["DS"] = null;

        }

 

        // Fires when the application ends

        protected void Application_End(object sender, EventArgs e)

        {

 

        }

    }

}