Click here to Skip to main content
15,899,126 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
in my test system web application
i have added aspnet_db registration role memebership etc tables into my database.
and made three roles
1. admin
2. teacher (creat test function he will do)
3. student

now if i want to check which administrator or teacher work did (made test or added subjects details) then i need to add user ID into my all table ?? or any thing else i need to do?
Posted
Updated 6-Sep-13 18:35pm
v2
Comments
saad_lah 7-Sep-13 0:26am    
plz clarify your question
Muhamad Faizan Khan 7-Sep-13 0:36am    
ok

1 solution

AoA,


If you are making one table like roles in which you are handling students,teachers and administrators all, then you can do something like this

create table roles
(
-- user_id
-- user_name
-- user_role i.e say a label like "teacher,admin,student
-- add more things u want
)

and when you are using them in list or gridview, you can hide user_id in the tables
P.S : Jahan tak mujhe samajh ayi mein ne solution de diya... :P
 
Share this answer
 
v2
Comments
Muhamad Faizan Khan 7-Sep-13 2:12am    
چلیں آپکو اردو میں سمجھا دیتا ہوں سعد بھائی رول ممبر شپ کے ٹیبل میں نے اپنے ڈیٹا بیس میں شامل کرلیے ہیں اب میں یہ دیکھنا چاہتا ہوں کے ٹیسٹ کس نے بنایا ڈیٹابیس میں، میرا مطلب کس ٹیچر نے بنا یا ہے تو کیا میں اپنے ٹیسٹ کے ٹیبل کے ساتھ یوزر آئی ڈی بھی شامل کرلو یا کوئی اور طریقہ بہتر ہوگا؟
saad_lah 7-Sep-13 2:30am    
Make another table like test_creators

create table test
(
--user_id i.e teacher user_id
--course name
--test date
--add more thing if you want
)

ab jo bhi teacher koi new test bnaye ga...just add the teacher user_id and test date, test subject name in it....is se kitney tests create huwey hein aur kis teacher ne kiye hein
Muhamad Faizan Khan 7-Sep-13 2:37am    
یوزر آئی ڈی جو ہوگی وہ اے ایس پی لاگن والی ہوگی نا؟
saad_lah 7-Sep-13 8:52am    
yup, every person will be assigned a unique User_ID like in college or uni. RollNo is the identifier or unique id you can use seed or increment, takey automatically user_id increase hoti jaye....suppose 2000, next insertion mein 2001,2002 and so on,

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