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 listDoctor loadlist(string idDoctor) { docs = connector.loadListDoctor(idDoctor); return(docs); }
public doctorControl(dataBase _connector, listDoctor _list) { connector = _connector; docs = _list; }