Beispiel #1
0
        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) { }
        }