Exemplo n.º 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"));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
 }
Exemplo n.º 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));
        }
Exemplo n.º 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));
 }
Exemplo n.º 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"));
        }
Exemplo n.º 7
0
        //
        // GET: /Request/

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

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