コード例 #1
0
        private void SetComboBoxes()
        {
            List <string> GetComboBoxList(List <string> list)
            {
                var result = new List <string>()
                {
                    "Все"
                };

                result.AddRange(list);
                return(result);
            }

            accountingTypeComboBox.DataSource = GetComboBoxList(crudService.GetAllAccountingTypes().ToList());
            storeComboBox.DataSource          = GetComboBoxList(crudService.GetAllStores().ToList());
            finSourceComboBox.DataSource      = GetComboBoxList(crudService.GetAllFinSources().ToList());
            producerComboBox.DataSource       = GetComboBoxList(crudService.GetAllProducers().ToList());
        }