public void TestCreateDoctorIDDictionary()
 {
     AddtoDoctorList a = new AddtoDoctorList();
     Assert.IsNotNull(a);
     Dictionary<String, String> dic;
     String name = "John Smith";
     dic = a.createDoctorIDDictionary(name);
     Assert.IsNotNull(dic);
     Assert.IsTrue(dic.ContainsKey("@name"));
     Assert.AreSame (dic["@name"], name);
 }
Esempio n. 2
0
 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();
     }
 }
Esempio n. 3
0
 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();
     }
 }