IsDaylightSavingTime() public method

public IsDaylightSavingTime ( System.DateTime time ) : bool
time System.DateTime
return bool
Ejemplo n.º 1
0
	private void EST (TimeZone t1) 
	{
		// It could be EST though...
		//Assert.AreEqual("Eastern Standard Time", t1.StandardName, "B01");
		//Assert.AreEqual("Eastern Daylight Time", t1.DaylightName, "B02");

		DaylightTime d1 = t1.GetDaylightChanges (2002);
		Assert.AreEqual("04/07/2002 02:00:00", d1.Start.ToString ("G"), "B03");
		Assert.AreEqual("10/27/2002 02:00:00", d1.End.ToString ("G"), "B04");
		Assert.AreEqual(36000000000L, d1.Delta.Ticks, "B05");

		DaylightTime d2 = t1.GetDaylightChanges (1996);
		Assert.AreEqual("04/07/1996 02:00:00", d2.Start.ToString ("G"), "B06");
		Assert.AreEqual("10/27/1996 02:00:00", d2.End.ToString ("G"), "B07");
		Assert.AreEqual(36000000000L, d2.Delta.Ticks, "B08");

		DateTime d3 = new DateTime (2002,2,25);
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d3), "B09");
		DateTime d4 = new DateTime (2002,4,8);
		Assert.AreEqual(true, t1.IsDaylightSavingTime (d4), "B10");
		DateTime d5 = new DateTime (2002,11,4);
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d5), "B11");

		Assert.AreEqual(-180000000000L, t1.GetUtcOffset (d3).Ticks, "B12");
		Assert.AreEqual(-144000000000L, t1.GetUtcOffset (d4).Ticks, "B13");
		Assert.AreEqual(-180000000000L, t1.GetUtcOffset (d5).Ticks, "B14");
	}
Ejemplo n.º 2
0
	private void EST (TimeZone t1) 
	{
		Assert.IsTrue("EST" == t1.StandardName || "Eastern Standard Time" == t1.StandardName, "B01");
		Assert.IsTrue("EDT" == t1.DaylightName || "Eastern Daylight Time" == t1.DaylightName, "B02");

		DaylightTime d1 = t1.GetDaylightChanges (2002);
		Assert.AreEqual("04/07/2002 02:00:00", d1.Start.ToString ("G", CultureInfo.InvariantCulture), "B03");
		Assert.AreEqual("10/27/2002 02:00:00", d1.End.ToString ("G", CultureInfo.InvariantCulture), "B04");
		Assert.AreEqual(36000000000L, d1.Delta.Ticks, "B05");

		DaylightTime d2 = t1.GetDaylightChanges (1996);
		Assert.AreEqual("04/07/1996 02:00:00", d2.Start.ToString ("G", CultureInfo.InvariantCulture), "B06");
		Assert.AreEqual("10/27/1996 02:00:00", d2.End.ToString ("G", CultureInfo.InvariantCulture), "B07");
		Assert.AreEqual(36000000000L, d2.Delta.Ticks, "B08");

		DateTime d3 = new DateTime (2002,2,25);
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d3), "B09");
		DateTime d4 = new DateTime (2002,4,8);
		Assert.AreEqual(true, t1.IsDaylightSavingTime (d4), "B10");
		
		DateTime d5 = new DateTime (2002,11,4);
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d5), "B11");

		Assert.AreEqual(-180000000000L, t1.GetUtcOffset (d3).Ticks, "B12");
		Assert.AreEqual(-144000000000L, t1.GetUtcOffset (d4).Ticks, "B13");
		Assert.AreEqual(-180000000000L, t1.GetUtcOffset (d5).Ticks, "B14");

		// Test TimeZone methods with UTC DateTime in DST.
		DateTime d6 = d4.ToUniversalTime ();
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d6), "B15");
		Assert.AreEqual(0, t1.GetUtcOffset (d6).Ticks, "B16");
	}
Ejemplo n.º 3
0
	private void CET (TimeZone t1) 
	{
		Assert.AreEqual("CET", t1.StandardName, "A01");
		Assert.AreEqual("CEST", t1.DaylightName, "A02");
	
		DaylightTime d1 = t1.GetDaylightChanges (2002);
		Assert.AreEqual("03/31/2002 02:00:00", d1.Start.ToString ("G"), "A03");
		Assert.AreEqual("10/27/2002 03:00:00", d1.End.ToString ("G"), "A04");
		Assert.AreEqual(36000000000L, d1.Delta.Ticks, "A05");
	
		DaylightTime d2 = t1.GetDaylightChanges (1996);
		Assert.AreEqual("03/31/1996 02:00:00", d2.Start.ToString ("G"), "A06");
		Assert.AreEqual("10/27/1996 03:00:00", d2.End.ToString ("G"), "A07");
		Assert.AreEqual(36000000000L, d2.Delta.Ticks, "A08");
	
		DateTime d3 = new DateTime (2002,2,25);
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d3), "A09");
		DateTime d4 = new DateTime (2002,4,2);
		Assert.AreEqual(true, t1.IsDaylightSavingTime (d4), "A10");
		DateTime d5 = new DateTime (2002,11,4);
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d5), "A11");
	
		Assert.AreEqual(36000000000L, t1.GetUtcOffset (d3).Ticks, "A12");
		Assert.AreEqual(72000000000L, t1.GetUtcOffset (d4).Ticks, "A13");
		Assert.AreEqual(36000000000L, t1.GetUtcOffset (d5).Ticks, "A14");
	}
Ejemplo n.º 4
0
	private void CET (TimeZone t1) 
	{
		Assert.AreEqual("CET", t1.StandardName, "A01");
		Assert.AreEqual("CEST", t1.DaylightName, "A02");
	
		DaylightTime d1 = t1.GetDaylightChanges (2002);
		Assert.AreEqual("03/31/2002 02:00:00", d1.Start.ToString ("G", CultureInfo.InvariantCulture), "A03");
		Assert.AreEqual("10/27/2002 03:00:00", d1.End.ToString ("G", CultureInfo.InvariantCulture), "A04");
		Assert.AreEqual(36000000000L, d1.Delta.Ticks, "A05");
	
		DaylightTime d2 = t1.GetDaylightChanges (1996);
		Assert.AreEqual("03/31/1996 02:00:00", d2.Start.ToString ("G", CultureInfo.InvariantCulture), "A06");
		Assert.AreEqual("10/27/1996 03:00:00", d2.End.ToString ("G", CultureInfo.InvariantCulture), "A07");
		Assert.AreEqual(36000000000L, d2.Delta.Ticks, "A08");
	
		DateTime d3 = new DateTime (2002,2,25);
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d3), "A09");
		DateTime d4 = new DateTime (2002,4,2);
		Assert.AreEqual(true, t1.IsDaylightSavingTime (d4), "A10");
		DateTime d5 = new DateTime (2002,11,4);
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d5), "A11");
	
		Assert.AreEqual(36000000000L, t1.GetUtcOffset (d3).Ticks, "A12");
		Assert.AreEqual(72000000000L, t1.GetUtcOffset (d4).Ticks, "A13");
		Assert.AreEqual(36000000000L, t1.GetUtcOffset (d5).Ticks, "A14");

		// Test TimeZone methods with UTC DateTime in DST.
		DateTime d6 = d4.ToUniversalTime ();
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d6), "A15");
		Assert.AreEqual(0, t1.GetUtcOffset (d6).Ticks, "A16");
	}
Ejemplo n.º 5
0
	private void CET (TimeZone t1) 
	{
		AssertEquals("A01", "CET", t1.StandardName);
		AssertEquals("A02", "CEST", t1.DaylightName);
	
		DaylightTime d1 = t1.GetDaylightChanges (2002);
		AssertEquals("A03", "03/31/2002 01:00:00", d1.Start.ToString ("G"));
		AssertEquals("A04", "10/27/2002 01:00:00", d1.End.ToString ("G"));
		AssertEquals("A05", 36000000000L, d1.Delta.Ticks);
	
		DaylightTime d2 = t1.GetDaylightChanges (1996);
		AssertEquals("A06", "03/31/1996 01:00:00", d2.Start.ToString ("G"));
		AssertEquals("A07", "10/27/1996 01:00:00", d2.End.ToString ("G"));
		AssertEquals("A08", 36000000000L, d2.Delta.Ticks);
	
		DateTime d3 = new DateTime (2002,2,25);
		AssertEquals("A09", false, t1.IsDaylightSavingTime (d3));
		DateTime d4 = new DateTime (2002,4,2);
		AssertEquals("A10", true, t1.IsDaylightSavingTime (d4));
		DateTime d5 = new DateTime (2002,11,4);
		AssertEquals("A11", false, t1.IsDaylightSavingTime (d5));
	
		AssertEquals("A12", 36000000000L, t1.GetUtcOffset (d3).Ticks);
		AssertEquals("A13", 72000000000L, t1.GetUtcOffset (d4).Ticks);
		AssertEquals("A14", 36000000000L, t1.GetUtcOffset (d5).Ticks);
	}
Ejemplo n.º 6
0
    static int IsDaylightSavingTime(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes <System.DateTime, System.Globalization.DaylightTime>(L, 1))
            {
                System.DateTime arg0 = StackTraits <System.DateTime> .To(L, 1);

                System.Globalization.DaylightTime arg1 = (System.Globalization.DaylightTime)ToLua.ToObject(L, 2);
                bool o = System.TimeZone.IsDaylightSavingTime(arg0, arg1);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <System.TimeZone, System.DateTime>(L, 1))
            {
                System.TimeZone obj  = (System.TimeZone)ToLua.ToObject(L, 1);
                System.DateTime arg0 = StackTraits <System.DateTime> .To(L, 2);

                bool o = obj.IsDaylightSavingTime(arg0);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: System.TimeZone.IsDaylightSavingTime"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Ejemplo n.º 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            #region dtUserOffSet
            if (ghFunctions.dtUserOffSet == 0)
            {
                /// Switch this to a user determined variable
                /// Possibly in the MasterPage
                Int32           dtOffSet  = 5;
                DateTime        dtCurrent = DateTime.Now;
                System.TimeZone localZone = System.TimeZone.CurrentTimeZone;
                if (localZone.IsDaylightSavingTime(dtCurrent))
                {
                    dtOffSet = 4;
                }
                else
                {
                    dtOffSet = 5;
                }
                ghFunctions.dtUserOffSet = dtOffSet;
            }
            #endregion dtUserOffSet

            #region Site Mode
            if (tglMode == "Live")
            {
                lblMode.Text      = "Live";
                lblMode.ForeColor = System.Drawing.Color.Blue;
                lblJRE.ForeColor  = System.Drawing.Color.Blue;
            }
            else if (tglMode == "Test" || tglMode == "Stage")
            {
                lblMode.Text = "Testing";
                //lblMode.Font.Size = 24;
            }
            else if (tglMode == "Maintenance")
            {
                lblMode.Text = "Maintenance Mode";
            }
            else
            {
            }
            lblMode.Text += " - " + ghFunctions.portalVersion;
            #endregion Site Mode
        }


        Load_Call_Links();
    }
Ejemplo n.º 8
0
 static public int IsDaylightSavingTime(IntPtr l)
 {
     try {
         System.TimeZone self = (System.TimeZone)checkSelf(l);
         System.DateTime a1;
         checkValueType(l, 2, out a1);
         var ret = self.IsDaylightSavingTime(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 9
0
	private void TST (TimeZone t1) 
	{
		Assert.AreEqual("Tokyo Standard Time", t1.StandardName, "C01");
		Assert.AreEqual("Tokyo Standard Time", t1.DaylightName, "C02");

		DateTime d3 = new DateTime (2002,2,25);
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d3), "C09");
		DateTime d4 = new DateTime (2002,4,8);
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d4), "C10");
		DateTime d5 = new DateTime (2002,11,4);
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d5), "C11");

		Assert.AreEqual(324000000000L, t1.GetUtcOffset (d3).Ticks, "C12");
		Assert.AreEqual(324000000000L, t1.GetUtcOffset (d4).Ticks, "C13");
		Assert.AreEqual(324000000000L, t1.GetUtcOffset (d5).Ticks, "C14");
	}
Ejemplo n.º 10
0
	private void GMT (TimeZone t1) {
		// Probably wont work on MS.NET, but is better than nothing. Where do
		// we change our implementation to match theirs?
		
		Assert.AreEqual("GMT", t1.StandardName, "D01");
		Assert.IsTrue("BST" == t1.DaylightName || "IST" == t1.DaylightName, "D02");
	
		DaylightTime d1 = t1.GetDaylightChanges (2002);
		Assert.AreEqual("03/31/2002 01:00:00", d1.Start.ToString ("G"), "D03");
		Assert.AreEqual("10/27/2002 02:00:00", d1.End.ToString ("G"), "D04");
		Assert.AreEqual(36000000000L, d1.Delta.Ticks, "D05");
	
		DaylightTime d2 = t1.GetDaylightChanges (1996);
		Assert.AreEqual("03/31/1996 01:00:00", d2.Start.ToString ("G"), "D06");
		Assert.AreEqual("10/27/1996 02:00:00", d2.End.ToString ("G"), "D07");
		Assert.AreEqual(36000000000L, d2.Delta.Ticks, "D08");
	
		DateTime d3 = new DateTime (2002,2,25);
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d3), "D09");
		DateTime d4 = new DateTime (2002,4,2);
		Assert.AreEqual(true, t1.IsDaylightSavingTime (d4), "D10");
		DateTime d5 = new DateTime (2002,11,4);
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d5), "D11");
	
		Assert.AreEqual(0L, t1.GetUtcOffset (d3).Ticks, "D12");
		Assert.AreEqual(36000000000L, t1.GetUtcOffset (d4).Ticks, "D13");
		Assert.AreEqual(0L, t1.GetUtcOffset (d5).Ticks, "D14");
	}
Ejemplo n.º 11
0
	private void NZST(TimeZone t1) {
		Assert.AreEqual("NZST", t1.StandardName, "E01");
		Assert.AreEqual("NZDT", t1.DaylightName, "E02");

		DaylightTime d1 = t1.GetDaylightChanges (2013);
		Assert.AreEqual("09/29/2013 02:00:00", d1.Start.ToString ("G"), "E03");
		Assert.AreEqual("04/07/2013 03:00:00", d1.End.ToString ("G"), "E04");
		Assert.AreEqual(36000000000L, d1.Delta.Ticks, "E05");

		DaylightTime d2 = t1.GetDaylightChanges (2001);
		Assert.AreEqual("10/07/2001 02:00:00", d2.Start.ToString ("G"), "E06");
		Assert.AreEqual("03/18/2001 03:00:00", d2.End.ToString ("G"), "E07");
		Assert.AreEqual(36000000000L, d2.Delta.Ticks, "E08");

		DateTime d3 = new DateTime(2013,02,15);
		Assert.AreEqual(true, t1.IsDaylightSavingTime (d3), "E09");
		DateTime d4 = new DateTime(2013,04,30);
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d4), "E10");
		DateTime d5 = new DateTime(2013,11,03);
		Assert.AreEqual(true, t1.IsDaylightSavingTime (d5), "E11");

		Assert.AreEqual(36000000000L /*hour*/ * 13L, t1.GetUtcOffset (d3).Ticks, "E12");
		Assert.AreEqual(36000000000L /*hour*/ * 12L, t1.GetUtcOffset (d4).Ticks, "E13");
		Assert.AreEqual(36000000000L /*hour*/ * 13L, t1.GetUtcOffset (d5).Ticks, "E14");
	}
Ejemplo n.º 12
0
	private void NZST(TimeZone t1) {
		Assert.AreEqual("NZST", t1.StandardName, "E01");
		Assert.AreEqual("NZDT", t1.DaylightName, "E02");

		DaylightTime d1 = t1.GetDaylightChanges (2013);
		Assert.AreEqual("09/29/2013 02:00:00", d1.Start.ToString ("G", CultureInfo.InvariantCulture), "E03");
		Assert.AreEqual("04/07/2013 03:00:00", d1.End.ToString ("G", CultureInfo.InvariantCulture), "E04");
		Assert.AreEqual(36000000000L, d1.Delta.Ticks, "E05");

		DaylightTime d2 = t1.GetDaylightChanges (2001);
		Assert.AreEqual("10/07/2001 02:00:00", d2.Start.ToString ("G", CultureInfo.InvariantCulture), "E06");
		Assert.AreEqual("03/18/2001 03:00:00", d2.End.ToString ("G", CultureInfo.InvariantCulture), "E07");
		Assert.AreEqual(36000000000L, d2.Delta.Ticks, "E08");

		DateTime d3 = new DateTime(2013,02,15);
		Assert.AreEqual(true, t1.IsDaylightSavingTime (d3), "E09");
		DateTime d4 = new DateTime(2013,04,30);
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d4), "E10");
		DateTime d5 = new DateTime(2013,11,03);
		Assert.AreEqual(true, t1.IsDaylightSavingTime (d5), "E11");

		Assert.AreEqual(36000000000L /*hour*/ * 13L, t1.GetUtcOffset (d3).Ticks, "E12");
		Assert.AreEqual(36000000000L /*hour*/ * 12L, t1.GetUtcOffset (d4).Ticks, "E13");
		Assert.AreEqual(36000000000L /*hour*/ * 13L, t1.GetUtcOffset (d5).Ticks, "E14");

		// Test TimeZone methods with UTC DateTime in DST.
		DateTime d6 = d5.ToUniversalTime ();
		Assert.AreEqual(false, t1.IsDaylightSavingTime (d6), "E15");
		Assert.AreEqual(0, t1.GetUtcOffset (d6).Ticks, "E16");
	}
Ejemplo n.º 13
0
 /// <summary>Returns a value indicating whether the specified date and time is within a daylight saving time period.</summary>
 /// <param name="time">A date and time. </param>
 /// <returns>
 ///     <see langword="true" /> if <paramref name="time" /> is in a daylight saving time period; otherwise, <see langword="false" />.</returns>
 // Token: 0x0600138E RID: 5006 RVA: 0x00039016 File Offset: 0x00037216
 public virtual bool IsDaylightSavingTime(DateTime time)
 {
     return(TimeZone.IsDaylightSavingTime(time, this.GetDaylightChanges(time.Year)));
 }
 public static Boolean IsDaylightSavingTime(this DateTime time, DaylightTime daylightTimes)
 {
     return(TimeZone.IsDaylightSavingTime(time, daylightTimes));
 }
Ejemplo n.º 15
0
	private void TST (TimeZone t1) 
	{
		AssertEquals("C01", "Tokyo Standard Time", t1.StandardName);
		AssertEquals("C02", "Tokyo Standard Time", t1.DaylightName);

		DateTime d3 = new DateTime (2002,2,25);
		AssertEquals("C09", false, t1.IsDaylightSavingTime (d3));
		DateTime d4 = new DateTime (2002,4,8);
		AssertEquals("C10", false, t1.IsDaylightSavingTime (d4));
		DateTime d5 = new DateTime (2002,11,4);
		AssertEquals("C11", false, t1.IsDaylightSavingTime (d5));

		AssertEquals("C12", 324000000000L, t1.GetUtcOffset (d3).Ticks);
		AssertEquals("C13", 324000000000L, t1.GetUtcOffset (d4).Ticks);
		AssertEquals("C14", 324000000000L, t1.GetUtcOffset (d5).Ticks);
	}
Ejemplo n.º 16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SecureCheck();
        if (Session["userstatus"] == null)
        {
            Response.Redirect("logout.aspx", false);
        }
        if (Session["userid"] == null || Session["UserFullName"] == null)
        {
            identity_get_user();
        }
        if (Session["UserFullName"] != null)
        {
            UserFullName.Text = Session["UserFullName"].ToString();
        }
        else
        {
            UserFullName.Text = "n/a";
        }
        ghFunctions.portalVersion = System.Configuration.ConfigurationManager.AppSettings["portal_version"];
        #region dtUserOffSet
        if (ghFunctions.dtUserOffSet == 0)
        {
            /// Switch this to a user determined variable
            /// Possibly in the MasterPage
            Int32           dtOffSet  = 5;
            DateTime        dtCurrent = DateTime.Now;
            System.TimeZone localZone = System.TimeZone.CurrentTimeZone;
            if (localZone.IsDaylightSavingTime(dtCurrent))
            {
                dtOffSet = 4;
            }
            else
            {
                dtOffSet = 5;
            }
            ghFunctions.dtUserOffSet = dtOffSet;
        }
        #endregion dtUserOffSet
        #region ARC Color
        lblMasterHeader.Text = "Portal - ARC";
        masterColor          = "#EEEEEE";
        if (System.Configuration.ConfigurationManager.AppSettings["DBMode"] == "Stage")
        {
            lblMasterHeader.Text = "Stage - Portal - ARC";
            masterColor          = "orange";
        }
        #endregion ARC Color
        if (!IsPostBack)
        {
            //Literal1.Text = Page.User.Identity.IsAuthenticated.ToString();
            //Literal2.Text = Page.User.Identity.Name;
            #region Perform certain action if user is authenticated
            if (Page.User.Identity.IsAuthenticated)
            {
                Literal3.Text = "";
                #region Load the Menu
                //Menue_Load();
                PopulateMenu(this.Page.User.Identity.Name);
                #endregion Load the Menu
                #region If User is a Sys Admin we add more menu options
                #endregion If User is a Sys Admin we add more menu options
                if (Page.User.IsInRole("System Administrator") == true)
                {
                    Literal3.Text      += "System Administrator<br />";
                    Session["UserRole"] = "System Administrator";
                    Panel1.Visible      = true;
                }
                if (Page.User.IsInRole("Administrator") == true)
                {
                    Literal3.Text      += "Administrator<br />";
                    Session["UserRole"] = "Administrator";
                }
                if (Page.User.IsInRole("Manager") == true)
                {
                    Literal3.Text      += "Manager<br />";
                    Session["UserRole"] = "Manager";
                }
                if (Page.User.IsInRole("Advisor") == true)
                {
                    Literal3.Text      += "Advisor<br />";
                    Session["UserRole"] = "Advisor";
                }
                if (Page.User.IsInRole("Agent") == true)
                {
                    Literal3.Text      += "Agent<br />";
                    Session["UserRole"] = "Agent";
                }
                if (Page.User.IsInRole("Client") == true)
                {
                    Literal3.Text      += "Client";
                    Session["UserRole"] = "Client";
                    if (Page.User.IsInRole("Capella") == true)
                    {
                        Literal3.Text        += " | Capella";
                        Session["UserClient"] = "Capella";
                    }
                    else if (Page.User.IsInRole("Troy") == true)
                    {
                        Literal3.Text        += " | Troy";
                        Session["UserClient"] = "Troy";
                    }
                    else if (Page.User.IsInRole("Strayer") == true)
                    {
                        Literal3.Text        += " | Strayer";
                        Session["UserClient"] = "Strayer";
                    }
                    else if (Page.User.IsInRole("Full Sail") == true)
                    {
                        Literal3.Text        += " | Full Sail";
                        Session["UserClient"] = "Full Sail";
                    }
                    Literal3.Text += "<br />";
                }
                DBMode.Text = Connection.GetDBMode();
                if (DBMode.Text == "Stage")
                {
                    DBMode.ForeColor = System.Drawing.Color.Red;
                }
                else
                {
                    DBMode.ForeColor = System.Drawing.Color.Green;
                }
                DBMode.Text += "|" + Connection.GetConnectionType();
            }
            #endregion Perform certain action if user is authenticated
            //Simple Menu
            //G:\Documents and Settings\All Users\Desktop\Admin\Software\Web\dotNet\CSSFriendly_Adapter_1.0\CSSFriendly_1.0\Web\WalkThru
            //MenuLoad();
            //PopulateMenu(DeBug_Footer, Menu1, mi);

            // The header bar that labels the menu
            MessageLabel.Text = String.Format("Page: {0} - {1}"
                                              , MyTitle
                                              , PageTitle
                                              );
            // Highlight Active Menu..?
            lblTitleHeader.Text = " - " + PageTitle;
            Menu_Selected_Check(Menu1, PageTitle);
            /// This will verify that the user has access to the page
            /// This is done by checking that the page is in the Menu
            /// Change this so it's done through a query: is user allowed to see page
            /// This way we do not need to have the item in the menu section in order for the user to see it
            if (!verify_access() && Page.User.IsInRole("System Administrator") == false)
            {
                // Response.Redirect("access.aspx");
                Response.Redirect("~/access.aspx?p=" + PageTitle, true);
                // Server.Transfer("~/access.aspx", false); // This crashes
            }
            string currentPage = new System.IO.FileInfo(HttpContext.Current.Request.Url.LocalPath).Name;
            if (!(currentPage.ToLower().Contains("user_profile.aspx")) && Session["userstatus"] != null && Session["userstatus"].ToString() == "5")
            {
                Response.Redirect("user_profile.aspx", false);
                Context.ApplicationInstance.CompleteRequest();
            }
        }
    }