Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

I'm developing a system with codeigniter, php and jquery these days, still in the login form, in my login scenario i have a advanced situation i think.

i have different kinds of users in my system,this is a hospital system, first of all there is a person to register people, a person to search old records(files), a person to check eye sight of the people, and a nurse to instruct the patients after they visit the doctor. so i have to give permission to all these people in my system.

now i will tell you about the complication i have, there are 4 doctor units, each separate doctor unit have 2 doctors, a junior one and a senior one. so altogether there are 8 doctors in my system. patients are divided to these 4doctor units, so i have to provide each doctor with a UI that is capable of handling people registered to his or her unit.

as i think form the login if i can redirect the doctors to relevant UI's is will be better. so i need to create a login where a person come enter user name and password, then select the user type, after the selection of that user type, if the user is a doctor ,then another combo box should appear dynamically and he should be given the opportunity to select his relevant doctor unit.

can you guys help me to achieve this functionality?reference links or tutorials to such kind of implementations, instructions about implementing this functionality? all are welcome! :)

regards,
Rangana
Posted

That would be very annoying, every time I want to login to the system I have to select from lots of different drop downs?

'select the user type', 'if the user is a doctor', 'his relevant doctor unit' - this is all information about an individual, just store it in the database.

the user should only have to enter username + password to login to your system. You should then go off to the database and retrieve the information about the user and take whatever actions you need to
 
Share this answer
 
if i were u i'd forget the dynamic stuff, it wuddnt really save time, instead have invisible drop downs pre-populated and only show them if certain things are selected.

to make a dropdown visible depending on another's selected value,
create a dropdown on your form, set the 'AutoPostBack' Property to True,
in the events for that dropdown, place code in the 'SelectedItemChanged' event or similar
so when the user selects an item from this dropdown,
if(DropDown1.SelectedItem.Text = "Surgeon")
{
    DropDownSurgeon.visible = true;
}

and so on, for each dropdown, then you'l have a dropdown heirarchy that show's and hides each based on the previous selected item.

to redirect to an url based on a selected item its basically the same idea-
in the on selected item changed event for the last dropdown, your gonna hav 2 put a case statement, or some if statements,

if(DropDownFinalDrpDwn.selectedItem.Text = "SurguryScreen"){
 Response.Redirect("~SurgeryScreen.aspx");
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900