public ActionResult DeleteConfirmed(string id)
 {
     roysched roysched = db.royscheds.Find(id);
     db.royscheds.Remove(roysched);
     db.SaveChanges();
     return RedirectToAction("Index");
 }
Exemple #2
0
        public ActionResult DeleteConfirmed(string title_id, int royalty_id)
        {
            roysched roysched = db.roysched.Find(title_id, royalty_id);

            db.roysched.Remove(roysched);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #3
0
 public ActionResult Edit([Bind(Include = "title_id,lorange,hirange,royalty")] roysched roysched)
 {
     if (ModelState.IsValid)
     {
         db.Entry(roysched).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.title_id = new SelectList(db.titles, "title_id", "title", roysched.title_id);
     return(View(roysched));
 }
Exemple #4
0
        public ActionResult Create([Bind(Include = "title_id,lorange,hirange,royalty")] roysched roysched)
        {
            if (ModelState.IsValid)
            {
                db.roysched.Add(roysched);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.title_id = new SelectList(db.titles, "title_id", "title", roysched.title_id);
            return(View(roysched));
        }
 // GET: royscheds/Delete/5
 public ActionResult Delete(string id)
 {
     if (id == null)
     {
         return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
     }
     roysched roysched = db.royscheds.Find(id);
     if (roysched == null)
     {
         return HttpNotFound();
     }
     return View(roysched);
 }
        // GET: royscheds/Details/5
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            roysched roysched = db.royscheds.Find(id);

            if (roysched == null)
            {
                return(HttpNotFound());
            }
            return(View(roysched));
        }
 // GET: royscheds/Edit/5
 public ActionResult Edit(string id)
 {
     if (id == null)
     {
         return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
     }
     roysched roysched = db.royscheds.Find(id);
     if (roysched == null)
     {
         return HttpNotFound();
     }
     ViewBag.title_id = new SelectList(db.titles, "title_id", "title1", roysched.title_id);
     return View(roysched);
 }
Exemple #8
0
        // GET: royscheds/Details/5
        public ActionResult Details(string title_id, int royalty_id)
        {
            if (title_id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            roysched roysched = db.roysched.Find(title_id, royalty_id);

            if (roysched == null)
            {
                return(HttpNotFound());
            }
            return(View(roysched));
        }
        public ActionResult DeleteConfirmed(string id)
        {
            roysched roysched = db.royscheds.Find(id);

            db.royscheds.Remove(roysched);
            try
            {
                db.SaveChanges();
            }
            catch (Exception e)
            {
                return(RedirectToAction("../Home/Error"));
            }
            return(RedirectToAction("Index"));
        }
Exemple #10
0
        // GET: royscheds/Edit/5
        public ActionResult Edit(string title_id, int royalty_id)
        {
            if (title_id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            roysched roysched = db.roysched.Find(title_id, royalty_id);

            if (roysched == null)
            {
                return(HttpNotFound());
            }
            ViewBag.title_id = new SelectList(db.titles, "title_id", "title", roysched.title_id);
            return(View(roysched));
        }
        public ActionResult Create([Bind(Include = "title_id,lorange,hirange,royalty")] roysched roysched)
        {
            if (ModelState.IsValid)
            {
                db.royscheds.Add(roysched);
                try
                {
                    db.SaveChanges();
                }
                catch (Exception e)
                {
                    return(RedirectToAction("../Home/Error"));
                }
                return(RedirectToAction("Index"));
            }

            ViewBag.title_id = new SelectList(db.titles, "title_id", "title1", roysched.title_id);
            return(View(roysched));
        }