Attachments is not working in Xafari

StatusIDPriorityType
Closed28983MinorQuestion
ProfileReply
Basil BazizClient

Hi followed the standard on the standard template for Xafari, for adding the attachment to a record but it does not work:
1. Enabled the standard DevExpress.Presistent.BaseImpl.FileData
2. Added the code to my Business Object as following:

public FileData Document
{
get { return _attachment; }
set { SetPropertyValue("FileDataAttached", ref _attachment, value); }
}
private FileData _attachment;

I tried also the following BO but also not working ofcourse after allowing (DevExpress.Persistent.BaseImpl.FileAttachmentBase) in Base Module :

public class Attachment : DevExpress.Persistent.BaseImpl.FileAttachmentBase
{ // Inherit from a different class to provide a custom primary key, concurrency and deletion behavior, etc. (http://documentation.devexpress.com/#Xaf/CustomDocument3146).
public Attachment(Session session)
: base(session)
{
}

//AutoNumber
public override void AfterConstruction()
{
base.AfterConstruction();

// Place your initialization code here (http://documentation.devexpress.com/#Xaf/CustomDocument2834).
}
}

More info:
Xafari Version 17.1.3011
Devexpress Version 17.1.

I attached both how Xafari behave & how standard XAF behave with Attachments *by same Business Object code

Replies

UserDescriptionPosted On
Basil BazizClient

Hi,

I resolved the problem by Adding (FileAttachmentsWindowsFormsModule) to Windows Module.

Thanks,

× This ticket is closed.

Write US