"Mike TI" <tanveer@creativepk.comschrieb
Quote:
Nov 14, 2007
>
Hellow Seth
>
I am converting a Payroll application that I did in MS Visual
Foxpro. In this application how an Allowance or Deduction is defined
is flexible. Just to give you a simple example:
>
For one company the basis can be as below:
>
Allowances:
>
ALL01 1,000
ALL02 100
ALL03 500
ALL04 45% of ALL01+ALL02+ALL03
ALL05 10% of ALL01+ALL03 if no
Leave Without Pay
>
For another company the basis can be as below:
>
Allowances:
>
ALL01 1,000
ALL02 100
ALL03 500
ALL04 45% of ALL01+ALL02
ALL05 10% of ALL01+ALL02+ALL03 if
no Leave Without Pay
>
Now I want to build the calculation for ALL04 & ALL05 from within
the program. There are some other alternates. However I was
wondering if I could do the way I was doing in VFP.
You must write a parser and interpret the input on you own.
Quote:
Also I was wondering if I could load a form getting the name stored
in a variable.
Whenever I read this, I wonder how a class name, that is only relevant to
the developer, which means it gets out of interest after the source code has
been compiled, how this class names makes it's way through to run-time as
the content of a variable. The only exception is whenever the class name is
also stored externally. In this case, I recommend writing a Select Case
statment based upon the string and create the corresponding instance. This
enables the compiler to check the class name at compile time and it is more
straight forward than using Reflection (see System.Activator.Creatinstance).
Armin