public listDoctor loadListDoctor(string idDoctor) { listDoctor doctors = new listDoctor(); if (idDoctor != "") { command.CommandText = "Select * from [doctor] where [Код] = " + idDoctor; } else { command.CommandText = "Select * from [doctor]"; } using (OleDbDataReader reader = command.ExecuteReader()) { while (reader.Read()) { doctorData doct = new doctorData(); doct.Id = reader.GetValue(0).ToString().Trim(); doct.Surname = reader.GetValue(2).ToString().Trim(); doct.Name = reader.GetValue(3).ToString().Trim(); doct.MiddleName = reader.GetValue(4).ToString().Trim(); doctors.Add(doct); } } return(doctors); }
public doctor(string _idUser) { InitializeComponent(); idUser = _idUser; connect = new dataBase(); docs = new doctorData(); doc = new doctorControl(connect, docs); }
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 doctorData loadDoctorDataByID(string idDoctor) { doctorData doct = new doctorData(); try { command.CommandText = "Select [Post] from [doctor] where [Код] = " + idDoctor; using (OleDbDataReader reader = command.ExecuteReader()) { reader.Read(); doct.Position = reader.GetValue(0).ToString().Trim(); } } catch { } return(doct); }
bool regNewUser() { user newUser = new user(); doctorData doc = new doctorData(); newUser.Sex = checkBox4.Checked == true ? "0" : "1"; newUser.Type = checkBox1.Checked == true ? "1" : "2"; newUser.Surname = textBox1.Text; newUser.Name = textBox2.Text; newUser.MiddleName = textBox3.Text; newUser.BirthDay = dateTimePicker1.Value.ToShortDateString(); doc.Position = textBox7.Text; newUser.NumberP = textBox6.Text; newUser.Login = textBox5.Text; newUser.Password = textBox4.Text; return(connector.regNewUser(newUser)); }
public void Add(doctorData pat) { doctors.Add(pat); }
public doctorControl(dataBase _connector, doctorData _data) { data = _data; connector = _connector; }
public orderData() { Patient = new patientData(); Doctor = new doctorData(); }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { doctorData doct = connector.loadDoctorDataByID(idDoctors[comboBox1.SelectedIndex]); textBox4.Text = doct.Position; }