Exemplo n.º 1
0
        public listPatient loadlist(string idPat)

        {
            pats = connector.loadListPatient(idPat);

            return(pats);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public patientControl()
 {
     data      = new patientData();
     connector = new dataBase();
     pats      = new listPatient();
 }