Example #1
0
        private void LoadAddStudentControl(object sender, EventArgs e)
        {
            /*
             * This function contains all code that needs to be executed when the control is first loaded
             *
             * You need to edit this code.
             * Example: Population of Comboboxes and gridviews etc.
             *
             */
            DateTime TenYearsAgo = DateTime.Today.AddYears(-10);

            dtpBirthdate.MaxDate = TenYearsAgo;

            var studentTypes = new List <String>();

            dbconn.FetchStudentTypes(studentTypes);
            cbxStudentType.Items.AddRange(studentTypes.ToArray());

            var phoneTypes = new List <String>();

            dbconn.FetchPhoneTypes(phoneTypes);
            gcbPhoneType.Items.AddRange(phoneTypes.ToArray());
        }