-
I take on projects of all sizes for businesses of all sizes. Contact me for a no obligation initial discussion.
A properly designed database provides your business with access to up-to-date, accurate information.
Bespoke applications for a independent solution or add-on module will extend the capability of your existing system.
Monthly Archives: August 2012
Dynamically handling lists of objects
The following code shows how to create a list of different objects and handle there properties and methods. This example deals with a list of services. Create your object classes and add them to your list like this;
|
1 2 3 4 5 |
svcBusRelation = new clsBusRelation(); svcBusRelationSector = new clsBusRelationSector(); List<object> Services = new List<object>(); Services.Clear(); Services.Add(svcBusRelation); Services.Add(svcBusRelationSector); |
Posted in C# Development
Comments Off on Dynamically handling lists of objects
Enum Declaration
Simple enum declaration
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
public class ServiceClass { enum enumStatus { Stopped, Running, Processing }; private enumStatus _Status; public enumStatus Status { get { return _Status; } set { _Status = value; } } } |
Posted in C# Development
Comments Off on Enum Declaration
AX Update Example
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
// Create an Axapta record for the StateAddress table. axRecord = ax.CreateAxaptaRecord(tableName); // Execute a query to retrieve an editable record where the name is MyState. axRecord.ExecuteStmt(\"select forupdate * from %1 where %1.Name == \'MyState\'\"); // If the record is found then update the name. if (axRecord.Found) { // Start a transaction that can be committed. ax.TTSBegin(); axRecord.set_Field(\"Name\", \"MyStateUpdated\"); axRecord.Update(); // Commit the transaction. ax.TTSCommit(); } |
Posted in C# Development
Comments Off on AX Update Example


