예제 #1
0
파일: DALRight.cs 프로젝트: Pefore/HR
        /// <summary>
        ///  查询当前角色对应权限
        /// </summary>
        /// <param name="rid"></param>
        /// <param name="pid"></param>
        /// <returns></returns>
        public DataTable selectQX(string rid, string pid)
        {
            string sql = string.Format("select[id],[text],[state], rp.PopID,case when rp.PopID is not null then 1 else 0 end as checked from [dbo].[Pop] p left join (select PopID from GuanliPop where GuanliID = {0}) rp on p.id = rp.PopID where p.PID = {1}", rid, pid);

            return(SqlDBHelper.table(sql));
        }