Uniconta Attachments (UserDocsClient)

Date: 2021-12-21
// Uniconta.ClientTools.DataModel.UserDocsClient

// add attachment to unicontabaseentity
var unicontaEntity = myEntity;

var attachment = new UserDocsClient()
{
    _Data = data,
    _Text = fileName,
    _DocumentType = FileextensionsTypes.PDF
};
attachment.SetMaster(unicontaEntity);

var result = await api.Insert(attachment);


// read attachment data
_ = await api.Read(attachment);

// this is filled after a read
File.WriteAllBytes(fileName, attachment.UserDocument);



58290cookie-checkUniconta Attachments (UserDocsClient)