Wednesday, April 30, 2014

The steps for assignment 4

First we had to prepare the server. Automart lacked a couple of fields that we needed so we

1.Added a field to the registered customer table to store the randomly generated pass code
2. Added a field to store the hashed password
3. Added a Login called AutomartLogin
4. Added a user in Automart to map to the login
5. Assigned permissions for the new user
7. Changed the login mode on the server to SQL Server and Windows mode
8. Restarted the server so the mode change could take place


In Part two we created a form and classes to store the value. Specifically we

1.Created a form in the Default.asp with all the fields we needed to register a new customer
2.Created a new C# Class called Customer to store the fields.
3.Created a class ManageCustomer to write the class to the database
4. Placed the connection string in the WebConfig file
5. Added the HashPassword and RandomGenerator classes so that we can hash the password before writing to the database

The Manage customer has to write to three different tables: Person, Vehicle and RegisteredCustomer, so we had to create three SQL Statements and three SQLCommand objects. The fields to be inserted are designated as parameters and their values are found in the Customer class.


What we still have to do

First we have to connect the form to the classes so we can get the values and pass them to the manageCustomer class to write to the database.

Then we have to work on the Login. The login process is complicated. Here is a diagram that may help:

The final thing we should do, is clean up and add some error trapping to make the program less fragile.

No comments:

Post a Comment