Hi there! First post for me, so if I make any mistakes please point them out so I can fix my ways.
I am using .NET 4.0
I got stuck with the task of writing attendance management software that ties to a biometric clock.
I am also in the process of teaching myself C#, and should be considered a noob.
In my current project, I have arrays of strings that I am porting to a DataGridView from a .xlsx file, using the EPPlus.dll. There are several tables worth of data (time punches,employees,settings,ect). I of course need to cross reference the data,add new rows,edit rows, and generally sort it until I am green in the face.
there are only 10 to 30 active employees at any given time,and the clock stores 3 years worth of data, and only overwrites the earliest date punches after.
I tried to do this by referencing the spreadsheet that I dump the clock into, assigning separate tabs for different sets of data and referencing when needed.. That is fine for simple things, like checking for duplicate entries.. but something is missing. It is getting fatter and fatter as time goes on due to the extra effort required to move the data around.
From my reading I collect that I should be possibly making the employees as objects and putting them in a table. Then manipulating the objects as needed, before exporting it back to the spreadsheet..
I have a couple requirements; has to be standalone(no required registry entries,no installations(IE: run from a flash drive on any computer),must use spreadsheets as the final product(no problem), must be very stable(all exceptions handled),needs to be windows 7 compatible
Am I going down the right road assuming that I need a table of objects that I then can bind as a datasource?
If within the constraints of my project, what type of methodology would you use to manage this data from several forms contained within the project?
any suggested reading material?
I thank you for your patience.. I have a hunch I just blew out some neurons while thinking too hard and I am missing the obvious.
any suggestions/comments will be greatly appreciated -ben
The time clock data is valuable data. As such you want to store it in something more robust than spreadsheets - instead use something like a SQL database.
That being said, I've done something similar. The biometric timeclocks that I used used a 5 digit employee number. I had a database with employee records that along with employee info stored the timeclock number.
The system I was working on had several stores across different network domains with each store location had multiple biometric scanners. Since network reliability between locations is always a concern, I used message queuing to handle any retry work.
I used two types of windows service. A TimeClock.Event service and a TimeClock.Hgu service. The TimeClock.Event service resided at the store headquarters location and set up a message queue listener and popped any incoming time clock events off the queue and stored them in the database. The TimeClock.Hgu windows service operated on the store level and polled each biometric scanner for time punch events and pushed them onto the message queue.
Periodically, the Hgu services would sync the biometric scanner time with the network time.
That way, if I had a temporary loss in network connectivity, the time stamps on the time punch event would be correct, and when the network came back online, the message queue system would ensure that any cached time events would make it to the destination queue.
I originally wrote this system about 4 years ago and it has worked flawlessly.
I agree with you on the spreadsheets, we actually just had some computer upgrades that took us from xp to windows 7. With an interim period on a vista machine(rolls eyes). The database's changed apparently in 2008 and voided our software. They have replacement software for us, but it is plagued with issues.. just printing throws 2 or 3 errors... On top of that I had to rebuild the db because the formatting changed.. and of course, the import option was broken on the software.. I managed to get it working with the new software.. but my employers are scared of databases now... after deliberation we came to the conclusion that even in the event of complete failure, we can still manually manipulate the data, plus we could drop the sql install.
Possibly I should be looking into a more portable database solution?
I am seeing where people embed sqlite into their project. possibly that is the solution.. I'll keep digging.
as long as I can make it run off a jump drive I should be good...
I'm working up a solution now using SQlite. If they want spreadsheets, I can just export the basics to some spreads to make them feel better. Its not as if they actually understand how many ways they are asking me to jive the data anyways....
Thanks a bunch for pointing me in the right direction, I truly appreciate it.
guess I am off to learn how to use db's
as a side note:
also, I was using SharpDevelop.. it has been good to me until this project.. It has almost no database support features that the express has. Once I switched over to express, I found all these options for doing the things I was trying to do.. like natively binding to an object.. even though its ruled out now. -ben