C # project
Ok I found a project to undertake.I am going to write a commission program. I know, I know there are probably hundreds of those things out there and I'm sure a bunch are free. But my aim to to learn C#.
The original program I wrote was in Quatro Pro Borlands spreadsheet program waaaay back in 1994. That one lasted about a year. The information became to much to deal with in a spreadsheet plus formatting and printing was a pain. So then I moved on to Paradox, Borlands database product. Much easier to deal with. I designed that back in 1995 and I still use it. So I figured that a rewrite would be a good idea. I will be using MS-Access as the database.
The first design was much along the same lines of the Paradox layout. One table named commission to hold all of the information and run the reports off of that. A few problems with that design. One was that if the percentage changed during the year it would change the whole year not just from that time forward. The other problem was reporting. I had to programatically stop the execution of the program to let the report catch up. So I want to avoid those problems. So I quickly realized that I was going to run into some of the same issues. So I came up with a new design.
Design number two. This one is more to my liking. There are two tables once named commission and one named transactions. Now the commission table looks something like this:
policyNumber of type string
policyHolder of type string
printOrder of type integer
salesman1 of type string
percentage1 of type double
salesman2 of type string
percentage2 of type double
(this will continue for six (6) salesmen)
and the transaction table looks something like this:
policyNumber of type string
policyHolder of type string
printOrder of type integer
salesman of type string
percentage of type double
month of type string
year of type string
gross of type double
net of type double
So basically you will have a record on the screen one at a time. You will then click the add a transaction button and another window will open up, which will be the transaction window. All the fields will be populated except for the gross and net amounts. The user will then enter the gross amount and click the post transaction button which will close the window and update the transaction database with the new record - including the net amount. Thus the issue of changinf percentage will be taken care of.
Next hurdle will be the reporting. I have to figure out how to use that. I have created a basic report - but this one will need a bit more functionality. Like a break out of each salesman and a total report. Shouldn't be too bad.
Ok that's all I have for now.
later
.mike

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home