private void GePerTree(HttpContext context, string btn) { if (btn != "show") { context.Response.Write("[]"); return; } try { string treeJsonStr = "[]"; BLL.System.sys_Person bll = new BLL.System.sys_Person(); DataTable dt = bll.GetDepPersonList().Tables[0]; if (dt != null && dt.Rows.Count > 0) { treeJsonStr = DtToTreeJson(dt, "ID", "Name", "SupId", "SortId", "B0", "B0"); } context.Response.Write(treeJsonStr); } catch { context.Response.Write("[]"); } }