Example #1
0
        //vul combobox
        public void vulCmbZoek()
        {
            if (scherm == "Bestelscherm")
            {
                foreach (PropertyInfo propertyInfo in klant.GetType().GetProperties())
                {
                    if (propertyInfo.Name != "id")
                    {
                        string eigenschap = propertyInfo.Name;
                        cmbZoek.Items.Add(char.ToUpper(eigenschap[0]) + eigenschap.Substring(1));
                    }
                }
                cmbZoek.SelectedIndex = 0;
            }

            if (scherm == "Loggingscherm")
            {
                foreach (PropertyInfo propertyInfo in medewerker.GetType().GetProperties())
                {
                    if (propertyInfo.Name != "id")
                    {
                        string eigenschap = propertyInfo.Name;
                        cmbZoek.Items.Add(char.ToUpper(eigenschap[0]) + eigenschap.Substring(1));
                    }
                }
                cmbZoek.SelectedIndex = 0;
            }
        }