public static int getUserID() { //做好登录模块之后把“admin”换成对应的session就行 string userName = "******"; STBC.BLL.ST_USERS usersB = new STBC.BLL.ST_USERS(); DataSet ds1 = usersB.GetList("USERNAME='******'"); DataTable dt1 = ds1.Tables[0]; //获得用户的id int userID = int.Parse(dt1.Rows[0]["USERID"].ToString()); return userID; }
public static int getUserID() { //做好登录模块之后把“admin”换成对应的session就行 string userName = "******"; STBC.BLL.ST_USERS usersB = new STBC.BLL.ST_USERS(); DataSet ds1 = usersB.GetList("USERNAME='******'"); DataTable dt1 = ds1.Tables[0]; //获得用户的id int userID = int.Parse(dt1.Rows[0]["USERID"].ToString()); return(userID); }