This file contains hidden or 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 AjhTestRSL(Args _args) | |
| { | |
| CustTable custTable; | |
| RecordSortedList myList = new RecordSortedList(tableNum(CustTable)); | |
| boolean moreRecs; | |
| myList.sortOrder(fieldNum(CustTable, AccountNum)); | |
| // create a list | |
| while select firstOnly10 * from custTable |
This file contains hidden or 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.Globalization; | |
| namespace MySuit.MySuitV2.BLL | |
| { | |
| public class Utility | |
| { |
This file contains hidden or 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 AjhBase36Test(Args _args) | |
| { | |
| // ajh 2014-05-07: 611.23 | |
| // adapted from http://en.wikipedia.org/wiki/Base_36. | |
| // note: handles non-negative integers only. | |
| #define.NBASE(36) | |
| #define.CLIST("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ") | |
| int64 base36_decode(str base36_input) | |
| { |
This file contains hidden or 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
| /// <summary> | |
| /// return true is the specified user is in any of the roles in the roleNames container. | |
| /// </summary> | |
| /// <param name="axUserId"> | |
| /// AX user id, e.g. curUserId() | |
| /// </param> | |
| /// <param name="roleNames"> | |
| /// container of role names to check. (use role NAME, not label.) | |
| /// </param> | |
| /// <returns> |
This file contains hidden or 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
| /// <summary> | |
| /// return true is the specified user is in any of the roles in the roleNames container. | |
| /// </summary> | |
| /// <param name="axUserId"> | |
| /// AX user id, e.g. curUserId() | |
| /// </param> | |
| /// <param name="roleNames"> | |
| /// container of role names to check. (use role NAME, not label.) | |
| /// </param> | |
| /// <returns> |
This file contains hidden or 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 AjhTestTextBuffer(Args _args) | |
| { | |
| // ajh 2013-05-24: is the TextBuffer faster than using string concatenation? | |
| // from http://www.mail-archive.com/axapta-knowledge-village@yahoogroups.com/msg07289.html | |
| TextBuffer tb; | |
| str a,b; | |
| int i,j; | |
| int ts, te; | |
| ts = WinAPI::getTickCount(); |
This file contains hidden or 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 AjhDictEnumTest(Args _args) | |
| { | |
| // originally from http://arsalanax.blogspot.com/2012/02/get-values-of-base-enums-using-code-in.html | |
| EnumId enumId = enumNum(ActionType); | |
| DictEnum dictEnum = new DictEnum(enumId); | |
| int nElements = dictEnum.values(); | |
| int i; | |
| for (i=0; i < nElements; i++) | |
| { |
This file contains hidden or 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
| param ( | |
| [string]$cs1 = $( Read-Host "Enter changeset 1 (as c9999)" ), | |
| [string]$cs2 = $( Read-Host "Enter changeset 2 (as c9999)" ) | |
| ) | |
| [string]$tf = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" | |
| [string]$npp = "C:\Program Files (x86)\Notepad++\notepad++.exe" | |
| [string]$tempFile = "$env:temp\tfDiff.diff" | |
| pushd | |
| cd c:\ax2012tfs | |
| & $tf diff cus /v:$cs1~$cs2 /r /f:unified > $tempFile |
This file contains hidden or 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
| [string]$tf = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" | |
| [string]$npp = "C:\Program Files (x86)\Notepad++\notepad++.exe" | |
| # [string]$tempFile = [System.IO.Path]::GetTempFileName() | |
| [string]$tempFile = "$env:temp\tfStatus.txt" | |
| pushd | |
| cd c:\ax2012tfs | |
| & $tf status > $tempFile | |
| popd | |
| & $npp $tempFile |
This file contains hidden or 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
| [string]$tf = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" | |
| pushd | |
| cd c:\ax2012tfs | |
| & $tf history /r /stopafter:50 * | |
| popd |