Facebook
From Walloping Kangaroo, 7 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 281
  1. public static void HowManyRecords(SqlConnection sqlConnection, DataGridView dataGridView,string limitOfRecords)
  2.         {
  3.             SqlDataAdapter sqlDataAdapter = new SqlDataAdapter($@"
  4.             SELECT TOP '{limitOfRecords}' Patients.Name AS Imię, Patients.Surname AS Nazwisko, Age AS Wiek,
  5.                 Rooms.RoomNumber AS 'Numer pokoju', Doctors.Name AS 'Imię lekarza',
  6.                 Doctors.Surname AS 'Nazwisko lekarza'
  7.             FROM Patients JOIN Rooms ON RoomID = Rooms.ID
  8.                           JOIN Doctors ON DoctorID = Doctors.ID", sqlConnection);
  9.             FillDataGridView(sqlDataAdapter, dataGridView);
  10.         }