Custom Class Generator (CCG)
MES c# code generator
An useful Visual Studio .NET 2005 addin help you to write huge lines of code. With this addin Mdf create for you SQL Server tables and c# code.
You have to configurate your custom class:
- Equipments
- Materials
- Material lots
- Material sublots
- Handling units
- Personnel
- Orders and order items (not ISA 95)
and the CCG create for you the storage layer on SQL server and a business entities layer on VS.NET 2005.
In example you have the Tank equipment class with the Volume property. After you run the CCG you can write some code like this:
1public decimal GetTankHalfVolume(string tankID)
2{
3
4 Tank tank = new Tank(tankID);
5
6
7 return tank.Volume * 0.5;
8}
9
10public void SetTankVolume(string tankID)
11{
12
13 decimal measure = ...;
14
15
16 decimal volume = measure * ...;
17
18
19 Tank tank = new Tank(tankID);
20
21
22 tank.Volume = volume;
23
24
25 tank.Save();
26}
Using partial class
CCG create a c# partial class so you can create in your own file your class extension. In example you can add some Tank methods to increase and decrease the volume adding some business rule like alarm on threshold.