Exemplo n.º 1
0
 public static int CheckLogin(string username,string pwd)
 {
     UserInfoDAL info = new UserInfoDAL();
        User user ;
        user = info.Check(username,pwd);//获取用户数据
        if (user!=null)
        {
        //a教职工,b管理员
        string usertype = user.type;
        if(usertype.Equals("a")){
            return 0;
        }
        else{
            return 1;
        }
        }
        else
        {
        return -1;
        }
 }
Exemplo n.º 2
0
 public User Check(string username, string password)
 {
     UserInfoDAL user = new UserInfoDAL();
       return user.GetUserInfo(username, password);
 }
Exemplo n.º 3
0
        public User Check(string username, string password)
        {
            UserInfoDAL user = new UserInfoDAL();

            return(user.GetUserInfo(username, password));
        }