public ActionResult DeleteConfirmed(int id) { APIRequestSet apirequestset = db.APIRequestSets.Find(id); Session["CurrentRequestSetId"] = null; Session["CurrentRequestSetName"] = null; db.APIRequestSets.Remove(apirequestset); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /RequestSet/Delete/5 public ActionResult Delete(int id = 0) { APIRequestSet apirequestset = db.APIRequestSets.Find(id); if (apirequestset == null) { return(HttpNotFound()); } return(View(apirequestset)); }
public ActionResult Edit(APIRequestSet apirequestset) { if (ModelState.IsValid) { db.Entry(apirequestset).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } Session["CurrentRequestSetId"] = apirequestset.Id; Session["CurrentRequestSetName"] = apirequestset.name; return(View(apirequestset)); }
// // GET: /RequestSet/Edit/5 public ActionResult Edit(int id = 0) { APIRequestSet apirequestset = db.APIRequestSets.Find(id); if (apirequestset == null) { return(HttpNotFound()); } Session["CurrentRequestSetId"] = apirequestset.Id; Session["CurrentRequestSetName"] = apirequestset.name; return(View(apirequestset)); }
public ActionResult Create(APIRequestSet apirequestset) { if (ModelState.IsValid) { db.APIRequestSets.Add(apirequestset); db.SaveChanges(); return(RedirectToAction("Index")); } Session["CurrentRequestSetId"] = apirequestset.Id; Session["CurrentRequestSetName"] = apirequestset.name; return(View(apirequestset)); }
// // GET: /RequestSet/Details/5 public ActionResult EditCalls(int id = 0) { APIRequestSet apirequestset = db.APIRequestSets.Find(id); if (apirequestset == null) { return(HttpNotFound()); } Session["CurrentRequestSetId"] = apirequestset.Id; Session["CurrentRequestSetName"] = apirequestset.name; return(RedirectToAction("Index", "Request")); }
// // GET: /Request/ public ActionResult Index() { if (CurrentRequestSetID != null) { APIRequestSet apirequestset = db.APIRequestSets.Find(CurrentRequestSetID); return(View(apirequestset)); } else { return(HttpNotFound()); } }