private void btnEDIT_Click(object sender, EventArgs e) { var expenseTranID = Convert.ToInt32(dgExpenseTransaction.CurrentRow.Cells["ExpenseTransactionID"].Value.ToString()); if (expenseTranID == 0) { MyMessageBox.ShowBox("Please select a value from the Expense Transaction!!!"); } else { AddExpenseTransactionfrm obj = new AddExpenseTransactionfrm(expenseTranID, "EDIT"); obj.ShowDialog(); LoadDefaultValues(); } }
private void btnAdd_Click(object sender, EventArgs e) { AddExpenseTransactionfrm frm = new AddExpenseTransactionfrm(); frm.ShowDialog(); }