private void Button_change_Click(object sender, EventArgs e) { Payment newPayment = new Payment(Int32.Parse(textBox_amount.Text), DateTime.Parse(datetime_due_date.Text), textBox_description.Text, Boolean.Parse(comboBox_paid.Text.Equals("Yes") ? "true" : "false")); if (payment.Equals(newPayment)) { MessageBox.Show("Nothing has changed."); return; } controller.Change(payment, newPayment); payment = newPayment; MessageBox.Show("Payment has changed"); }