private void btnUpdate_Click(object sender, EventArgs e) { expense.Update(lblID, txtDes, txtAmount, dateTimeDate); expense.DisplayAll(dataGridExpense); txtAmount.Text = ""; txtDes.Text = ""; lblID.Text = ""; dateTimeDate.Value = dataAccess.Sdate; dataAccess.Description = "Updated An Expense"; dataAccess.Activities(); expense.DisplayAll(dataGridExpense); }
private void btnUpdate_Click(object sender, EventArgs e) { try { expense.Update(lblID, txtDes, txtAmount, dateTimeDate); expense.Display(dataGridExpense); Clear(); dateTimeDate.Value = dataAccess.Sdate; dataAccess.Description = "Updated An Expense"; dataAccess.Activities(); }catch (Exception ex) { MessageBox.Show(ex.Message, "Error"); } }