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();
            }
        }
        public void TestCreateDoctorDayScheduleDictionary()
        {
            ScheduleList s = new ScheduleList();
            Assert.IsNotNull(s);
            Dictionary<String, String> dic;
            string date = "12/2/2013";
            string doctorID = "1";
            dic = s.createDoctorDayScheduleDictionary(date, doctorID);
            Assert.IsNotNull(dic);
            Assert.IsTrue(dic.ContainsKey("@date"));
            Assert.IsTrue(dic.ContainsKey("@doctorID"));
            Assert.AreSame(dic["@date"], date);
            Assert.AreSame(dic["@doctorID"], doctorID);

        }
Exemple #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.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();

            }

        }
 public void TestMethod1()
 {
     ScheduleList s = new ScheduleList();
     Assert.IsNotNull(s);
 }
 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();
     }
 }