//自定义权限判断 public bool f_QuanXian(string aa, string UserName) { HY_BLL.HY_setbll hyset = new HY_BLL.HY_setbll(); string sql = "select h_UserName,h_Security from HY_user where h_UserName='******'"; DataTable dt = hyset.userSecurity(sql); if (dt.Rows.Count > 0) { string s; string cc = dt.Rows[0][1].ToString(); string[] sArray = cc.Split(','); foreach (string i in sArray) { s = i.ToString(); if (s == aa) { return true; } } } return false; }
//自定义权限判断 public bool f_QuanXian(string aa, string UserName) { HY_BLL.HY_setbll hyset = new HY_BLL.HY_setbll(); string sql = "select h_UserName,h_Security from HY_user where h_UserName='******'"; DataTable dt = hyset.userSecurity(sql); if (dt.Rows.Count > 0) { string s; string cc = dt.Rows[0][1].ToString(); string[] sArray = cc.Split(','); foreach (string i in sArray) { s = i.ToString(); if (s == aa) { return(true); } } } return(false); }