private void buttonUpdateExpenses_Click(object sender, EventArgs e) { expense = ExpensesModel.SelectAll(); if (expense.Count != 0) { var index = dataGridViewExpenses.CurrentRow.Index; UpdatePriceExpenses updatePrice = new UpdatePriceExpenses(); updatePrice.eModel = expense[index]; updatePrice.ShowDialog(); ShowExpenses(); Show(); } else { MessageBox.Show("Таблица пустая"); } }
private void ShowExpenses() { expense = ExpensesModel.SelectAll(); dataGridViewExpenses.DataSource = expense; }