private void button1_Click(object sender, EventArgs e) { try { pointReferences(); anAgent.ID = AgentH.Add(anAgent); label_Add.Text = Convert.ToString(anAgent.ID); MessageBox.Show("Added", "Agent Data Entry", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.Message, "Data Entry Error - Unhandled", MessageBoxButtons.OK, MessageBoxIcon.Error); } }