Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            StatusOcorrenciaPB statusOcorrenciaPB = db.StatusOcorrenciaPBs.Find(id);

            db.StatusOcorrenciaPBs.Remove(statusOcorrenciaPB);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "StatusOcorrenciaPBId,Status,Observacao")] StatusOcorrenciaPB statusOcorrenciaPB)
 {
     if (ModelState.IsValid)
     {
         db.Entry(statusOcorrenciaPB).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(statusOcorrenciaPB));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "StatusOcorrenciaPBId,Status,Observacao")] StatusOcorrenciaPB statusOcorrenciaPB)
        {
            if (ModelState.IsValid)
            {
                db.StatusOcorrenciaPBs.Add(statusOcorrenciaPB);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(statusOcorrenciaPB));
        }
Пример #4
0
        // GET: StatusOcorrenciaPB/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StatusOcorrenciaPB statusOcorrenciaPB = db.StatusOcorrenciaPBs.Find(id);

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