diff --git a/ProjectLibrary/Forms/FBooks.cs b/ProjectLibrary/Forms/FBooks.cs index 91e6c78..a4b82b6 100644 --- a/ProjectLibrary/Forms/FBooks.cs +++ b/ProjectLibrary/Forms/FBooks.cs @@ -20,6 +20,7 @@ namespace ProjectLibrary.Forms // Привязывает к DataGridView коллекцию книг, полученную из репозитория. // Устанавливает источник данных DataGridView (dataGridViewBooks) как список объектов из ReadBooks(). dataGridViewBooks.DataSource = _bookRepository.ReadBooks(); + dataGridViewBooks.Columns["Id"].Visible = false; } private bool TryGetIdentifierFromSelectedRow(out int id) diff --git a/ProjectLibrary/Forms/FLibraries.cs b/ProjectLibrary/Forms/FLibraries.cs index 499a120..3318dce 100644 --- a/ProjectLibrary/Forms/FLibraries.cs +++ b/ProjectLibrary/Forms/FLibraries.cs @@ -85,6 +85,7 @@ namespace ProjectLibrary.Forms private void LoadList() { dataGridViewOrders.DataSource = _libraryRepository.ReadLibraries(); + dataGridViewOrders.Columns["Id"].Visible = false; } private bool TryGetIdentifierFromSelectedRow(out int id) { diff --git a/ProjectLibrary/Forms/FLibrary.cs b/ProjectLibrary/Forms/FLibrary.cs index 8a3676a..20356bb 100644 --- a/ProjectLibrary/Forms/FLibrary.cs +++ b/ProjectLibrary/Forms/FLibrary.cs @@ -41,7 +41,7 @@ namespace ProjectLibrary.Forms _libraryRepository = libraryRepository ?? throw new ArgumentNullException(nameof(libraryRepository)); Book.DataSource = bookRepository.ReadBooks(); - Book.DisplayMember = "Name"; + Book.DisplayMember = "NameTypeBookID"; Book.ValueMember = "Id"; } diff --git a/ProjectLibrary/Forms/FOrder.cs b/ProjectLibrary/Forms/FOrder.cs index 7da78a2..35f567c 100644 --- a/ProjectLibrary/Forms/FOrder.cs +++ b/ProjectLibrary/Forms/FOrder.cs @@ -21,7 +21,7 @@ namespace ProjectLibrary.Forms comboBox.ValueMember = "Id"; Book.DataSource = bookRepository.ReadBooks(); - Book.DisplayMember = "Name"; + comboBox.DisplayMember = "NameTypeBookID"; Book.ValueMember = "Id"; } diff --git a/ProjectLibrary/Forms/FOrders.cs b/ProjectLibrary/Forms/FOrders.cs index e720877..49603e7 100644 --- a/ProjectLibrary/Forms/FOrders.cs +++ b/ProjectLibrary/Forms/FOrders.cs @@ -18,6 +18,9 @@ namespace ProjectLibrary.Forms private void LoadList() { dataGridViewOrders.DataSource = _orderRepository.ReadOrders(); + dataGridViewOrders.Columns["Id"].Visible = false; + dataGridViewOrders.Columns["OrderDate"].DefaultCellStyle.Format = "dd.MM.yyyy"; + dataGridViewOrders.Columns["ReturnDate"].DefaultCellStyle.Format = "dd.MM.yyyy"; } private void buttonAdd_Click(object sender, EventArgs e) diff --git a/ProjectLibrary/Forms/FReaders.cs b/ProjectLibrary/Forms/FReaders.cs index 4d8b770..42bff89 100644 --- a/ProjectLibrary/Forms/FReaders.cs +++ b/ProjectLibrary/Forms/FReaders.cs @@ -19,6 +19,7 @@ namespace ProjectLibrary.Forms private void LoadList() { dataGridViewReaders.DataSource = _readerRepository.ReadReaders(); + dataGridViewReaders.Columns["Id"].Visible = false; } private void FReaders_Load(object sender, EventArgs e) { diff --git a/ProjectLibrary/Forms/FTiclet_Extensions.cs b/ProjectLibrary/Forms/FTiclet_Extensions.cs index 858fec3..76f6be6 100644 --- a/ProjectLibrary/Forms/FTiclet_Extensions.cs +++ b/ProjectLibrary/Forms/FTiclet_Extensions.cs @@ -62,6 +62,9 @@ namespace ProjectLibrary.Forms private void LoadList() { dataGridView.DataSource = _ticketRepository.ReadTicketExtensions(); + dataGridView.Columns["Id"].Visible = false; + dataGridView.Columns["LastUpdateDate"].DefaultCellStyle.Format = "dd MMMM yyyy"; + dataGridView.Columns["NextUpdateDate"].DefaultCellStyle.Format = "dd MMMM yyyy"; } private bool TryGetIdentifierFromSelectedRow(out int id) {