public static List <TreeNode> getWboPropertyNodes(string comId) { List <TreeNode> ret = new List <TreeNode>(); WboSchema wboSchema = WboSchemaContainer.Instance().GetItem(comId); foreach (Schema propSchema in wboSchema.Properties) { TreeNode node = new TreeNode(); node.text = string.IsNullOrEmpty(propSchema.Title) ? propSchema.Id : propSchema.Title; node.id = comId + Umc.MemberSpliter + propSchema.Id; ret.Add(node); } return(ret); }
public static List <TreeNode> getWboMethodNodes(string comId) { List <TreeNode> ret = new List <TreeNode>(); WboSchema wboSchema = WboSchemaContainer.Instance().GetItem(comId); foreach (WboMethodSchema wms in wboSchema.Methods) { TreeNode node = new TreeNode(); node.text = string.IsNullOrEmpty(wms.Title) ? wms.Id : wms.Title; node.id = comId + Umc.MemberSpliter + wms.Id; ret.Add(node); } return(ret); }
public static Dictionary <string, string> getWboIds() { Dictionary <string, string> ret = new Dictionary <string, string>(); string[] xmls = WboSchemaContainer.Instance().GetIDsByFolder(""); foreach (string id in xmls) { WboSchema ws = getWboSchema(id); if (ws.IsPublish) { ret.Add(id, ws.Title); } } return(ret); }
public static List <TextValue> getWboTextValues() { List <TextValue> ret = new List <TextValue>(); string[] xmls = WboSchemaContainer.Instance().GetIDsByFolder(""); foreach (string id in xmls) { WboSchema ws = getWboSchema(id); if (ws.IsPublish) { ret.Add(new TextValue() { text = ws.Title, value = id }); } } return(ret); }
public static void saveWboSchema(WboSchema wboSchema) { if (wboSchema == null) { return; } WboProxy wp = WboProxyFactory.getWboProxy(wboSchema); if (wp.getWboType().IsSubclassOf(typeof(ISessionWbo))) { wboSchema.LifeCycle = LifeCycle.Session; } if (WboSchemaContainer.Instance().Contains(wboSchema.Id)) { WboSchemaContainer.Instance().UpdateItem(wboSchema.Id, wboSchema); } }
public static List <Wbo> GetVboTypes() { List <Wbo> ret = new List <Wbo>(); string[] ids = WboSchemaContainer.Instance().GetSchemaIds(); for (int i = 0; i < ids.Length; i++) { string id = ids[i]; WboSchema os = WboSchemaContainer.Instance().GetItem(id); if (os.IsPublish && os.IsVisual) { Wbo objSum = new Wbo(); objSum.name = os.Id; objSum.title = os.Title; objSum.description = os.Description; ret.Add(objSum); } } return(ret); }
public static List <TreeNode> getWboNodes() { List <TreeNode> treeNodes = new List <TreeNode>(); string[] xmls = WboSchemaContainer.Instance().GetIDsByFolder(""); int nid = 0; foreach (string name in xmls) { WboSchema ws = getWboSchema(name); TreeNode tn = new TreeNode(); tn.id = nid + ""; nid++; tn.label = ws.Title; tn.name = name; tn.text = ws.Title; tn.url = ""; treeNodes.Add(tn); } return(treeNodes); }
public static WboSchema getWboSchema(string id) { return(WboSchemaContainer.Instance().GetItem(id)); }