Exemple #1
0
        //vul combobox
        public void vulCmbZoek()
        {
            foreach (PropertyInfo propertyInfo in boek.GetType().GetProperties())
            {
                if (propertyInfo.Name != "uitgeversector_naam" && propertyInfo.Name != "zichtbaar")
                {
                    string eigenschap = propertyInfo.Name;
                    cmbZoek.Items.Add(char.ToUpper(eigenschap[0]) + eigenschap.Substring(1));
                }
            }

            cmbZoek.SelectedIndex = 0;
        }
Exemple #2
0
        //vul combobox
        public void vulCmbZoek()
        {
            switch (scherm)
            {
            case "Bestelscherm":
                foreach (PropertyInfo propertyInfo in bestelling.GetType().GetProperties())
                {
                    if (propertyInfo.Name == "id")
                    {
                        cmbZoek.Items.Add("Bestelnummer");
                    }
                    else
                    {
                        if (propertyInfo.Name != "klant_id" && propertyInfo.Name != "factuur")
                        {
                            string eigenschap = propertyInfo.Name;
                            cmbZoek.Items.Add(char.ToUpper(eigenschap[0]) + eigenschap.Substring(1));
                        }
                    }
                }
                break;

            case "Boekscherm":
                foreach (PropertyInfo propertyInfo in boek.GetType().GetProperties())
                {
                    if (propertyInfo.Name != "uitgeversector_naam" && propertyInfo.Name != "zichtbaar")
                    {
                        string eigenschap = propertyInfo.Name;
                        cmbZoek.Items.Add(char.ToUpper(eigenschap[0]) + eigenschap.Substring(1));
                    }
                }
                break;

            case "Loggingscherm":
                foreach (PropertyInfo propertyInfo in logging.GetType().GetProperties())
                {
                    if (propertyInfo.Name != "id" && propertyInfo.Name != "medewerker_id" && propertyInfo.Name != "boek_isbn_nummer" && propertyInfo.Name != "bestelling_id" && propertyInfo.Name != "klant_id")
                    {
                        cmbZoek.Items.Add(propertyInfo.Name);
                    }
                }
                break;
            }

            cmbZoek.SelectedIndex = 0;
        }