From 813d91dfa43fe4cea9537cd84ba56c49c82d684b Mon Sep 17 00:00:00 2001 From: Michael Bucari-Tovo Date: Fri, 20 Aug 2021 15:40:16 -0600 Subject: [PATCH] Better naming --- LibationWinForms/ProductsGrid.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LibationWinForms/ProductsGrid.cs b/LibationWinForms/ProductsGrid.cs index 238f102d..4b9f9c03 100644 --- a/LibationWinForms/ProductsGrid.cs +++ b/LibationWinForms/ProductsGrid.cs @@ -152,7 +152,7 @@ namespace LibationWinForms public void RefreshRow(string productId) { - var liveGridEntry = getRowItem((ge) => ge.AudibleProductId == productId); + var liveGridEntry = getGridEntry((ge) => ge.AudibleProductId == productId); // update GridEntry Liberate cell liveGridEntry?.NotifyPropertyChanged(nameof(liveGridEntry.Liberate)); @@ -196,7 +196,7 @@ namespace LibationWinForms #region DataGridView Macro - private GridEntry getRowItem(Func predicate) + private GridEntry getGridEntry(Func predicate) => ((SortableBindingList)gridEntryBindingSource.DataSource).FirstOrDefault(predicate); private GridEntry getGridEntry(int rowIndex) => _dataGridView.GetBoundItem(rowIndex);