private void ItemForm_Load(object sender, EventArgs e) { uow = new EfUnitOfWork(); comboBoxBrand.SelectedIndexChanged -= comboBoxBrand_SelectedIndexChanged; UiHelper.LoadBrands(comboBoxBrand); comboBoxBrand.SelectedIndexChanged += comboBoxBrand_SelectedIndexChanged; UiHelper.LoadAgents(comboBoxAgent); UiHelper.LoadConditions(comboBoxCondition); UiHelper.LoadLocations(comboBoxLocation); UiHelper.LoadItems(dataGridViewItems); }
static UiHelper() { if (uow == null) uow = new EfUnitOfWork(); }