Esempio n. 1
0
        public ConsultationsForm(ConnectionClass connectionClass, Patient selectedPatient)
        {
            InitializeComponent();

            this.connectionClass = connectionClass;
            this.selectedPatient = selectedPatient;
            labelPatient.Text    = selectedPatient.Name + " " + selectedPatient.LastName;

            currentConsultation = connectionClass.getLastConsultation();
            cims = connectionClass.getListCIM();
            createAutoSuggest();
            emptyFields();
            clickedAdd();
            updateDataGrid();
            if (consultations == null || consultations.Count == 0)
            {
                buttonModify.Enabled = false;
                buttonRemove.Enabled = false;
                buttonReport.Enabled = false;
            }
        }
Esempio n. 2
0
 private void createDoc(ConnectionClass connectionClass)
 {
     try
     {
         string          query     = "select * from doctors WHERE IDDoc=" + IDDoc;
         MySqlDataReader rowReader = connectionClass.execReader(query);
         if (rowReader.HasRows)
         {
             while (rowReader.Read())
             {
                 UserName = rowReader["username"].ToString();
                 Password = rowReader["password"].ToString();
                 Name     = rowReader["name"].ToString();
                 LastName = rowReader["lastname"].ToString();
             }
             rowReader.Close();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Esempio n. 3
0
 public Doctor(ConnectionClass connectionClass, string IDDoc)
 {
     this.IDDoc = int.Parse(IDDoc);
     createDoc(connectionClass);
 }
Esempio n. 4
0
 public Doctor(ConnectionClass connectionClass, int IDDoc)
 {
     this.IDDoc = IDDoc;
     createDoc(connectionClass);
 }
Esempio n. 5
0
 public void getDoc(ConnectionClass connectionClass)
 {
     ReferingDoctor = new Doctor(connectionClass, IDDoc);
 }
Esempio n. 6
0
 public AddPatientForm(ConnectionClass connectionClass, int IdDoc, string cnp)
 {
     maskedTextBoxID.Text = cnp;
     startForm(connectionClass, IdDoc);
     patientCNPDetails(null);
 }
Esempio n. 7
0
 public AddPatientForm(ConnectionClass connectionClass, int IdDoc)
 {
     startForm(connectionClass, IdDoc);
     patientCNPDetails(null);
 }