CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Extra fields for Login page - need help!

Print topic Send  topic

Author Message
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.
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.