Jump to content
Xtreme .Net Talk

relating primary keys with descriptions via check box.please read


Recommended Posts

Posted

im having a problem and its a bit difficult to describe but heres my best try:

 

i have a patient table with a patient_id column. there is a child table of this called work_details. work details stores the types or work a patient does such as lifting, standing, carrying... i have a work types table. this has a work_type_id and a work_type. eg "wt_1 , lifting".

 

on my form, each work type is represented by a check box. if the box is checked, a record will be added to the work_details table.

my problem is this. i dont know how to associate the work_type_id with each check box. what im doing at the minute, is to manually type in the work_type_id into the tag property of the checkBox, and then use the line:

 

row1["work_type_id"] = c.Tag;

 

im sure there is a better way to do this.

all the data from my database is stored in a dataset, including the work_types and id's. can anyone tell me a better way to do this, as i will face this problem a number of times in my application

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...