예제 #1
0
        public EmployeesPage()
        {
            InitializeComponent();

            controller = new EmployeesController();
            controller.Control();

            textBoxes = new LinkedList <TextBox>();
            textBoxes.AddLast(textbox_name);
            textBoxes.AddLast(textbox_surname);
            textBoxes.AddLast(textbox_email);
            textBoxes.AddLast(textbox_phone_number);
            textBoxes.AddLast(textbox_address);
            textBoxes.AddLast(textbox_age);
            comboBox_gender.SelectedIndex = 0;

            comboBox.Items.Add("New Employee");
            if (controller.HasEmployees())
            {
                foreach (string s in controller.GetEmployeesComboBox())
                {
                    comboBox.Items.Add(s);
                }
            }
            comboBox.SelectedIndex = 0;
        }