private void button1_Click(object sender, EventArgs e) { if (comboBox1.SelectedItem == null) { MessageBox.Show("No doctor has been selected"); } else { dictionary4 = createDoctorIDDictionary(comboBox1.SelectedItem.ToString()); dtDoctorID = createGetDoctorID(dictionary4); doctorID = int.Parse(dtDoctorID.Rows[0][0].ToString()); dictionary3 = createScheduleDictionary(this.doctorID.ToString(), today); dtScheduleID = createGetSchedule(dictionary3); scheduleID = int.Parse(dtScheduleID.Rows[0][0].ToString()); dictionary5 = createDayScheduleDictionary(this.scheduleID.ToString(), today, this.doctorID.ToString(), comboBox1.SelectedItem.ToString(), this.patientID.ToString(), lblLName.Text, lblFName.Text); dtInsert = createDaySchedule(dictionary5); ScheduleList s = new ScheduleList(); s.doctorID = this.doctorID; s.doctorName = comboBox1.SelectedItem.ToString(); s.Show(); } }
private void button4_Click(object sender, EventArgs e) { if (comboBox1.SelectedItem == null) { MessageBox.Show("No doctor has been selected"); } else { AddtoDoctorList a = new AddtoDoctorList(); a.dc = new DatabaseConnector(); dictionary4 = a.createDoctorIDDictionary(comboBox1.SelectedItem.ToString()); dtDoctorID = a.createGetDoctorID(dictionary4); doctorID = int.Parse(dtDoctorID.Rows[0][0].ToString()); ScheduleList s = new ScheduleList(); s.MdiParent = this.MdiParent; s.doctorID = this.doctorID; s.doctorName = comboBox1.SelectedItem.ToString(); s.Show(); } }
private void button1_Click(object sender, EventArgs e) { if (comboBox1.SelectedItem == null) { MessageBox.Show("No doctor has been selected"); } else { dictionary4 = createDoctorIDDictionary(comboBox1.SelectedItem.ToString()); dtDoctorID = createGetDoctorID(dictionary4); doctorID = int.Parse( dtDoctorID.Rows[0][0].ToString()); dictionary3 = createScheduleDictionary(this.doctorID.ToString(), today); dtScheduleID = createGetSchedule(dictionary3); scheduleID = int.Parse(dtScheduleID.Rows[0][0].ToString()); dictionary5 = createDayScheduleDictionary(this.scheduleID.ToString(), today, this.doctorID.ToString(), comboBox1.SelectedItem.ToString(), this.patientID.ToString(), lblLName.Text, lblFName.Text); dtInsert = createDaySchedule(dictionary5); ScheduleList s = new ScheduleList(); s.doctorID = this.doctorID; s.doctorName = comboBox1.SelectedItem.ToString(); s.Show(); } }
private void button4_Click(object sender, EventArgs e) { if (comboBox1.SelectedItem == null) { MessageBox.Show("No doctor has been selected"); } else { AddtoDoctorList a = new AddtoDoctorList(); a.dc = new DatabaseConnector(); dictionary4 = a.createDoctorIDDictionary(comboBox1.SelectedItem.ToString()); dtDoctorID = a.createGetDoctorID(dictionary4); doctorID = int.Parse(dtDoctorID.Rows[0][0].ToString()); ScheduleList s = new ScheduleList(); s.doctorID = this.doctorID; s.doctorName = comboBox1.SelectedItem.ToString(); s.MdiParent = this.MdiParent; s.Show(); } }