示例#1
0
        private void BtnCreateNewPerson_Click(object sender, EventArgs e)
        {
            string sex = "";

            if (MaleRadioButton1.Checked)
            {
                sex = "Male";
            }
            if (FemaleRadioButton2.Checked)
            {
                sex = "Female";
            }

            Person p = new Person(textBoxNameNewPerson.Text, sex);

            p.DateOfBirth = dateTimePicker1.Value;
            StaticAlbum.AddNewPerson(p);
            lblPersoninfo3.Text = p.GetPersonInfo();
            UpdateListBoxFeatures();
            UpdatePeopoleListBox();
        }