/// <summary> /// 获取权限 /// </summary> public void GetPowerTree() { int iID = 0; string strUserID = ""; if (object.Equals(null, Request.Form["id"])) { Response.Write("{success:false}"); return; } else if (object.Equals(null, Request.Form["userid"])) { Response.Write("{success:false}"); return; } else { try { string strID = Request.Form["id"].ToString(); iID = Int32.Parse(strID); strUserID = Request.Form["userid"].ToString(); } catch { Response.Write("{success:false}"); return; } } SmsServer.BLL.TreeNode node = new SmsServer.BLL.TreeNode(); string strJson = node.GetTreeNodeEx(strUserID, iID); strJson = strJson.Replace("\"leaf\":1", "\"leaf\":true"); strJson = strJson.Replace("\"leaf\":0", "\"leaf\":false"); strJson = strJson.Replace("\"checked\":1", "\"checked\":true"); strJson = strJson.Replace("\"checked\":0", "\"checked\":false"); Response.Write(strJson); }
/// <summary> /// ��ȡȨ�� /// </summary> public void GetPowerTree() { int iID = 0; string strUserID = ""; if (object.Equals(null, Request.Form["id"])) { Response.Write("{success:false}"); return; } else if (object.Equals(null, Request.Form["userid"])) { Response.Write("{success:false}"); return; } else { try { string strID = Request.Form["id"].ToString(); iID = Int32.Parse(strID); strUserID = Request.Form["userid"].ToString(); } catch { Response.Write("{success:false}"); return; } } SmsServer.BLL.TreeNode node = new SmsServer.BLL.TreeNode(); string strJson = node.GetTreeNodeEx(strUserID, iID); strJson = strJson.Replace("\"leaf\":1", "\"leaf\":true"); strJson = strJson.Replace("\"leaf\":0", "\"leaf\":false"); strJson = strJson.Replace("\"checked\":1", "\"checked\":true"); strJson = strJson.Replace("\"checked\":0", "\"checked\":false"); Response.Write(strJson); }