private void loadCarModel() { lvCarModel.Items.Clear(); lvCarModel.SuspendLayout(); carList = new List <clsCar>(); clsCar clscar = new clsCar(); carList = clscar.GetCarList(); foreach (clsCar car in carList) { ListViewItem oItem = new ListViewItem(); oItem.Text = car.Code; oItem.SubItems.Add(car.Name); oItem.SubItems.Add(car.Status.ToString()); oItem.Tag = car; lvCarModel.Items.Add(oItem); } tsslCarModelCount.Text = "Row Count: " + lvCarModel.Items.Count; lvCarModel.ResumeLayout(); }
private void loadCarModel() { lvCarModel.Items.Clear(); lvCarModel.SuspendLayout(); List <clsCar> list = new List <clsCar>(); clsCar oCar = new clsCar(); list = oCar.GetCarList(); foreach (clsCar car in list) { ListViewItem oItem = new ListViewItem(); oItem.Text = car.Code; oItem.SubItems.Add(car.Name); oItem.ImageKey = "folder"; oItem.Tag = car; lvCarModel.Items.Add(oItem); } lvCarModel.ResumeLayout(); }
private void loadCarModel() { cmbCarModel.Items.Clear(); List <clsCar> carList = new List <clsCar>(); clsCar carClass = new clsCar(); carList = carClass.GetCarList(); foreach (clsCar oCar in carList) { clsComboboxItem oItem = new clsComboboxItem(); oItem.Text = oCar.Name; oItem.Value = oCar; cmbCarModel.Items.Add(oItem); } }