///<summary> /// 从数据库中得到RoleName ///</summary> /// <param name="LoginName"></param> /// <returns></returns> public string GetLoginUserRoleName(string LoginName) { string roleName = ""; DataTable dt = dal.GetInfoList("LoginInfoTab", "RoleName", "LoginID", 1, 1, 0, 1, "LoginName='" + LoginName + "'"); if (dt != null && dt.Rows.Count > 0) { roleName = dt.Rows[0]["roleName"].ToString().Trim(); } return(roleName); }