public ActionResult Edit(EditSquawkViewModel viewModel) { if (ModelState.IsValid) { Squawk squawk = _dataService.GetSquawkById(viewModel.Id); squawk.Status = viewModel.Status; squawk.ResolutionNotes = viewModel.ResolutionNotes; squawk.Subject = viewModel.Subject; squawk.Description = viewModel.Description; _dataService.UpdateSquawk(squawk); return(RedirectToAction("ListActiveSquawks")); } //List<Aircraft> aircraftList = _dataService.GetAllAirplanes(); //List<Member> memberList = _dataService.GetAllMembersByRole("Admin"); //ViewBag.AircraftId = new SelectList(aircraftList, "Id", "Name", squawk.AircraftId); //ViewBag.OriginatorId = new SelectList(memberList, "Id", "Status", squawk.PostedById); return(View(viewModel)); }