Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SOLICITACOES sOLICITACOES = db.SOLICITACOES.Find(id);

            db.SOLICITACOES.Remove(sOLICITACOES);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "id,sistema,solicitante,aprovador,titulo,descricao,criado_em,aprovado_em,status")] SOLICITACOES sOLICITACOES)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sOLICITACOES).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.aprovador   = new SelectList(db.PESSOAS, "id", "nome", sOLICITACOES.aprovador);
     ViewBag.solicitante = new SelectList(db.PESSOAS, "id", "nome", sOLICITACOES.solicitante);
     ViewBag.sistema     = new SelectList(db.SISTEMAS, "id", "nome", sOLICITACOES.sistema);
     return(View(sOLICITACOES));
 }
Exemplo n.º 3
0
        // GET: SOLICITACOES/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SOLICITACOES sOLICITACOES = db.SOLICITACOES.Find(id);

            if (sOLICITACOES == null)
            {
                return(HttpNotFound());
            }
            return(View(sOLICITACOES));
        }
Exemplo n.º 4
0
        // GET: SOLICITACOES/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SOLICITACOES sOLICITACOES = db.SOLICITACOES.Find(id);

            if (sOLICITACOES == null)
            {
                return(HttpNotFound());
            }
            ViewBag.aprovador   = new SelectList(db.PESSOAS, "id", "nome", sOLICITACOES.aprovador);
            ViewBag.solicitante = new SelectList(db.PESSOAS, "id", "nome", sOLICITACOES.solicitante);
            ViewBag.sistema     = new SelectList(db.SISTEMAS, "id", "nome", sOLICITACOES.sistema);
            return(View(sOLICITACOES));
        }