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
var fileGraph = PXGraph.CreateInstance<UploadFileMaintenance>(); | |
var savedFilesIDs = PXNoteAttribute.GetFileNotes(this.Document.Cache, this.Document.Current); | |
foreach (var savedFileID in savedFilesIDs) | |
{ | |
var savedFileInfo = fileUploadGraph.GetFile(fileID); | |
if (savedFileInfo != null | |
&& VerifyFileName(savedFileInfo.Name)) | |
{ | |
fileGraph.Files.AllowDelete = true; | |
fileGraph.Files.Delete(fileUploadGraph.Files.Current); |
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
var fileGraph = PXGraph.CreateInstance<UploadFileMaintenance>(); | |
var savedFilesIDs = PXNoteAttribute.GetFileNotes(this.Document.Cache, this.Document.Current); | |
foreach (var savedFileID in savedFilesIDs) | |
{ | |
var savedFileInfo = fileGraph.GetFile(savedFileID); | |
… | |
} | |
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 void AttachFile() | |
{ | |
//Convert your file into BIN format | |
byte[] fileInBytes = Encoding.UTF8.GetBytes("My best ever file."); | |
// Generate info about the file | |
var fileInfo = new PX.SM.FileInfo(Guid.NewGuid(), "OneFile.txt", null, fileInBytes); | |
// Save file to database | |
var uploadFileGraph = PXGraph.CreateInstance<UploadFileMaintenance>(); | |
uploadFileGraph.SaveFile(oneFileInfo, FileExistsAction.CreateVersion); | |
// Attach file to the dedicated table |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Customization; | |
using PX.Data; | |
using PX.DbServices.Model.ImportExport; |
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
namespace PX.Objects.SO | |
{ | |
public class SOOrderEntry_Extension : PXGraphExtension<SOOrderEntry> | |
{ | |
#region Event Handlers | |
public PXAction<SOLine> AddNewDSLine; | |
[PXButton(CommitChanges = true)] | |
[PXUIField(DisplayName = "Insert Line", Enabled = true, MapEnableRights = PXCacheRights.Select, | |
MapViewRights = PXCacheRights.Select)] |
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
using Newtonsoft.Json; | |
using PX.Data; | |
using PX.Data.Webhooks; | |
using System; | |
using System.Net.Http; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Web.Http.Results; | |
| |
namespace WebHooksConfiguration |
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
using System; | |
using System.IO; | |
using System.Net; | |
using Newtonsoft.Json; | |
| |
namespace ConsoleApp1 | |
{ | |
public class ObjectJSON | |
{ | |
public string Name { get; set; } |