public void RunGrid(CswNbtAPIGrid Return, int ViewIdInt) { try { CswNbtViewId ViewId = new CswNbtViewId(ViewIdInt); CswNbtView View = _CswNbtResources.ViewSelect.restoreView(ViewId); if (null != View) { ICswNbtTree results = _CswNbtResources.Trees.getTreeFromView(View, true, false, false); for (int i = 0; i < results.getChildNodeCount(); i++) { results.goToNthChild(i); CswNbtNodeKey NodeKey = results.getNodeKeyForCurrentPosition(); string Name = results.getNodeNameForCurrentPosition(); CswNbtMetaDataNodeType nt = _CswNbtResources.MetaData.getNodeType(NodeKey.NodeTypeId); CswNbtMetaDataObjectClass oc = nt.getObjectClass(); CswNbtMetaDataPropertySet propSet = oc.getPropertySet(); string PropSetName = string.Empty; if (null != propSet) { PropSetName = propSet.Name; } Return.Add(Name, NodeKey.NodeId, nt.NodeTypeName, oc.ObjectClassName, PropSetName, BuildURI(nt.NodeTypeName, NodeKey.NodeId.PrimaryKey)); results.goToParentNode(); } Return.Status = HttpStatusCode.OK; } else { Return.Status = HttpStatusCode.NotFound; } } catch (Exception) { Return.Status = HttpStatusCode.InternalServerError; } }
public CswNbtAPIGrid RunGrid(string viewid) { CswNbtAPIGrid Ret = new CswNbtAPIGrid(); var SvcDriver = new CswWebSvcDriver <CswNbtAPIGrid, int>( CswWebSvcResourceInitializer: new CswWebSvcResourceInitializerNbt(_Context, null), ReturnObj: Ret, WebSvcMethodPtr: CswNbtWebServiceApiViews.RunGrid, ParamObj: CswConvert.ToInt32(viewid) ); SvcDriver.run(); WebOperationContext ctx = WebOperationContext.Current; ctx.OutgoingResponse.StatusCode = Ret.Status; if (ctx.OutgoingResponse.StatusCode != HttpStatusCode.OK) { Ret = null; } return(Ret); }
public static void RunGrid(ICswResources CswResources, CswNbtAPIGrid Return, int ViewIdInt) { CswNbtWebServiceApiViews viewApi = new CswNbtWebServiceApiViews((CswNbtResources)CswResources); viewApi.RunGrid(Return, ViewIdInt); }