Пример #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());
            }
        }