private void FillMagazineList() { OMagazineGet magazineGet = new OMagazineGet(); magazineGet.Execute(); magazineList = magazineGet.MagazineList.OrderBy(x => x.MagazineName).ToList(); lvwMagazine.Items.Clear(); if (magazineList != null) { int i = 1; foreach (Magazine obj in magazineList) { string[] row = { i.ToString(), obj.MagazineName }; ListViewItem item = new ListViewItem(row) { Tag = obj }; lvwMagazine.Items.Add(item); i++; } } lvwMagazine.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); }
private void FillMagazineList() { OMagazineGet magazineGet = new OMagazineGet(); magazineGet.Execute(); magazineList = magazineGet.MagazineList.OrderBy(x => x.MagazineName).ToList(); PopulateMagazineList(magazineList); }
private void FillMagazineList() { OMagazineGet get = new OMagazineGet(); get.Execute(); List <Magazine> magazineList = get.MagazineList; if (magazineList != null) { int i = 1; foreach (Magazine obj in get.MagazineList) { string[] row = { i.ToString(), obj.MagazineName }; ListViewItem item = new ListViewItem(row) { Tag = obj }; lvwMagazine.Items.Add(item); i++; } } ResizeColumns(lvwMagazine); }