id |
text |
False |
pid |
2 |
?û? |
True |
0 |
< td>3
???? |
True |
1 |
4 |
< td>?????
False |
2 |
5 |
????? 2 |
False |
3 |
NULL |
NULL |
NULL td>
| NULL |
public ActionResult Index(
{
CRMEntities db = new CRMEntities();
EasyUIJsonTree root = new EasyUIJsonTree()
Menu
Menu
“Root” menu Trees> list = db.Trees.ToList();
if (list != null && list.Count> 0)
{
b.GetTree(root, list);
> Return Json(root, JsonRequestBe havior.AllowGet);
//return JsonResult(new {root });
// Response.Write(JsonConvert.SerializeObject(new EasyUIJsonTree[] {root }));
}
public class b
{
public static void GetTree(EasyUIJsonTree parent, IList list, int? parentID = 0) {parent {parentren = list.Where(m => m.pid == parentID); if (query.Any()) {parent (parent) if new List ();} foreach (Trees mv in query) {EasyUIJsonTree child = new EasyUIJsonTree () {id = mv.id.ToString (), text = mv.text, // attributes = new {Url = mv .Url} GetTree(child, list, mv.id); parent.children.Add(child); b.GetTree(child, list, mv.id); .Url }}}}}}}}}}}}}}}}}}}}}}}}}}}}}} ”Public class EasyUIJsonTree” Public string id {get; set;}} Public string id {get; set;}} Public string text {get; set;} public string text {get; set;} public string text {get; set;} public string text {get; set;} get; set children< y public string iconCls {get; set} //public string iconCls {get; set} object attributes {get; set;} }
WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3052 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC