예제 #1
0
        public void FillColours()
        {
            var colours = ColourRepository.GetColours();

            foreach (var color in colours)
            {
                var comboBoxItem = new ComboBoxItem {
                    Text = color.ColourName, Value = color.ColourId
                };
                comboBox2.Items.Add(comboBoxItem);
            }
        }
예제 #2
0
        public AddMaterialForm()
        {
            InitializeComponent();
            GetMaterialList();

            var colors = ColourRepository.GetColours();

            foreach (var color in colors)
            {
                var item = new ComboBoxItem {
                    Text = color.ColourName, Value = color.ColourId
                };
                comboBox1.Items.Add(item);
            }
        }