This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Creates a stream from the specified file within the .ZIP file | |
using (Stream fileStream = zip.OpenRead(info.Name)) | |
{ | |
using(MemoryStream innerStream = new MemoryStream()) | |
{ | |
fileStream.CopyTo(innerStream); | |
//Create Acumatica file from .Zip file content | |
fileInfo = new PX.SM.FileInfo(info.Name, null, innerStream.ToArray()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public PXAction<ARInvoice> OpenZip; | |
[PXButton(CommitChanges = false)] | |
[PXUIField(DisplayName = "Open .Zip", MapEnableRights = PXCacheRights.Update, MapViewRights = PXCacheRights.Update, Enabled = true)] | |
protected virtual IEnumerable openZip(PXAdapter pxAdapter) | |
{ | |
if(Base.Document.Current != null) | |
{ | |
//Retrieves the sample .Zip file from the invoice | |
Guid zipFile = PXNoteAttribute.GetFileNotes(Base.Document.Cache, Base.Document.Current).First(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public PXAction<ARInvoice> CreateZip; | |
[PXButton(CommitChanges = false)] | |
[PXUIField(DisplayName = "Create .Zip", MapEnableRights = PXCacheRights.Update, MapViewRights = PXCacheRights.Update, Enabled = true)] | |
protected virtual IEnumerable createZip(PXAdapter pxAdapter) | |
{ | |
if (Base.Document.Current != null) | |
{ | |
UploadFileMaintenance uploadFileMaint = PXGraph.CreateInstance<UploadFileMaintenance>(); |
OlderNewer