using System.Web.SessionState;
public class PageBase : System.Web.UI.Page
{
/// <summary>
/// 登陆检查
/// </summary>
protected override void OnLoad(EventArgs e)
{
if (Session["eCase_sEmployeeName"] == null)
{
Response.Redirect("login.aspx");
}
base.OnLoad(e);
}
/// <summary>
/// 消息弹出
/// </summary>
/// <param name="strMessage"></param>
/// <param name="type">1弹出消息,2弹出消息关闭当前窗口,3弹出消息关闭当前窗口刷新父窗口</param>
public void MsgShow(string strMessage,int type)
{
switch (type)
{
case 1:
Response.Write("<script>alert('" + strMessage + "');</script>");
break;
case 2:
Response.Write("<script>alert('" + strMessage + "');window.close();</script>");
break;
case 3:
Response.Write("<script>alert('" + strMessage + "');window.opener.location.href = window.opener.location.href;if (window.opener.progressWindow)window.opener.progressWindow.close();window.close();</script>");
break;
}
}
}
public class PageBase : System.Web.UI.Page
{
/// <summary>
/// 登陆检查
/// </summary>
protected override void OnLoad(EventArgs e)
{
if (Session["eCase_sEmployeeName"] == null)
{
Response.Redirect("login.aspx");
}
base.OnLoad(e);
}
/// <summary>
/// 消息弹出
/// </summary>
/// <param name="strMessage"></param>
/// <param name="type">1弹出消息,2弹出消息关闭当前窗口,3弹出消息关闭当前窗口刷新父窗口</param>
public void MsgShow(string strMessage,int type)
{
switch (type)
{
case 1:
Response.Write("<script>alert('" + strMessage + "');</script>");
break;
case 2:
Response.Write("<script>alert('" + strMessage + "');window.close();</script>");
break;
case 3:
Response.Write("<script>alert('" + strMessage + "');window.opener.location.href = window.opener.location.href;if (window.opener.progressWindow)window.opener.progressWindow.close();window.close();</script>");
break;
}
}
}