Skip to content

Instantly share code, notes, and snippets.

View smarenich's full-sized avatar

Sergey Marenich smarenich

View GitHub Profile
static void Main(string[] args)
{
Screen screen = new Screen();
screen.CookieContainer = new System.Net.CookieContainer();
screen.Timeout = 10000000;
screen.Login("admin@Demo", "123");
string invoiceNbr = "AR004916";
Content schema = screen.GetSchema();
using APQuickCheck = PX.Objects.AP.Standalone.APQuickCheck;
using CRLocation = PX.Objects.CR.Standalone.Location;
using IRegister = PX.Objects.CM.IRegister;
using PX.Common;
using PX.Data.EP;
using PX.Data;
using PX.Objects.AP.BQL;
using PX.Objects.AP;
using PX.Objects.CM;
using PX.Objects.Common;
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<data-set>
<relations format-version="3" relations-version="20160530" main-table="GIDesign">
<link from="GIFilter (DesignID)" to="GIDesign (DesignID)" />
<link from="GIGroupBy (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassAction (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassUpdateField (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationScreen (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationParameter (DesignID, ScreenID)" to="GINavigationScreen (DesignID, ScreenID)" />
<link from="GIOn (DesignID, RelationNbr)" to="GIRelation (DesignID, LineNbr)" />
public class EmployeeActivitiesEntry_Extension : PXGraphExtension<EmployeeActivitiesEntry>
{
public PXAction<EmployeeActivitiesEntry.PMTimeActivityFilter> GenerateTimeCards;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Generate Time Cards")]
protected virtual IEnumerable generateTimeCards(PXAdapter adapter)
{
EmployeeActivitiesEntry.PMTimeActivityFilter filter = Base.Filter.Current;
if (filter.OwnerID == null) return adapter.Get();
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using PX.Data;
using PX.Objects.AR;
using PX.SM;
using PX.Objects.EP;
namespace PX.Objects.SO
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<data-set>
<relations format-version="3" relations-version="20160530" main-table="GIDesign">
<link from="GIFilter (DesignID)" to="GIDesign (DesignID)" />
<link from="GIGroupBy (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassAction (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassUpdateField (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationScreen (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationParameter (DesignID, ScreenID)" to="GINavigationScreen (DesignID, ScreenID)" />
<link from="GIOn (DesignID, RelationNbr)" to="GIRelation (DesignID, LineNbr)" />
PXReportRequiredException ex = null;
if(row.ARRefNumber != null)
{
Dictionary<string, string> dictionary = new Dictionary<string, string>();
dictionary["DocType"] = row.ARDocType;
dictionary["RefNbr"] = row.ARRefNumber;
ex = PXReportRequiredException.CombineReport(ex, row.ARBatchNumber == null ? "AR610500" : "AR622000", dictionary, false);
}
public class ARReleaseProcessExt : PXGraphExtension<ARReleaseProcess>
{
private WeakReference<JournalEntry> je;
public override void Initialize()
{
base.Initialize();
PXGraph.InstanceCreated.AddHandler<JournalEntry>(delegate(JournalEntry graph)
{
@smarenich
smarenich / CustomizationPlugIn.cs
Last active February 9, 2017 01:52
MultiCompanyReporting
using System;
using PX.Data;
using Customization;
namespace PX.Objects.PM
{
public class Initialization : CustomizationPlugin
{
public override void OnPublished()
{
using PX.Common;
using PX.Data.EP;
using PX.Data;
using PX.Objects.CM;
using PX.Objects.CR;
using PX.Objects.CS;
using PX.Objects.GL;
using PX.Objects;
using System.Collections.Generic;
using System;