I have a Winform with SQlite database, I need to save the date from the DateTimPicker only if selected and cant figure it out. Currently it is saving whats in the dateTime picker.
string txtQuery = "insert into Roster (Tech_Role, Employee, Picture, Employee_Number, Shift, Zone, Supervisor, On_Board_Date_into_Material_Handling,"
+ "Basic_Skills, TCAT_Certifaction, Basic_Skills_Fork_Pass, Basic_Skills_Tug_Pass, Regional_Training, Job_Observation_Training, " +
"Advance_Training, Previous_Safety_Training," + "Current_Safety_Training, MH_Employee_Active )values('"
+ cb_Role.Text + "', '" + tb_Name.Text + "', '" + pictureBox1.Text + "' ,'"
+ tb_Employee_Number.Text + "', '" + cb_Shift.Text + "', '" + tb_Zone.Text + "', '"
+ tb_Supervisor.Text + "','" + dateTimePicker1.Text + "','" + dateTimePicker7.Text +
"','" + cb_TCAT.Text + "','" + cb_Fork.Text + "','" + cb_Tug.Text + "','"
+ dateTimePicker2.Text + "','" + dateTimePicker3.Text + "','" + dateTimePicker4.Text + "'" +
",'" + dateTimePicker5.Text + "','" + dateTimePicker6.Text + "','" + cb_Active.Text + "')";
What I have tried:
To many codes to list, and days of searching on the Net.