private void buttonNewParticipant_Click(object sender, RoutedEventArgs e) { if (_department == @"ADVP") { if (!DbConnector.CheckForExistingPid(textBoxNewParticipantID.Text)) { DbConnector.RunQuery(@"INSERT INTO tbl_Consumer_List_Entry (Consumer_Id) VALUES ('" + textBoxNewParticipantID.Text + @"');"); } IntakeForm intakeForm = new IntakeForm(textBoxNewParticipantID.Text); intakeForm.Show(); } else if (_department == @"ECAP") { if (!DbConnector.CheckForExistingPid(textBoxNewParticipantID.Text)) { DbConnector.RunQuery(@"INSERT INTO ECAP (Ecap_Id) VALUES ('" + textBoxNewParticipantID.Text + @"');"); } Ecap ecap = new Ecap(textBoxNewParticipantID.Text); ecap.Show(); } else if (_department == @"WOCAPPT") { if (!DbConnector.CheckForExistingPid(textBoxNewParticipantID.Text)) { DbConnector.RunQuery(@"INSERT INTO WOCAPPT (WocID, DateScheduled) VALUES ('" + textBoxNewParticipantID.Text + @"', #" + DateTime.Now.ToShortDateString() + "#);"); } WocMenu woc = new WocMenu(textBoxNewParticipantID.Text); woc.Show(); } Close(); }
/// <summary> /// Create intake form with selected PID /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonSelectParticipant_Click(object sender, RoutedEventArgs e) { if (_department == @"ADVP") { IntakeForm intakeForm = new IntakeForm(textBoxParticipantID.Text); intakeForm.Show(); } else if (_department == @"ECAP") { Ecap ecap = new Ecap(textBoxParticipantID.Text); ecap.Show(); } else if (_department == @"ECAP_VHOURS") { } else if (_department == @"WOCAPPT") { WocMenu woc = new WocMenu(textBoxParticipantID.Text); woc.Show(); } else if (_department == @"WOC_CLASS") { } else if (_department == @"WOC_COMPLOG") { } Close(); }