public listPatient loadListPatient(string numberP) { listPatient patients = new listPatient(); if (numberP != "") { command.CommandText = "Select * from [patient] where [NumberP] = '" + numberP + "'"; } else { command.CommandText = "Select * from [patient]"; } using (OleDbDataReader reader = command.ExecuteReader()) { while (reader.Read()) { patientData pat = new patientData(); pat.Id = reader.GetValue(0).ToString().Trim(); pat.Surname = reader.GetValue(2).ToString().Trim(); pat.Name = reader.GetValue(3).ToString().Trim(); pat.MiddleName = reader.GetValue(4).ToString().Trim(); patients.Add(pat); } } return(patients); }
public patientData loadPatientByID(string idPatient, string idUser) { patientData pat = new patientData(); try { command.CommandText = "Select * from [patient]"; if (idPatient != "") { command.CommandText += " where [Код] = " + idPatient + ";"; } else { command.CommandText += " where [idUser] = " + idUser; } using (OleDbDataReader reader = command.ExecuteReader()) { reader.Read(); pat.Id = reader.GetValue(0).ToString().Trim(); pat.Surname = reader.GetValue(2).ToString().Trim(); pat.Name = reader.GetValue(3).ToString().Trim(); pat.MiddleName = reader.GetValue(4).ToString().Trim(); pat.Sex = reader.GetValue(6).ToString().Trim() == "0" ? "Муж" : "Жен"; pat.BirthDay = reader.GetValue(5).ToString().Trim(); pat.NumberOfPolicy = reader.GetValue(7).ToString().Trim(); } } catch { } return(pat); }
public visitData() { recomendation = new recommendation(); obsl = new obslData(); diagnose = new diagnoseData(); symptom = new symptoms(); doc = new doctorData(); pat = new patientData(); doctorInfo = doc.Surname + " " + doc.Name + " " + doc.MiddleName; }
public patient(string _idUser, dataBase _connector) { InitializeComponent(); connector = _connector; patientData patient = connector.loadPatientByID("", _idUser); textBox1.Text = patient.ToString(); textBox2.Text = patient.Sex; textBox3.Text = patient.NumberOfPolicy; }
public contraindications(string _idPatient, int type, dataBase _d, contraindicationsData _dat) { InitializeComponent(); idPatient = new patientData(); idPatient.Id = _idPatient; d = _d; data = _dat; cont = new ContraindicationsControl(data, d, _idPatient); if (type == 2) { textBox1.ReadOnly = true; textBox2.ReadOnly = true; button1.Visible = false; button2.Visible = false; } }
public patientControl() { data = new patientData(); connector = new dataBase(); pats = new listPatient(); }
public void Add(patientData pat) { patients.Add(pat); }
public contraindicationsData() { pat = new patientData(); }
public orderData() { Patient = new patientData(); Doctor = new doctorData(); }
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e) { patientData pat = connector.loadPatientByID(idPatients[comboBox2.SelectedIndex], ""); textBox2.Text = pat.NumberOfPolicy; }