public FormSN(INapravlenie logic) { InitializeComponent(); List <NapravlenieVM> list = logic.Read(null); if (list != null) { comboBoxName.DisplayMember = "NapravlenieName"; comboBoxName.ValueMember = "Id"; comboBoxName.DataSource = list; comboBoxName.SelectedItem = null; comboBoxNumber.DisplayMember = "Number"; comboBoxNumber.ValueMember = "Id"; comboBoxNumber.DataSource = list; comboBoxNumber.SelectedItem = null; } }
public FormNapravlenie(INapravlenie logic) { InitializeComponent(); this.logic = logic; }