![]() | RemDocumentUpdateDocument Method |
Namespace: Paperwork.Connect
public a_GenericResult UpdateDocument( ObjectID objectId, string objectType, string metaData, string referenceId )
public void UpdateDocument() { Paperwork.Connect.Productivity p = new Paperwork.Connect.Productivity(); string app_name = "Test Application V1.0"; p.InitRemObjects("127.0.0.1", "8099"); a_LoginInfo lf = p.rLogin.Login("argus", "xxx", app_name); if (lf == null || !lf.ErrorCode.Equals(Definitions.NOERROR)) { logger.Error(string.Format("Login error UserName:{0}Password:{1} ErrorCode:{2} ", "argus", "xxx", lf.ErrorCode)); } else { ObjectID ObjectId = new ObjectID("10000100000002F2"); string objectType = "I_MUSTERI"; p.InitAssemblies(); ITypes fObject = p.rDocument.getDocument(ObjectId,objectType); fObject.setAttribute("SURNAME", "istanbul"); string s = Paperwork.TypeUtil.Serializer.SerializeObjectToXML(fObject); MemoryStream stream; stream = Paperwork.TypeUtil.Serializer.Serialize(s); stream.Position = 0; if (ObjectId != null && !ObjectId.Equals(string.Empty)) p.rDocument.UpdateDocument(ObjectId, objectType,stream); else p.rDocument.CreateDocument(objectType, stream); } }