Retrieving other users profiles possible?

liunx

Guest
Hey guys

I need to know if this is possible.

My site login are created via the admin users. This is fine and implemented. But when creating a new users account they need to assign them to a company and if avaiable a department. How do I add the profile to the standard profile table?

Basically in my webconfig ihave department, company, name.

Creat a user:

Username:, Password:, email: (All standard asp.net 2.0 implementation with standard classes)

I then need to assign the created user there department and company.

is there away of using the returned user ID to implement this maybe?



------------------------

My second issue is similar basically I need to get all the users from the same department into a drop box.

So say is it assigned to Development. I need to check the user profile for users belonging to this department and pop them in the drop box.

Do you have any ideas?



Thanks again this forum is a life saver in confusing times.any info would be greatany info would be great


Hi,
while I'm not exactly sure what you are asking (are you asking for help with implmenation, design, coding limiation or a fix for poor design?) I will throw a rock at the dark, and see if that will bring you 1 step closer to the solution.

I make the following assuming based on this thread:
1) you are having trouble to retireve the ID number of the user after you inserted it into a table
2) you are having 1 table to contain user information
3) your table may not be fully normalizated

Based on what I've assumed (which can be wrong) so far, this is a solution I have for you:

1) there's a stored procedure which allows you to retireve the Key ID number for account you just inserted.

<!-- m --><a class="postlink" href="http://www.drdev.net/article08.htm">http://www.drdev.net/article08.htm</a><!-- m -->

2)depends on your design, you may need to setup additional tables to contain information about diff departments.

e.g: if user in development team carry more fields (or diff fields) then user in account team, you may need to setup each additional tables for each department. however, if they all gonna contain the exact same field, you may wanna open a new table, (i'm trying to keep this as brief as possible) which contains 3 fields: key id, secondary id (from your first table) and a department field.

3) your steps should be the following,
a) admin insert user,
b) stored procedure insert user information to your table, and return a key ID #, you use that exact key ID# insert to a new table with the department name/code (whatever you perfer)
4) when you wanna load a drop down list with who all in "that" department, you just do a inner join from the department table to the user table sql statement.


I hope this is what you are looking for...
 
Back
Top