public void TestCreateDayScheduleDictionary() { AddtoDoctorList a = new AddtoDoctorList(); Assert.IsNotNull(a); Dictionary<String, String> dic; //string scheduleID, String date, String doctorID, String doctorName, String patientID, string lastName, string firstName string scheduleID = "1"; string date = "12/1/2013"; string doctorID = "1"; string doctorName = "John Smith"; string patientID = "1"; string lastName = "Do"; string firstName = "Tram"; dic = a.createDayScheduleDictionary(scheduleID, date, doctorID, doctorName, patientID, lastName, firstName); Assert.IsNotNull(dic); Assert.IsTrue(dic.ContainsKey("@scheduleID")); Assert.IsTrue(dic.ContainsKey("@today")); Assert.IsTrue(dic.ContainsKey("@doctorID")); Assert.IsTrue(dic.ContainsKey("@doctorName")); Assert.IsTrue(dic.ContainsKey("@patientID")); Assert.IsTrue(dic.ContainsKey("@lastName")); Assert.IsTrue(dic.ContainsKey("@firstName")); Assert.AreSame(dic["@scheduleID"], scheduleID); Assert.AreSame(dic["@today"], date); Assert.AreSame(dic["@doctorID"], doctorID); Assert.AreSame(dic["@doctorName"], doctorName); Assert.AreSame(dic["@patientID"], patientID); Assert.AreSame(dic["@lastName"], lastName); Assert.AreSame(dic["@firstName"], firstName); }
private void btnExpPt_Click(object sender, EventArgs e) { AddtoDoctorList a = new AddtoDoctorList(); a.patientID = this.patientId; a.MdiParent = this.MdiParent; a.Show(); }
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); }
public void TestCreatePatientDictionary() { AddtoDoctorList a = new AddtoDoctorList(); Assert.IsNotNull(a); Dictionary<String, String> dic; String patientID = "1"; dic = a.createPatientDictionary(patientID); Assert.IsNotNull(dic); Assert.IsTrue(dic.ContainsKey("@patientId")); Assert.AreSame(dic["@patientId"], patientID); }
public void TestCreateDoctorNameDictionary() { AddtoDoctorList a = new AddtoDoctorList(); Assert.IsNotNull(a); Dictionary<String, String> dic; String date = "12/1/2013"; dic = a.createDoctorNameDictionary(date); Assert.IsNotNull(dic); Assert.IsTrue(dic.ContainsKey("@date")); Assert.AreSame(dic["@date"], date); }
public PatientSearch() { InitializeComponent(); AddtoDoctorList a = new AddtoDoctorList(); a.dc = new DatabaseConnector(); dictionary2 = a.createDoctorNameDictionary(today); dtDoctorName = a.createGetDoctorName(dictionary2); for (int i = 0; i < dtDoctorName.Rows.Count; i++) { comboBox1.Items.Add(dtDoctorName.Rows[i][0].ToString()); } }
public SearchPatient() { InitializeComponent(); AddtoDoctorList a = new AddtoDoctorList(); a.dc = new DatabaseConnector(); dictionary2 = a.createDoctorNameDictionary(today); dtDoctorName = a.createGetDoctorName(dictionary2); for (int i = 0; i < dtDoctorName.Rows.Count; i++) comboBox1.Items.Add(dtDoctorName.Rows[i][0].ToString()); ; }
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(); } }
public void TestMethod1() { AddtoDoctorList a = new AddtoDoctorList(); Assert.IsNotNull(a); }
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(); } }