예제 #1
0
        private void addNewStylistButton_Click_1(object sender, EventArgs e)
        {
            StylistForm form = new StylistForm();

            form.ShowDialog();
            if (form.DialogResult == DialogResult.OK)
            {
                stylists.Add(form.GetStylist());
                StylistListBox.Items.Add(form.GetStylist());
            }
        }
예제 #2
0
        private void editStylistButton_Click(object sender, EventArgs e)
        {
            Stylist     stylist = (Stylist)StylistListBox.SelectedItem;
            StylistForm form    = new StylistForm(stylist);

            form.ShowDialog();
            if (form.DialogResult == DialogResult.OK)
            {
                StylistListBox.Items.Clear();
                foreach (Stylist stylistA in stylists)
                {
                    StylistListBox.Items.Add(stylistA);
                }
            }
        }