private void RefreshItems(object sender, EventArgs e) { var biz = new VehicleBiz(); dataGridView.DataSource = biz.LoadItems(); dataGridView.Refresh(); }
public VehicleView(User user) { InitializeComponent(); dataGridView.AutoGenerateColumns = false; var biz = new VehicleBiz(); dataGridView.DataSource = biz.LoadItems(); dataGridView.Refresh(); currentUser = user; }
private void LoadVehicle() { var biz = new VehicleBiz(); var items = biz.LoadItems(); items.Insert(0, new Vehicle()); drlVehicle.Items.Clear(); drlVehicle.DataSource = items; drlVehicle.DisplayMember = "Name"; drlVehicle.ValueMember = "Id"; }