// ------------------------------------------------------- // 查询 // ------------------------------------------------------- #region 函数:FindAllByEntityId(XmlDocument doc) /// <summary>获取列表信息</summary> /// <param name="doc">Xml 文档对象</param> /// <returns>返回操作结果</returns> public string FindAllByEntityId(XmlDocument doc) { StringBuilder outString = new StringBuilder(); string customTableName = XmlHelper.Fetch("customTableName", doc); string entityId = XmlHelper.Fetch("entityId", doc); string entityClassName = XmlHelper.Fetch("entityClassName", doc); DataResultMapper mapper = DataResultMapper.CreateMapper(doc.DocumentElement); IList <IEntityClickInfo> list = null; if (mapper.Count == 0) { list = this.service.FindAllByEntityId(customTableName, entityId, entityClassName); } else { list = this.service.FindAllByEntityId(customTableName, entityId, entityClassName, mapper); } outString.Append("{\"data\":" + AjaxUtil.Parse <IEntityClickInfo>(list) + ","); outString.Append("\"message\":{\"returnCode\":0,\"value\":\"查询成功.\"}}"); return(outString.ToString()); }
// ------------------------------------------------------- // 查询 // ------------------------------------------------------- #region 函数:FindAllByDocToken(XmlDocument doc) /// <summary>获取列表信息</summary> /// <param name="doc">Xml 文档对象</param> /// <returns>返回操作结果</returns> public string FindAllByDocToken(XmlDocument doc) { StringBuilder outString = new StringBuilder(); string customTableName = XmlHelper.Fetch("customTableName", doc); string docToken = XmlHelper.Fetch("docToken", doc); DataResultMapper mapper = DataResultMapper.CreateMapper(doc.DocumentElement); IList <IEntityDocObjectInfo> list = null; if (mapper.Count == 0) { list = this.service.FindAllByDocToken(customTableName, docToken); } else { list = this.service.FindAllByDocToken(customTableName, docToken, mapper); } outString.Append("{\"data\":" + AjaxUtil.Parse <IEntityDocObjectInfo>(list) + ","); outString.Append(MessageObject.Stringify("0", I18n.Strings["msg_query_success"], true) + "}"); return(outString.ToString()); }