public ActionResult Edit(VMRequest vmrequest) { if (ModelState.IsValid) { db.Entry(vmrequest).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.RequestStatus = new SelectList(db.RequestStatus, "Id", "Name", vmrequest.RequestStatus); ViewBag.TemplateId = new SelectList(db.VMTemplates, "Id", "UniqueName", vmrequest.TemplateId); return(View(vmrequest)); }
public ActionResult Edit(VMTemplate vmtemplate) { if (ModelState.IsValid) { db.Entry(vmtemplate).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(vmtemplate)); }
public ActionResult Edit(VMOutput vmoutput) { if (ModelState.IsValid) { db.Entry(vmoutput).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.VMTemplateId = new SelectList(db.VMTemplates, "Id", "UniqueName", vmoutput.VMTemplateId); ViewBag.VMRequestId = new SelectList(db.VMRequests, "Id", "DisplayName", vmoutput.VMRequestId); return(View(vmoutput)); }