I have a standard_user table which has these fields: id, name, year, user_id, course, monday, tuesday, wednesday, thursday, friday, and saturday.
I want monday, tuesday, wednesday, thursday, friday, and saturday to have (each of them):
table:
[(store_time)]
login_one
logout_one
login_two
logout_two
login_three
logout_three
login_four
logout_four
Most of the tutorials only uses console which has no database so it gets really confusing on how to create. Please help me...
What I have tried:
i have only tried something like this, since one-to-many relationship in windows form has no tutorials or something :(
SqlCommand cmd = new SqlCommand("insert into standard_user values (@name, @year, @standard_user_id, @course, @user_role, @login_time_one, @logout_time_one, @login_time_two, @logout_time_two, @login_time_three, @logout_time_three, @login_time_four, @logout_time_four)", con);
cmd.Parameters.AddWithValue("@name", NameTextBox.Text);
cmd.Parameters.AddWithValue("@year", ComboBoxYear.Text.ToString());
cmd.Parameters.AddWithValue("@standard_user_id", IDTextBox.Text);
cmd.Parameters.AddWithValue("@course", CourseTextBox.Text);
cmd.Parameters.AddWithValue("@user_role", "Standard User");