Exemple #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            CSPR1 cSPR1 = db.CSPR1.Find(id);

            db.CSPR1.Remove(cSPR1);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "PRCODE,PRDESC,STAMP")] CSPR1 cSPR1)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cSPR1).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(cSPR1));
 }
Exemple #3
0
        public ActionResult Create([Bind(Include = "PRCODE,PRDESC,STAMP")] CSPR1 cSPR1)
        {
            if (ModelState.IsValid)
            {
                db.CSPR1.Add(cSPR1);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(cSPR1));
        }
Exemple #4
0
        // GET: CSPYR/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CSPR1 cSPR1 = db.CSPR1.Find(id);

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