103
reader = command.ExecuteReader();
if (reader.HasRows)
{
while (reader.Read())
{
Patient temp = new Patient();
temp.Id = reader.GetInt32(0);
temp.namePatient = reader.GetString(1);
temp.surname = reader.GetString(2);
temp.patronymic = reader.GetString(3);
temp.age = reader.GetInt32(4);
temp.passport = reader.GetString(5);
temp.phone = reader.GetString(6);
//не работает загрузка даты регистрации
PatientDataGrid.Items.Add(temp);
}
}
//загрузкарасписания
sqlExpression = "SELECT [Reception].[Id_Reception],
[Reception].[doctor], [Doctor].[nameDoctor], [Doctor].[surname],
[Doctor].[patronymic], [Reception].[patient], [Patient].[namePatient],
[Patient].[surname], [Patient].[patronymic], [Reception].[procedure],
[Procedure].[nameProcedure], [Reception].[begin_reception], [Reception].[status],
[Reception].[price] FROM (([Reception] LEFT JOIN [Doctor] ON
[Reception].[doctor] = [Doctor].[Id_doc]) LEFT JOIN [Patient] ON
[Reception].[patient] = [Patient].[Id_patient]) LEFT JOIN [Procedure] ON
[Reception].[procedure] = [Procedure].[Id_Procedure]";
command = new SqlCommand(sqlExpression, connection);