public static string GetGroupTopParent3(string user_Dept)
{
Forms_AjaxFunctions f = new Forms_AjaxFunctions();
string sql = "select Group_ID,Group_ParentID from SYS_BPS_GROUPS where Group_Name = '" + user_Dept + "'";
DataTable dt = DbHelperSQL.Query(sql).Tables[0];
string aa = f.GetGroupCode(Convert.ToString(dt.Rows[0]["Group_ParentID"]).Trim(), Convert.ToString(dt.Rows[0]["Group_ID"]).Trim());
return aa;
}
public string GetGroupCode(string parentID, string groupCode)
{
DataTable dt = new DataTable();
DataTable dtReturn = new DataTable();
if (!string.IsNullOrEmpty(parentID))
{
if (Convert.ToInt32(parentID)!=0)
{
string sqlP = "select Group_ID,Group_ParentID from SYS_BPS_GROUPS where Group_ID = " + parentID + "";
dt = DbHelperSQL.Query(sqlP).Tables[0];
GetGroupCode(Convert.ToString(dt.Rows[0]["Group_ParentID"]).Trim(), Convert.ToString(dt.Rows[0]["Group_ID"]).Trim());
}
}
return groupCode;
}
为什么 parentID=0时 return groupCode 完了 还会继续走GetGroupCode(xx,xx)? 求解
前面的还没有走完吧,你看的是断点?