/// <remarks/> public void DocumentCreateAsync(CreateDocArguments arg, Document newDocument) { this.DocumentCreateAsync(arg, newDocument, null); }
public Document DocumentUpdate(EditDocArguments arg, Document newDocument) { object[] results = this.Invoke("DocumentUpdate", new object[] { arg, newDocument}); return ((Document)(results[0])); }
/// <remarks/> public void DocumentAllAttributeValuesComputeAsync(Document document, object userState) { if ((this.DocumentAllAttributeValuesComputeOperationCompleted == null)) { this.DocumentAllAttributeValuesComputeOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDocumentAllAttributeValuesComputeOperationCompleted); } this.InvokeAsync("DocumentAllAttributeValuesCompute", new object[] { document}, this.DocumentAllAttributeValuesComputeOperationCompleted, userState); }
/// <remarks/> public System.IAsyncResult BeginDocumentUpdate(EditDocArguments arg, Document newDocument, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DocumentUpdate", new object[] { arg, newDocument}, callback, asyncState); }
/// <remarks/> public void AttributeValueComputeAsync(Document document, string fieldName) { this.AttributeValueComputeAsync(document, fieldName, null); }
/// <remarks/> public void DocumentAllAttributeValuesComputeAsync(Document document) { this.DocumentAllAttributeValuesComputeAsync(document, null); }
/// <remarks/> public void DataSourceGetEntriesAsync(Document document, string fieldName) { this.DataSourceGetEntriesAsync(document, fieldName, null); }
public Document DocumentCreate(moDocumentProperties maAttributesList) { Document myDocument = new Document(); Attribute[] objectTypeAttributesList; CreateDocArguments documentArgs = new CreateDocArguments(); string objectTypeId; Folder parentFolder; // Set workspace myDocument.WorkspaceId = maAttributesList.WorkspaceId; //Get and set Object Type objectTypeId = DocumentTypeGetByCode(maAttributesList.DocTypeCode).Id; myDocument.ObjectTypeId = objectTypeId; // Set status myDocument.Status = StatusGetByCode(maAttributesList.WorkspaceId, maAttributesList.StatusCode); //Set version status myDocument.VersionStatus = VersionStatusTypes.Other; // Get attribute definition for objecttype objectTypeAttributesList = DocumentTypeAttributesGet(maAttributesList.WorkspaceId, objectTypeId); // Assign mezzotautomator values to object type attributes foreach(moAttribute maAttribute in maAttributesList.moAttributeList) { foreach (Attribute attribute in objectTypeAttributesList) { if (maAttribute.Code == attribute.Name) { attribute.Items = new object[1]; switch (attribute.Type) { case "System.DateTime": attribute.Items[0] = DateTime.Parse(maAttribute.Value); break; case "System.Int32": attribute.Items[0] = Int32.Parse(maAttribute.Value); break; default: attribute.Items[0] = maAttribute.Value; break; } break; } } } //Assign fields to document myDocument.Fields = objectTypeAttributesList; parentFolder = FolderGetFromPath(maAttributesList.WorkspaceId, maAttributesList.ParentFolderPath); documentArgs.ParentFolderId = parentFolder.Id; myDocument = _act.DocumentCreate(documentArgs, myDocument); return myDocument; }
/// <remarks/> public System.IAsyncResult BeginDocumentAllAttributeValuesCompute(Document document, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DocumentAllAttributeValuesCompute", new object[] { document}, callback, asyncState); }
public DataSourceEntry[] DataSourceGetEntries(Document document, string fieldName) { object[] results = this.Invoke("DataSourceGetEntries", new object[] { document, fieldName}); return ((DataSourceEntry[])(results[0])); }
/// <remarks/> public System.IAsyncResult BeginDataSourceGetEntries(Document document, string fieldName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DataSourceGetEntries", new object[] { document, fieldName}, callback, asyncState); }
/// <remarks/> public System.IAsyncResult BeginAttributeValueCompute(Document document, string fieldName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("AttributeValueCompute", new object[] { document, fieldName}, callback, asyncState); }
/// <remarks/> public void AttributeValueComputeAsync(Document document, string fieldName, object userState) { if ((this.AttributeValueComputeOperationCompleted == null)) { this.AttributeValueComputeOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAttributeValueComputeOperationCompleted); } this.InvokeAsync("AttributeValueCompute", new object[] { document, fieldName}, this.AttributeValueComputeOperationCompleted, userState); }
/// <remarks/> public void DocumentUpdateAsync(EditDocArguments arg, Document newDocument) { this.DocumentUpdateAsync(arg, newDocument, null); }
/// <remarks/> public void DataSourceGetEntriesAsync(Document document, string fieldName, object userState) { if ((this.DataSourceGetEntriesOperationCompleted == null)) { this.DataSourceGetEntriesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDataSourceGetEntriesOperationCompleted); } this.InvokeAsync("DataSourceGetEntries", new object[] { document, fieldName}, this.DataSourceGetEntriesOperationCompleted, userState); }
/// <remarks/> public void DocumentUpdateAsync(EditDocArguments arg, Document newDocument, object userState) { if ((this.DocumentUpdateOperationCompleted == null)) { this.DocumentUpdateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDocumentUpdateOperationCompleted); } this.InvokeAsync("DocumentUpdate", new object[] { arg, newDocument}, this.DocumentUpdateOperationCompleted, userState); }
public Document DocumentAllAttributeValuesCompute(Document document) { object[] results = this.Invoke("DocumentAllAttributeValuesCompute", new object[] { document}); return ((Document)(results[0])); }
public Document DocumentSearchByCode(string documentCode) { Document doc = new Document(); DataSet documentSearchDataset; DataRow documentDataRow; SearchObject search = new SearchObject(); Condition condition = new Condition(); search.WorkspaceId = WorkspaceCurrent.Id; if (documentCode != "") { condition.AttributeName = "CODE"; condition.Operator = "="; condition.Value = documentCode; condition.Separator = "AND"; search.SearchConditions = new Condition[1] { condition }; search.AttributesList = new string[2] { "CODE", "TITLE" }; search.SortCriteria = "CODE"; } else { search.Formula = documentCode; search.MaxReturnedValues = 1000; } //search.SearchConditions[0] = new Condition(); documentSearchDataset = _doc.DocumentSearchAsDataset(search); if (documentSearchDataset.Tables[0].Rows.Count > 0) { int count = documentSearchDataset.Tables[0].Rows.Count; documentDataRow = documentSearchDataset.Tables[0].Rows[0]; doc = this.DocumentGet(documentDataRow[0].ToString()); return doc; } else { return null; } }
public object[] AttributeValueCompute(Document document, string fieldName) { object[] results = this.Invoke("AttributeValueCompute", new object[] { document, fieldName}); return ((object[])(results[0])); }