public ActionResult DeleteConfirmed(int id)
        {
            GerenciamentoDenuncia gerenciamentoDenuncia = db.GerenciamentoDenuncia.Find(id);

            db.GerenciamentoDenuncia.Remove(gerenciamentoDenuncia);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Codigo,Denuncia,Denunciante,Telefone,Status")] GerenciamentoDenuncia gerenciamentoDenuncia)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gerenciamentoDenuncia).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(gerenciamentoDenuncia));
 }
        // GET: GerenciamentoDenuncia/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            GerenciamentoDenuncia gerenciamentoDenuncia = db.GerenciamentoDenuncia.Find(id);

            if (gerenciamentoDenuncia == null)
            {
                return(HttpNotFound());
            }
            return(View(gerenciamentoDenuncia));
        }
        public ActionResult Create([Bind(Include = "Id,Codigo,Denuncia,Denunciante,Telefone,Status, Ong_IdId")] GerenciamentoDenuncia gerenciamentoDenuncia)
        {
            if (ModelState.IsValid)
            {
                gerenciamentoDenuncia.Codigo = ObterProximoCodigo();
                Ong ong = db.Ong.Find(Session["Ong"]);
                gerenciamentoDenuncia.Ong_Id = ong;
                db.GerenciamentoDenuncia.Add(gerenciamentoDenuncia);
                db.SaveChanges();
                // return RedirectToAction("Index");
            }

            return(View(gerenciamentoDenuncia));
        }