private string RenderFunctionsInGroupToHtmlTreeView(List <FunctionInfo> lstFunctionInfos, int parentFunctionId) { var htmlTreeView = string.Empty; var lstChildrenFunctionsInFirstSeq = FunctionBL.GetChildrenFunctions(lstFunctionInfos, parentFunctionId); foreach (var function in lstChildrenFunctionsInFirstSeq) { var lstChildrenFunctionsInSecondSeq = this._lstFullFunctionInGroup.Where(t => t.ParentId.Equals(function.Id)).ToList(); var checkFunctionAddedToGroup = Null.NullString; if (function.IsFunctionAddedToGroup()) { checkFunctionAddedToGroup = "checked"; } if (lstChildrenFunctionsInSecondSeq.Count == 0) { htmlTreeView += "<li class='sub-li-funtions'>"; htmlTreeView += "<span class='dotted-letter'>-----</span>"; htmlTreeView += "<input type='checkbox' " + checkFunctionAddedToGroup + " data-typefunction='TRUE' data-functionid='" + function.Id + "' onclick='checkInCurrentFunction(this);' /> "; htmlTreeView += "<span onclick='checkFollowCurrentFunction(this);'>" + function.FunctionName + "</span>"; htmlTreeView += "</li>"; } else { htmlTreeView += "<ul class='ul-functions'>"; htmlTreeView += "<li>"; htmlTreeView += "<input type='checkbox' " + checkFunctionAddedToGroup + " data-typefunction='TRUE' data-functionid='" + function.Id + "' onclick='checkInCurrentFunction(this);' />"; htmlTreeView += "<span class='name-fn-mns' onclick='checkFollowCurrentFunction(this);'>" + function.FunctionName + "</span>"; htmlTreeView += this.RenderFunctionsInGroupToHtmlTreeView(lstChildrenFunctionsInSecondSeq, function.Id); htmlTreeView += "</li>"; htmlTreeView += "</ul>"; } } return(htmlTreeView); }
public string GetHtmlTreeViewFunctionsInGroup(int groupId) { this._lstFullFunctionInGroup = this.GetAllFunctionsByGroup(groupId); this._lstRootFunctionInGroup = FunctionBL.GetRootFunctions(this._lstFullFunctionInGroup); return(this.RenderAllFunctionBindMenu()); }