public void DoctorSaveTest()
        {
            string lastName  = GenString(_r.Next(4, 9));
            string firstName = GenString(_r.Next(4, 9));

            OpenConnection();

            Credentials c = new Credentials(lastName + firstName + "@testDoc.com", Utils.Encrypter.GetMD5("0000"), Utils.UserTypes.DOCTOR);
            Doctor      d = new Doctor(credentialsService.Save(c), lastName, firstName, departmentService.FindAll()[0].Id, "85643213", Utils.DoctorStatus.ACTIVE);

            doctorService.Save(d);

            Assert.IsNotNull(doctorService.FindAllByProperty(Utils.DoctorTableProperties.LastName, d.LastName));

            CloseConnection();
        }
        private void PopulateDoctorsList(int departmentId)
        {
            _doctorService = new DoctorService();
            List <Doctor> doctors = _doctorService.FindAllByProperty("id_dept", departmentId.ToString());
            ComboBoxItem  cmb;

            if (doctors != null)
            {
                foreach (Doctor d in doctors)
                {
                    cmb         = new ComboBoxItem();
                    cmb.Content = d.FirstName + " " + d.LastName;
                    cmb.Tag     = d.Id;
                    comboBoxDoctors.Items.Add(cmb);
                }
                comboBoxDoctors.IsEnabled = true;
            }
        }
 private void PopulateDoctorsList(int departmentId)
 {
     _doctorService = new DoctorService();
     List<Doctor> doctors = _doctorService.FindAllByProperty("id_dept", departmentId.ToString());
     ComboBoxItem cmb;
     if (doctors != null)
     {
         foreach (Doctor d in doctors)
         {
             cmb = new ComboBoxItem();
             cmb.Content = d.FirstName + " " + d.LastName;
             cmb.Tag = d.Id;
             comboBoxDoctors.Items.Add(cmb);
         }
         comboBoxDoctors.IsEnabled = true;
     }
 }