Click or drag to resize

RemDocumentUpdateDocument Method

Paperwork .Net Kütüphanesi
Doküman güncellemek için kullanılır.

Namespace:  Paperwork.Connect
Assembly:  Paperwork.Connect (in Paperwork.Connect.dll) Version: 5.0.0.0
Syntax
C#
public a_GenericResult UpdateDocument(
	ObjectID objectId,
	string objectType,
	string metaData,
	string referenceId
)

Parameters

objectId
Type: ObjectID
Güncellenmek istenen doküman nesne numarası
objectType
Type: SystemString
Doküman tipi
metaData
Type: SystemString
referenceId
Type: SystemString
Nesne akışta kullanılıyor ise workitemId değeri geçilir. Aksi taktirde boş geçilir

Return Value

Type: a_GenericResult
Nesne numarası varsa dokümanı günceller , yoksa dökümanı yaratır.

Return Value

Type: a_GenericResult
a_GenericResult nesesi içinde , ErrorCode=0 ise işlem başarılıdır. Aksi taktirde Result ve Message alanları kontrol ediniz.
Examples
C#
 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);
      }
}
See Also