Esempio n. 1
0
    public void SubmitButton_Handler(object sender, EventArgs e)
    {
        Person p = _personList.AddNew();

        if ((p.FirstName == string.Empty) || (p.LastName == string.Empty))
        {
            MessageBox.Show("First Name and Last Name cannot be blank!");
            _personList.CancelNew(_personList.IndexOf(p));
        }
        else
        {
            ClearEntryControls();
        }
    }