コード例 #1
0
ファイル: QuanXian.cs プロジェクト: elanyang/ll-furniture
 //自定义权限判断
 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;
 }
コード例 #2
0
        //自定义权限判断
        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);
        }