Awake at 2:00 AM
It's not 2:00AM now - just that I was awake at 2:00am. Probably should have re thought the title. hmmmm Anyway Joshua had an Asthma attack on Monday afternoon/evening. So much so we had to bring him in to the doctors. It was his doctor who stayed late to see and I am grateful for that. She is excellent with our kids. Anyway they took his stats and everything looked good his O2 sat was 94 ~ 95% and his breathing was good. Much better than the last time we took him in with this.
So they gave Josh a Xopenex treatment at the office and she told me every 4 hours - unless he is sleeping. So back home we went - and I, as well as my wife, were feeling much relieved. So we finally get all the kids bed. We go to bed as well were tired (as most parent of 3 under 5 are). Anyway Josh wakes up coughing and crying at 2:00. So I go into his room and after 5 minutes I decide that he needs another round of Xopenex. The only problem is that this stuff "wires" josh and he can't sleep for a while. Come to find out that , while, is like 2 hours. So we laid on his bed, because how dare I leave him, until he falls asleep around 4:30 ish. I get up at 6:00 - good nights sleep.
Oh did I mention that our oldest spent the night in our bed the previous night with a mild fever and neck pains. Seems to be the after effects of having his adenoids removed. And oh yeah our youngest was in the bed as well. So no sleep for 2 nights. But hey its all part of parenting, right?
I really do love my kids - just wish tthey would let me sleep a wee bit more.
later
.mike
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