private void ucSearch_Load(object sender, EventArgs e) { common = new CommonDal(); cbMarka.DataSource = common.GetBrandsByIdName(); cbMarka.SelectedIndex = -1; cbModel.DataSource = common.GetModelsByIdName(); cbModel.SelectedIndex = -1; cmbCity.DataSource = common.GetCityByIdName(); cmbCity.SelectedIndex = -1; }
public frmPosAd() { InitializeComponent(); common = new CommonDal(); carCrud = new CarDal(); imageCrud = new ImageDal(); cbMarka.DataSource = common.GetBrandsByIdName(); cbMarka.SelectedIndex = -1; cbBodyType.DataSource = common.GetBanTypesByIdName(); cbBodyType.SelectedIndex = -1; cbColor.DataSource = common.GetColorsByIdName(); cbColor.SelectedIndex = -1; cbFuelType.DataSource = common.GetFuelTypesByIdName(); cbFuelType.SelectedIndex = -1; cbGearBox.DataSource = common.GetGearboxTypesByIdName(); cbGearBox.SelectedIndex = -1; cbTransmission.DataSource = common.GetTansmitionTypesByIdName(); cbTransmission.SelectedIndex = -1; cbEngineCapacity.DataSource = common.GetEngineCapacitiesByIdName(); cbEngineCapacity.SelectedIndex = -1; cbCity.DataSource = common.GetCityByIdName(); cbCity.SelectedIndex = -1; }