コード例 #1
0
        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"));
        }
コード例 #2
0
        //
        // GET: /RequestSet/Delete/5

        public ActionResult Delete(int id = 0)
        {
            APIRequestSet apirequestset = db.APIRequestSets.Find(id);

            if (apirequestset == null)
            {
                return(HttpNotFound());
            }
            return(View(apirequestset));
        }
コード例 #3
0
 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));
 }
コード例 #4
0
        //
        // 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));
        }
コード例 #5
0
 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));
 }
コード例 #6
0
        //
        // 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"));
        }
コード例 #7
0
        //
        // GET: /Request/

        public ActionResult Index()
        {
            if (CurrentRequestSetID != null)
            {
                APIRequestSet apirequestset = db.APIRequestSets.Find(CurrentRequestSetID);

                return(View(apirequestset));
            }
            else
            {
                return(HttpNotFound());
            }
        }