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
select | |
CompanyID, | |
BatchID, | |
ChangeID, | |
ScreenID, | |
(Select top 1 username from Users u where PKID = UserID), | |
ChangeDate, | |
Operation, | |
REPLACE(CAST(CAST(CombinedKey AS VARCHAR(max)) AS VARBINARY(max)), 0x0, ','), | |
REPLACE(CAST(CAST(ModifiedFields AS VARCHAR(max)) AS VARBINARY(max)), 0x0, ',') |
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
//PXSearchable for GL Batch | |
[PXSearchable( | |
SM.SearchCategory.GL, | |
"{0} {1} - {2}", | |
new Type[] { typeof(Batch.module), typeof(Batch.batchNbr), typeof(Batch.branchID) }, | |
new Type[] { typeof(Batch.ledgerID), typeof(Batch.description), typeof(BatchExt.usrExternarLeference) }, | |
NumberFields = new Type[] { typeof(Batch.batchNbr) }, | |
Line1Format = "{0}{1}{2:d}", | |
Line1Fields = new Type[] { typeof(Batch.ledgerID), typeof(Batch.finPeriodID), typeof(Batch.dateEntered) }, | |
Line2Format = "{0}", Line2Fields = new Type[] { typeof(Batch.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 class SomeMaint : PXGraph<SomeMaint> | |
{ | |
public PXSelect<UnionTable> UnionSelect; | |
protected IEnumerable unionSelect() | |
{ | |
List<UnionTable> result = new List<UnionTable>(); | |
foreach (SomeTable1 row in PXSelect<SomeTable1>.Select(this)) | |
{ |
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
//Defining action DataView | |
public PXAction<MyDAC> MyButton; | |
//Defining Button Attribute with tooltip | |
[PXButton(Tooltip = PX.Data.Update.Messages.MyTooltip)] | |
//Providing title and mapping action access rights | |
[PXUIField(DisplayName = "MyTitle", MapEnableRights = PXCacheRights.Delete, MapViewRights = PXCacheRights.Delete)] | |
protected void myButton() | |
{ | |
WebDialogResult result = Companies.Ask(ActionsMessages.Warning, PXMessages.LocalizeFormatNoPrefix("My Message"), | |
MessageButtons.OKCancel, MessageIcon.Warning, true); |
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<MyDAC> MyButton; | |
[PXButton(Tooltip = PX.Data.Update.Messages.MyTooltip)] | |
[PXUIField(DisplayName = "MyTitle", MapEnableRights = PXCacheRights.Delete, MapViewRights = PXCacheRights.Delete)] | |
protected void myButton() | |
{ | |
if (MyPanel.AskExt(true) != WebDialogResult.OK) return; | |
//Do some useful Stuff | |
} | |
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
<px:PXSmartPanel ID="pnlCopyCompany" runat="server" CaptionVisible="True" Caption="My Command" | |
Style="position: static" LoadOnDemand="True" Key="MyPanel" AutoCallBack-Target="frmMyCommand" | |
AutoCallBack-Command="Refresh" DesignView="Content"> | |
<px:PXFormView ID="frmMyCommand" runat="server" SkinID="Transparent" DataMember="MyPanel" DataSourceID="ds" EmailingGraph=""> | |
<Template> | |
<px:PXLayoutRule runat="server" ControlSize="M" LabelsWidth="M" StartColumn="True" /> | |
<px:PXLabel ID="lblWarning" runat="server" Encode="True"> | |
WARNING: Some Action. | |
</px:PXLabel> | |
<px:PXSelector ID="edMyField" runat="server" AutoRefresh="True" DataField="MyField" DataSourceID="ds" /> |
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
static void Main(string[] args) | |
{ | |
using (DefaultSoapClient client = new DefaultSoapClient()) | |
{ | |
client.Endpoint.Address = new System.ServiceModel.EndpointAddress("https://localhost/demo/entity/Default/5.30.001"); | |
client.Login("admin", "123", "Demo", null, null); | |
Console.WriteLine("Get all Stock Items"); | |
//retrieveAllEntities force system to retrive details and linked entities | |
Entity[] items = client.GetList(new StockItem(), false); |
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 const string SessionKey = "MyFileImportSessionKey"; | |
public PXAction<GLTran> UploadFileBatch; | |
[PXUIField(DisplayName = "Upload File as Batches", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select, Visible = true)] | |
[PXButton()] | |
public virtual IEnumerable uploadFileBatch(PXAdapter adapter) | |
{ | |
//Ask user to upload file, continue if it is OK | |
if (this.NewFilePanel.AskExt() == WebDialogResult.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
private static void ImportTransactionsFromFile(PX.SM.FileInfo file) | |
{ | |
ImportTest graph = new ImportTest(); | |
Byte[] bytes = file.BinData; | |
using(PX.Data.XLSXReader reader = new XLSXReader(bytes)) | |
{ | |
//Initialising Reader | |
reader.Reset(); | |
//Creating a dictionary to find column index by name |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using PX.Data; | |
using PX.Common; | |
using PX.Objects.GL; | |
using PX.Objects.IN; | |
using PX.Objects.CM; | |
using PX.Export; |