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; } }
public User Check(string username, string password) { UserInfoDAL user = new UserInfoDAL(); return user.GetUserInfo(username, password); }
public User Check(string username, string password) { UserInfoDAL user = new UserInfoDAL(); return(user.GetUserInfo(username, password)); }