zylstrahd
Posts: 6
|
| Posted: 01/24/2005, 9:44 AM |
|
Okay, I'm having a problem right now with a project I'm working on for my company. I'm creating a Sales Log database that will use the standard login features (login and password fields from the employees table, and group ID from the groups table). But I want to add another field called Location (in the employees table); this information is taken from the locations table in the database.
How do I incorporate this into my login page without making it too complicated?
Also, the main table which holds the sales log information has a location field. Now, after when the user logs in, how do I display records that are based only on the user's location?
Any help would be appreciated.
|
 |
 |
kevind
Posts: 251
|
| Posted: 02/04/2005, 11:50 AM |
|
If you are 'looking up' the location of the employee as opposed to asking the employee to indicate on the login page what location they belong to you can simply add a bit of code to the Before Show event of the pages you are calling to look up the value of the employee's location and store it to a session variable.
What I like to do is since the {header} page gets included automatically for all pages you create I usually create record form in that file to display a banner at the top of each page that looks up the employee / user and displays their name in the top right corner. The datasource for the form would be the employee table where the ID = login ID of user, then you put a hidden field in the form bound to the location information and create an event for the field that stores it's value to a session variable.
Any grids displayed on the page would use the session value to control what data is displayed.
To create the banner I usually create a record and delete the error row at the top and the button rows at the bottom.
let me know if this was useful.
kd
_________________
thanks
Kevin
======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
|
 |
 |
|