Beispiel #1
0
        private void Form1_MouseClick(object sender, MouseEventArgs e)
        {
            Staff newStaff = new Staff();
            newStaff.firstName = FirstNameLabel.Text;
            newStaff.lastName = LastNameLabel.Text;
            staffList.Add(newStaff);

            source.ResetBindings(true);
        }
Beispiel #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            Staff newStaff = new Staff();
            newStaff.firstName = FirstNameLabel.Text;
            newStaff.lastName = LastNameLabel.Text;
            if(newStaff.lastName != "LastName")
            staffList.Add(newStaff);

            source.ResetBindings(true);
        }