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; } }
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()); } }
public Doctor(ConnectionClass connectionClass, string IDDoc) { this.IDDoc = int.Parse(IDDoc); createDoc(connectionClass); }
public Doctor(ConnectionClass connectionClass, int IDDoc) { this.IDDoc = IDDoc; createDoc(connectionClass); }
public void getDoc(ConnectionClass connectionClass) { ReferingDoctor = new Doctor(connectionClass, IDDoc); }
public AddPatientForm(ConnectionClass connectionClass, int IdDoc, string cnp) { maskedTextBoxID.Text = cnp; startForm(connectionClass, IdDoc); patientCNPDetails(null); }
public AddPatientForm(ConnectionClass connectionClass, int IdDoc) { startForm(connectionClass, IdDoc); patientCNPDetails(null); }