Skip to content

Instantly share code, notes, and snippets.

View sampetrosov's full-sized avatar

Samvel Petrosov sampetrosov

View GitHub Profile
View Acumatica_ChangeID.SmartPanel.aspx
<px:PXSmartPanel runat="server" ID="pnlChangeID" Caption="Specify New ID" CaptionVisible="True" DesignView="Hidden" LoadOnDemand="True"
Key="ChangeIDDialog" AutoCallBack-Enabled="True" AutoCallBack-Target="formChangeID" AutoCallBack-Command="Refresh" CreateOnDemand="False"
AutoCallBack-Behavior-CommitChanges="True" AutoCallBack-Behavior-PostData="Page" AcceptButtonID="btnOK">
<px:PXFormView runat="server" ID="formChangeID" Width="100%" CaptionVisible="False" DataSourceID="ds" DataMember="ChangeIDDialog">
<Template>
<px:PXLayoutRule runat="server" ID="rlAcctCD" StartColumn="True" LabelsWidth="S" ControlSize="XM" />
<px:PXTextEdit runat="server" DataField="CD" ID="edAcctCD" />
</Template>
</px:PXFormView>
<px:PXPanel runat="server" ID="pnlChangeIDButton" SkinID="Buttons">
View Acumatica_ChangeID.AssetMaintExt.cs
using PX.Data;
using PX.Objects.FA;
namespace Acumatica_ChangeID
{
// Acuminator disable once PX1016 ExtensionDoesNotDeclareIsActiveMethod extension should be constantly active
public class AssetMaintExt : PXGraphExtension<AssetMaint>
{
public override void Initialize()
{
View PXGenericInqGrph_part2.cs
// Token: 0x06008BBA RID: 35770 RVA: 0x00248E48 File Offset: 0x00247048
internal static string GetExtFieldId(GIResult field)
{
if (field == null)
{
throw new ArgumentNullException("field");
}
if (field.RowID == null)
{
throw new ArgumentException("RowID cannot be null.", "field");
View PXGenericInqGrph_part.cs
// Token: 0x06008B8F RID: 35727 RVA: 0x00245EF8 File Offset: 0x002440F8
public void GenerateResultField(GIResult gir, bool groupingActivated, GITable git, Type cacheType, PXCache cache, bool cleanable = false, bool forceCount = false)
{
if (string.IsNullOrEmpty(gir.Field))
{
throw new PXException("The field or table '{0}' in the inquiry design is invalid.");
}
bool isCountField = gir.Field == "$<Count>";
bool isCountAggregate = !isCountField && ((groupingActivated && gir.AggregateFunction == "COUNT") || forceCount);
bool isFormula = gir.Field.StartsWith("=");
View DB-ProjectProductivityByDate.xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<data-set>
<relations format-version="3" relations-version="20201014" main-table="GIDesign" stable-sharing="True" file-name="(Name)">
<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, NavigationScreenLineNbr)" to="GINavigationScreen (DesignID, LineNbr)" />
<link from="GIOn (DesignID, RelationNbr)" to="GIRelation (DesignID, LineNbr)" />
View CustomController.IIGControllerPart.cs
[HttpGet]
[Route("Index")]
[AllowAnonymous]
public HttpResponseMessage Index()
{
var response = new HttpResponseMessage();
var template = File.ReadAllText(Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath, "Frames/IIG/SignIn.cshtml"));
var layoutTemplate = File.ReadAllText(Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath, "Frames/IIG/__Layout.cshtml"));
Engine.Razor.AddTemplate("__Layout", layoutTemplate);
var content = Engine.Razor.RunCompile(template, "IIGSignIn");
View CustomController.IIGController.cs
using Newtonsoft.Json.Linq;
using PX.Data;
using PX.Export.Authentication;
using System.Web.Http;
using CustomController.Models;
using CustomController.Helpers;
using System.Web;
namespace CustomController
{
View CustomController.Models.BusAccount.cs
using PX.Data;
using PX.Objects.CR;
using System;
namespace CustomController.Models
{
public class BusAccount
{
public string CompanyName { get; set; }
public string FirstName { get; set; }
View CustomController.BasicAuthorizeAttribute.cs
using PX.Data;
using System;
using System.Text;
using System.Web.Http;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;
namespace CustomController.Helpers
{
public sealed class BasicAuthorizeAttribute : AuthorizationFilterAttribute
View CustomController.Startup.cs
using System.Reflection;
using System.Web.Http;
using Autofac;
using Autofac.Integration.WebApi;
namespace CustomController
{
public class Startup
{
public static void Configuration(HttpConfiguration config)