예제 #1
0
        public ActionResult DeleteConfirmed(int id, string returnUrl)
        {
            VtQoh vtQoh = db.VtQohs.Find(id);

            db.VtQohs.Remove(vtQoh);
            db.SaveChanges();
            return(Redirect(returnUrl));
            //return RedirectToAction("Index");
        }
예제 #2
0
 //public ActionResult Edit([Bind(Include = "VtQohId,Pn,PartDescription,Qoh,Location,Notes")] VtQoh vtQoh)
 public ActionResult Edit(VtQoh vtQoh, string returnUrl)
 {
     if (ModelState.IsValid)
     {
         db.Entry(vtQoh).State = EntityState.Modified;
         db.SaveChanges();
         return(Redirect(returnUrl));
         //return RedirectToAction("Index");
     }
     return(View());
     //return View(vtQoh);
 }
예제 #3
0
 //public ActionResult Create([Bind(Include = "VtQohId,Pn,PartDescription,Qoh,Location,Notes")] VtQoh vtQoh)
 public ActionResult Create(VtQoh vtQoh, string returnUrl)
 {
     if (ModelState.IsValid)
     {
         db.VtQohs.Add(vtQoh);
         db.SaveChanges();
         return(Redirect(returnUrl));
         //return RedirectToAction("Index");
     }
     return(View());
     //return View(vtQoh);
 }
예제 #4
0
        // GET: VtQohs/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            VtQoh vtQoh = db.VtQohs.Find(id);

            if (vtQoh == null)
            {
                return(HttpNotFound());
            }
            return(View(vtQoh));
        }
예제 #5
0
        // GET: VtQohs/Delete/5
        public ActionResult Delete(int?id)
        {
            ViewBag.ReturnUrl = Request.UrlReferrer;
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            VtQoh vtQoh = db.VtQohs.Find(id);

            if (vtQoh == null)
            {
                return(HttpNotFound());
            }
            return(View(vtQoh));
        }