Exemplo n.º 1
0
        public void LoadData()
        {
            _patients = DbConnector.GetInstance().GetPatientList();
            _docs     = DbConnector.GetInstance().GetStaffList();
            PatientBox.Items.Clear();
            PatientBox.BeginUpdate(); _patients.ForEach(x => PatientBox.Items.Add(x.Name));
            PatientBox.EndUpdate(); PatientBox.Text = _patients[0].Name;
            DoctorBox.Items.Clear();
            DoctorBox.BeginUpdate(); _docs.ForEach(x => DoctorBox.Items.Add(x.Name));
            DoctorBox.EndUpdate(); DoctorBox.Text = _docs[0].Name;



            List <string> years = DbConnector.GetInstance().GetDiseaseYears();

            StartYearBox.Items.Clear();
            StartYearBox.BeginUpdate();
            years.ForEach(x => StartYearBox.Items.Add(x));
            StartYearBox.EndUpdate(); StartYearBox.SelectedIndex = 0;

            EndYearBox.Items.Clear();
            EndYearBox.BeginUpdate();
            years.ForEach(x => EndYearBox.Items.Add(x));
            EndYearBox.EndUpdate(); EndYearBox.SelectedIndex = 0;
        }
Exemplo n.º 2
0
 public AddSession(CardModel card)
 {
     InitializeComponent();
     _card  = card;
     _procs = DbConnector.GetInstance().GetProceduresList();
     _docs  = DbConnector.GetInstance().GetStaffList();
     ProcedureBox.BeginUpdate();
     _procs.ForEach(x => ProcedureBox.Items.Add(x.Name));
     ProcedureBox.EndUpdate();
     DoctorBox.BeginUpdate();
     _docs.ForEach(x => DoctorBox.Items.Add(x.Name));
     DoctorBox.EndUpdate();
 }
Exemplo n.º 3
0
 public AddCard(PatientModel patient)
 {
     InitializeComponent();
     _patient       = patient;
     TopLabel.Text += " " + _patient.Name;
     _docs          = DbConnector.GetInstance().GetStaffList();
     _types         = DbConnector.GetInstance().GetDiseaseTypes();
     DoctorBox.BeginUpdate();
     _docs.ForEach(x => DoctorBox.Items.Add(x.Name));
     DoctorBox.EndUpdate();
     DoctorBox.Text = _docs[0].Name;
     TypeBox.BeginUpdate();
     _types.ForEach(x => TypeBox.Items.Add(x.Name));
     TypeBox.EndUpdate();
     TypeBox.Text = _types[0].Name;
 }