예제 #1
0
 private void Cr_doctors_SelectedDatesChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         string[] workingHouse  = dbconn.selectFromWhereTwo("WorkingHours", "Schedule", "DoctorIdentity", doctorIdentity[cb_name.SelectedValue.ToString()], "DayOfWork", cr_doctors.SelectedDates[0].ToString("d"));
         string[] cabinetNumber = dbconn.selectFromWhereTwo("CabinetNumber", "Schedule", "DoctorIdentity", doctorIdentity[cb_name.SelectedValue.ToString()], "DayOfWork", cr_doctors.SelectedDates[0].ToString("d"));
         if ((workingHouse.Length > 0) && (cabinetNumber.Length > 0))
         {
             tb_workingHouse.Text  = workingHouse[0];
             tb_cabinetNumber.Text = cabinetNumber[0];
         }
     }
     catch
     {
     }
 }
예제 #2
0
        private void init()
        {
            string[] patients = dbconn.selectFromWhereTwo("PolicyNumber", "Appointments", "DoctorIdentity", identity, "AppointmentDate", date);
            foreach (string patient in patients)
            {
                cb_policyNumber.Items.Add(patient);
            }
            cb_hospital.Items.Add("Да");
            cb_hospital.Items.Add("Нет");

            string[] speciality = dbconn.selectFrom("Speciality", "Specialties");
            foreach (string s in speciality)
            {
                cb_directions.Items.Add(s);
            }
        }