private void btnOK_Click(object sender, EventArgs e) { if (ValidateChildren() == false) { return; } UpdateTransport(transport); if (createNew) { TransportDAO.Add(transport); } else { TransportDAO.Edit(transport); } }