|
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace Swat
{
public enum ScrollMode
{
UpdateInPlace,
UpdateNextPage,
UpdatePrevPage
}
/// <summary>
/// Summary description for SwatMain.
/// </summary>
public class SwatMain : System.Web.UI.Page
{
public string MainFramePage;
private void Page_Load(object sender, System.EventArgs e)
{
//This is only necessary the first time through when the DB is empty
//otherwise everybody goes to the bug editing page, for now.
int nRole = System.Convert.ToInt16(Request.Cookies["Roles"].Value);
if (nRole == (int)AccessPrivilege.Administrator)
MainFramePage = "SwatAdmin.aspx";
else
{
if (nRole == (int)AccessPrivilege.Manager)
MainFramePage = "SwatAnalyze.aspx";
else
{
if (nRole == 0)
Response.Redirect("SwatLogon.aspx",true);
else
{
//At some point we'll probably allow the user to
//define his/her start page and go directly there.
//For now everybody goes to bugs
MainFramePage = "SwatBugs.aspx";
}
}
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.