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
[PXSelector(typeof( | |
Search<CSAttributeDetail.valueID, | |
Where<CSAttributeDetail.attributeID, Equal<Attributes.CSAnswer.poInternalType>, | |
And<CSAttributeDetail.disabled, Equal<False>>>>), | |
typeof(CSAttributeDetail.valueID), | |
typeof(CSAttributeDetail.description), | |
DescriptionField = typeof(CSAttributeDetail.description))] |
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 string PutFile(string entityName, string keys, string fileName, Stream file) | |
{ | |
var response = _httpClient.PutAsync(_httpClient.BaseAddress + entityName + "/" + keys + "/files/" + fileName, new StreamContent(file)).Result; | |
if (!response.IsSuccessStatusCode) | |
{ | |
return response.Content.ReadAsStringAsync().Result; | |
} | |
else return response.Content.ReadAsStringAsync().Result; | |
} |
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 static string AddFilesToTransaction(RestService rs, string docNbr, string filePath, string fileName, string entity) | |
{ | |
string result = "#UPLOADING DOCS"; | |
try | |
{ | |
byte[] filedata; | |
using (FileStream file = File.Open(filePath, FileMode.Open)) | |
{ | |
filedata = new byte[file.Length]; |
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 static string ProcessDocument(RestService rs, string fileLocation, string fileName, decimal fileSizeMb, string fileStatus, string folder, string uploadedBy) | |
{ | |
string result = ""; | |
string entityAsString = JsonConvert.SerializeObject(new | |
{ | |
FileLocation = new { value = fileLocation.Replace(@"\\", @"\") }, | |
FileName = new { value = fileName }, | |
FileSizeMb = new { value = fileSizeMb }, | |
FileStatus = new { value = fileStatus }, |
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
private void btnProcess_Click(object sender, EventArgs e) | |
{ | |
ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(ValidateRemoteCertificate); | |
string result = "#Processing..."; | |
using (RestService rs = new RestService(txtAcumaticaURL.Text, txtEndPoint.Text)) | |
{ | |
//Log in to Acumatica ERP | |
string logonStatus = rs.Login(txtUsername.Text, txtPswrd.Text, txtCompany.Text, null); | |
if (logonStatus == "OK") |
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 class ExtAppointmentEntry : PXGraphExtension<AppointmentEntry> | |
{ | |
public static bool IsActive() { return true; } | |
public delegate IEnumerable StartAppointmentDelegate(PXAdapter adapter); | |
[PXOverride] | |
public IEnumerable StartAppointment(PXAdapter adapter, StartAppointmentDelegate baseMethod) | |
{ | |
//send request to Microsoft PowerFlow | |
var client = new RestClient("https:/***.azure.com:443/workflows/"); |
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 updateWebConfig() | |
{ | |
var configuration = WebConfigurationManager.OpenWebConfiguration("~"); | |
ServiceModelSectionGroup secgroup = (ServiceModelSectionGroup)configuration.GetSectionGroup("system.serviceModel"); | |
bool hasBasicPartyService = false; | |
bool hasWsPartyService = false; | |
bool hasUpdate = false; | |
//Verify if the BasicHttpBinding element exist |
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 PX.Data; | |
using Customization; | |
namespace AddingServiceReferences | |
{ | |
//Customization plugin is used to execute custom actions after customization project was published | |
public class myServiceAdd : CustomizationPlugin | |
{ | |
//This method executed right after website files were updated, but before website was restarted |
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.Web.Configuration; | |
using System.ServiceModel.Configuration; | |
using System.ServiceModel; |
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.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using PX.Api; | |
using PX.Data; | |
using PX.Data.BQL; | |
using PX.Objects.AP; | |
using PX.Objects.CA; |