public ActionResult LocoEditNew(FormCollection frmcollection) { LocomotiveViewModel vm = new LocomotiveViewModel(); if (ModelState.IsValid) { } return(View(vm)); }
private void FillLocomotivesAndSections(IEnumerable <ILocomotive> locomotives) { _locomotives = new ObservableCollection <ILocomotiveViewModel>(); foreach (var locomotive in locomotives) { var loco = new LocomotiveViewModel(locomotive); _locomotives.Add(loco); for (int i = 0; i < locomotive.Sections.Count; i++) { Sections.Add(new SectionViewModel(locomotive.Sections[i], i + 1, loco)); } } }