Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SuporteSantana suporteSantana = db.SuporteSantanas.Find(id);

            db.SuporteSantanas.Remove(suporteSantana);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "Codigo,DataInicio,DescProblema,Empresa,Solicitante,Atendente,Solucao,Status")] SuporteSantana suporteSantana)
 {
     ViewBag.Status = new SelectList(new Status().ListaStatus(), "CodStatus", "NomeStatus");
     if (ModelState.IsValid)
     {
         db.Entry(suporteSantana).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(suporteSantana));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "Codigo,DataInicio,DescProblema,Empresa,Solicitante,Atendente,Solucao,Status")] SuporteSantana suporteSantana)
        {
            ViewBag.Empresa      = new SelectList(new Empresa().ListaEmpresas(), "CodEmpresa", "nomeEmpresa");
            ViewBag.Solicitantes = new SelectList(new Solicitantes().ListaSolicitantes(), "CodSolicitante", "NomeSolicitante");
            ViewBag.Status       = new SelectList(new Status().ListaStatus(), "CodStatus", "NomeStatus");
            if (ModelState.IsValid)
            {
                db.SuporteSantanas.Add(suporteSantana);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

            if (suporteSantana == null)
            {
                return(HttpNotFound());
            }
            return(View(suporteSantana));
        }
Пример #5
0
        // GET: SuporteSantanas/Edit/5
        public ActionResult Edit(int?id)
        {
            ViewBag.Status = new SelectList(new Status().ListaStatus(), "CodStatus", "NomeStatus");
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SuporteSantana suporteSantana = db.SuporteSantanas.Find(id);

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