Esempio n. 1
0
        public bool Login(string loginName, string loginPassWord,User user)
        {
            user = this.Get(loginName, loginPassWord);
            if (user == null)
            {
                return false;
            }

            return true;
        }
Esempio n. 2
0
        public bool UserLogin(string qq, string passWord)
        {
            User user = new User();
            bool success = userAct.Login(qq, passWord, user);
            if (success)
            {
                HttpContext.Current.Session[QQ] = qq;
                HttpContext.Current.Session[SPASWORD] = passWord;
                //  HttpContext .Current .Session [SUSERID ]=user.Id ;
                // HttpContext.Current.Session[SUSERNAME] = user.UserName;
            //    HttpContext.Current.Session[SROLEID] = user.RoleId;

            }
            else
            {

            }
            return success;
        }
Esempio n. 3
0
        public void Edit(User user)
        {
            string str = "update T_User set [Password]='" + user.LoginPassWord + "',[Jifen]=" + user.Jifen + ",[CanLogin]=" + user.CanLogin + ",[Shouyi]=" + user.Shouyi + ",[Limit]="+user.Limit+" where [QQ]='" + user.QQ + "'";

            _DBbase.ExecuteCommand(str);
        }
Esempio n. 4
0
 private User GetEntity(DataRow dr)
 {
     User user = new User();
      //   user.Id = Convert.ToInt32(dr["Id"]);
     user.QQ  = dr["QQ"].ToString();
       //  user.LoginName = dr["LoginName"].ToString();
     user.LoginPassWord = dr["Password"].ToString();
     user.TuijianrenQQ = dr["TuijianrenQQ"].ToString();
     //    user.RoleId = Convert.ToInt32(dr["RoleId"]);
      //   user.BoolUse = Convert.ToBoolean(dr["BoolUse"]);
     user.Jifen = (int)dr["Jifen"];
     user.CreatedAt =(DateTime )dr["CreatedAt"];
     user.Limit =(int)dr["Limit"];
     user.CanLogin = (bool)dr["CanLogin"];
     user.Shouyi = (int)dr["Shouyi"];
     user.Mac =dr["Mac"].ToString ();
     return user;
 }