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
declare @stmt nvarchar(max) | |
declare @restriction nvarchar(max) | |
declare @companyID int | |
declare @parent int | |
declare c cursor for | |
select CompanyID from Company c | |
where c.CompanyID > 0 | |
and(Select top 1 CompanyID from Company Where CompanyId > 0 and ParentCompanyID = c.CompanyID) is null | |
order by CompanyID |
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.SM; | |
using PX.TM; | |
using PX.Data; | |
namespace PX.Objects.CR |
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
if exists(select * from sys.objects where object_id = object_id('dbo.pp_ChangeBaseCury') and objectproperty(object_id,'IsProcedure')=1) | |
drop proc dbo.pp_ChangeBaseCury | |
go | |
create procedure dbo.pp_ChangeBaseCury @companyID int, @oldCury NVARCHAR(10), @newCury NVARCHAR(10), @description NVARCHAR(255), @symbol NVARCHAR(10) AS | |
BEGIN | |
DECLARE @stmt NVARCHAR(MAX) | |
DECLARE @table NVARCHAR(255) | |
DECLARE @column NVARCHAR(255) | |
DECLARE @anyfailed bit |
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 PXSelectReadonly2<Contract, | |
InnerJoin<ContractBillingSchedule, On<ContractBillingSchedule.contractID, Equal<Contract.contractID>>, | |
InnerJoin<CSAnswers, | |
On<CSAnswers.entityType, Equal<CSAnswerType.contractAnswerType>, | |
And<CSAnswers.entityID, Equal<Contract.contractID>, | |
And<CSAnswers.attributeID, Equal<AttributesConst.RevTypeAttribute>>>>, | |
InnerJoin<CSAttributeDetail, | |
On<CSAttributeDetail.attributeID, Equal<AttributesConst.RevTypeAttribute>, | |
And<CSAttributeDetail.valueID, Equal<CSAnswers.value>>>, | |
>>>, |
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<MultiPayment> Release; | |
[PXProcessButton] | |
[PXUIField(DisplayName = "Release")] | |
protected virtual void release() | |
{ | |
this.Actions.PressSave(); | |
PXLongOperation.StartOperation(this, delegate () | |
{ | |
CreatePayment(row); |
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
DECLARE @TableName varchar(255) | |
DECLARE TableCursor CURSOR FOR | |
SELECT table_name FROM information_schema.tables | |
WHERE table_type = 'base table' | |
OPEN TableCursor | |
FETCH NEXT FROM TableCursor INTO @TableName | |
WHILE @@FETCH_STATUS = 0 | |
BEGIN | |
DBCC DBREINDEX(@TableName,' ',90) |
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
DECLARE @Table VARCHAR(255) | |
DECLARE @cmd NVARCHAR(500) | |
DECLARE @fillfactor INT | |
SET @fillfactor = 95 | |
set @cmd = 'DECLARE TableCursor CURSOR FOR SELECT ''['' + table_catalog + ''].['' + table_schema + ''].['' + | |
table_name + '']'' as tableName FROM INFORMATION_SCHEMA.TABLES | |
WHERE table_type = ''BASE 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
//General usage | |
[PXDBInt] | |
[PXSelector(typeof(Search<FAClass.assetID, Where<FAClass.recordType, Equal<FARecordType.classType>>>), | |
typeof(FAClass.assetCD), typeof(FAClass.assetTypeID), typeof(FAClass.description), typeof(FAClass.usefulLife), | |
SubstituteKey = typeof(FAClass.assetCD), | |
DescriptionField = typeof(FAClass.description), CacheGlobal = true)] | |
[PXRestrictor(typeof(Where<FAClass.active, Equal<True>>), Messages.InactiveFAClass, typeof(FAClass.assetCD))] | |
[PXUIField(DisplayName = "Asset Class", Visibility = PXUIVisibility.Visible)] | |
public virtual int? ClassID { get; set; } |
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
#region FTPFileExchange | |
[System.Net.WebPermission(System.Security.Permissions.SecurityAction.Assert, Unrestricted = true)] | |
public class FTPFileExchange : BaseFileExchange, IFileExchange | |
{ | |
public String Name { get { return Messages.ExchangeFTP; } } | |
public String Code { get { return Codes.ExchangeFTPCode; } } | |
public FTPFileExchange(String login, String password) | |
: base(login, password) | |
{ } |