Beispiel #1
0
 /// <summary>
 /// 判断用户是否登陆
 /// </summary>
 /// <returns></returns>
 public bool IsMemberLogin()
 {
     if (Session["Memberlogin"] != null)
     {
         return(true);
     }
     else
     {
         //检查Cookies
         string membername = Utils.GetCookie("membername", "JinBo");
         string memberpwd  = Utils.GetCookie("memberpwd", "JinBo");
         if (membername != "" && memberpwd != "")
         {
             BLL.member   bll   = new BLL.member();
             Model.member model = bll.CheckModle(membername, memberpwd);
             set = new BLL.member_setting().GetModelByMid(model.id);
             if (model != null)
             {
                 Session["Memberlogin"] = model;
                 return(true);
             }
             else
             {
                 return(false);
             }
         }
         else
         {
             return(false);
         }
     }
 }