public ActionResult DeleteConfirmed(int id) { Rcms rcms = db.Rcms.Find(id); db.Rcms.Remove(rcms); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(Rcms rcms) { if (ModelState.IsValid) { db.Entry(rcms).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdTelegrama = new SelectList(db.Telegrama, "IdTelegrama", "NomeProjeto", rcms.IdTelegrama); return(View(rcms)); }
public ActionResult Create(Rcms rcms) { if (ModelState.IsValid) { db.Rcms.Add(rcms); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdTelegrama = new SelectList(db.Telegrama, "IdTelegrama", "NomeProjeto", rcms.IdTelegrama); return(View(rcms)); }
//// GET: Rcms //public ActionResult Index(String filtro) //{ // if (!String.IsNullOrEmpty(filtro)) // { // return View(db.Rcms.Include(r => r.Telegrama).Where(r => r.Telegrama.NomeProjeto.ToLower().Contains(filtro.ToLower())).ToList()); // } // return View(db.Rcms.Include(r => r.Telegrama).ToList()); //} // GET: Rcms/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Rcms rcms = db.Rcms.Find(id); if (rcms == null) { return(HttpNotFound()); } return(View(rcms)); }
// GET: Rcms/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Rcms rcms = db.Rcms.Find(id); if (rcms == null) { return(HttpNotFound()); } ViewBag.IdTelegrama = new SelectList(db.Telegrama, "IdTelegrama", "NomeProjeto", rcms.IdTelegrama); return(View(rcms)); }