Hi
we have 6 groups of 253 machines each one ,
but each group are ranges from machine #2 to machine #254 ,
and continues IDs to represent each machine.
like in the following table:
Group Machine ID
0 2-254 1-253
1 2-254 254-506
2 2-254 507-759
3 2-254 760-1012
4 2-254 1013-1265
5 2-254 1266-1518
I am looking for a c# easy way to write a function to convert from an ID to a group-machine
example: ID 508 is the group #2 , machine #3
(machine 507 is the
first machine in group 2 and because it starts with 2 the second machin is machine#3)
and also the other way around
example: if I get the parameters:group #2 machine#5 ,
the function has to return the ID 510
How can I do this?
I came with a formula but it didn't work
any ideas?
thanks