private void btnAdd_Click(object sender, EventArgs e) { Car car = new Car(); fCar ft = new fCar(car); if (ft.ShowDialog() == DialogResult.OK) { bindSrcCars.Add(car); } }
private void btnEdit_Click(object sender, EventArgs e) { Car car = (Car)bindSrcCars.List[bindSrcCars.Position]; fCar ft = new fCar(car); if (ft.ShowDialog() == DialogResult.OK) { bindSrcCars.List[bindSrcCars.Position] = car; } }