public ActionXmlSet Read() { ScriptObject script = ServerApiInvoker.Get_Script(scriptId); ActionXmlSet xmlset = new ActionXmlSet() { XmlAction = script.Script, SchemaSet = new ActionSchemaSet() }; Schema schema = null; if (Convert.ToInt32(schemaId) > 0) { schema = ServerApiInvoker.GetSchema(schemaId); } SchemaObject sco = null; if (Convert.ToInt32(schemaObjectId) > 0) { sco = ServerApiInvoker.GetSchemaObject(schemaObjectId); } if (schema != null) { xmlset.SchemaSet = new ActionSchemaSet(schema.DisplayName, schema.JsonObject, sco.JsonValue); } return(xmlset); }
private ActionXmlSet CreateActionXmlSet(ScriptObject scriptObject) { var actionXmlSet = new Core.Models.ActionXmlSet() { Key = scriptObject.WebSiteId, Name = scriptObject.Title, XmlAction = scriptObject.Script, StartUrl = scriptObject.BeginUrl }; if (!string.IsNullOrEmpty(scriptObject.ModelId) && scriptObject.ModelId != "0") { Schema schema = ServerApiInvoker.GetSchema(scriptObject.ModelId); if (schema == null) { throw new ApplicationException("对应数据表单不存在,请重新配置表单模型"); } actionXmlSet.SchemaSet = new ActionSchemaSet(schema.DisplayName, schema.JsonObject); } return(actionXmlSet); }