前台的父类
当然要继承基类了
/// <summary>
/// 当前用户
/// </summary>
public Patient CurrentPatient
{
get
{
if (Session["CurrentPatient"] == null)
return null;
return (Patient)Session["CurrentPatient"];
}
set { Session["CurrentPatient"] = value; }
}
/// <summary>
/// 判断用户是否登陆
/// </summary>
protected void CheckLogin()
{
if (CurrentPatient == null)
{
Response.Write("<script>alert('未登陆或登陆超时!');top.location='/Default.aspx'</script>");
Response.End();
}
}