yuanweisen

 

前台的父类

当然要继承基类了

 /// <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();
            }
        }

posted on 2008-12-09 18:20    阅读(120)  评论(0编辑  收藏  举报

导航