通过传入的栏目编号找出并返回当前栏目编号及其所有子栏目编号
?/// <summary>
?????? /// 通過傳入的欄目編號找出并返回當前欄目編號及其所有子欄目編號
?????? /// </summary>
?????? /// <param name="bp_code"></param>
??????? public DataSet FindAllChildAndSelfCode(string bp_code)
??????? {
??????????? try
??????????? {
??????????????? StringBuilder strSql = new StringBuilder();
??????????????? strSql.Append("SELECT BP_CODE FROM F_T_PUB_BASICPERM WHERE ");
??????????????? strSql.Append("PARENT_ID IN (SELECT BP_CODE FROM F_T_PUB_BASICPERM WHERE ");
??????????????? strSql.Append("PARENT_ID =@BP_CODE) UNION SELECT BP_CODE FROM F_T_PUB_BASICPERM WHERE PARENT_ID =@BP_CODE");
??????????????? SqlParameterCollection OParmList = SqlHelper.GetSqlParmCollection();
??????????????? SqlHelper.AddParam("BP_CODE", SqlDbType.NVarChar, bp_code, OParmList);
??????????????? return SqlHelper.ExecuteDataSetByParm(strSql.ToString(), OParmList);
??????????? }
??????????? catch (Exception ex)
??????????? {
??????????????? throw ex;
??????????? }
??????? }
轉載于:https://www.cnblogs.com/yingpp/archive/2009/02/26/1398949.html
總結
以上是生活随笔為你收集整理的通过传入的栏目编号找出并返回当前栏目编号及其所有子栏目编号的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [转]用DateTime.ToStrin
- 下一篇: boost::trait::is_ref