Esempio n. 1
0
 //
 private string GetSelTree(HttpContext context)
 {
     try
     {
         SysLogBll.Create("组织单位", "返回查询的组织单位树形数据", adminUser.AdminName);
         string level = string.Empty;
         try { level = Component.ReadXml("OrgCode").InnerText; }
         catch { level = "00"; }
         StringBuilder stringBuilder = new StringBuilder();
         stringBuilder.Append("[");
         dynamic model = dal.GetModel(level);
         stringBuilder.Append("{\"id\":\"" + model.OrgCode + "\", \"text\":\"" + model.OrgShortName + "\",\"children\":[" + AddNodes(model.OrgCode) + "]}");
         stringBuilder.Append(",");
         if (stringBuilder.Length > 1)
         {
             stringBuilder.Remove(stringBuilder.Length - 1, 1);
         }
         stringBuilder.Append("]");
         return(stringBuilder.ToString());
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
         return(string.Empty);
     }
 }
Esempio n. 2
0
 //
 public string GetOrgList()
 {
     try
     {
         DataTable orgList = organizationDal.GetLower(Component.ReadXml("OrgCode").InnerText);
         return(JsonHelper <Organization> .JsonDataTable(orgList, "T"));
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
         return(null);
     }
 }