private void btnAddExpense_Click(object sender, EventArgs e) { Expense.title = ""; Expenses expenses = new Expenses(cbxMonths.SelectedItem.ToString()); expenses.ShowDialog(); }
private void manageExpensesToolStripMenuItem_Click(object sender, EventArgs e) { Expense.title = ""; Expenses expenses = new Expenses(); expenses.ShowDialog(); }
private void dgvExpenses_CellClick(object sender, DataGridViewCellEventArgs e) { try { int index = e.RowIndex; Expense.id = Convert.ToInt32(dgvExpenses.Rows[index].Cells["ID"].Value.ToString()); Expense.month = dgvExpenses.Rows[index].Cells["Month"].Value.ToString(); Expense.title = dgvExpenses.Rows[index].Cells["Title"].Value.ToString(); Expense.expense = Convert.ToInt32(dgvExpenses.Rows[index].Cells["Expense"].Value.ToString()); Expenses expenses = new Expenses(); expenses.ShowDialog(); } catch (Exception) { } }