// GET: Inventory public ActionResult Index() { ViewBag.Title = "Current Parts Inventory"; var parts = from p in _partManager.RetrieveAllParts() select p; PartListViewModel partListView = new PartListViewModel { Part = parts.ToList() }; return(View(partListView)); }
} // End DgPartList_MouseDoubleClick() private void populatePartList() { try { dgPartList.ItemsSource = _partManager.RetrieveAllParts(); dgPartList.Columns.Remove(dgPartList.Columns[6]); dgPartList.Columns.Remove(dgPartList.Columns[5]); dgPartList.Columns.Remove(dgPartList.Columns[4]); dgPartList.Columns[0].Header = "Part Number"; dgPartList.Columns[1].Header = "Location"; dgPartList.Columns[2].Header = "Description"; dgPartList.Columns[3].Header = "Quantity"; } catch (Exception ex) { MessageBox.Show(ex.Message + "\n\n" + ex.InnerException.Message); } } // End populatePartList()