Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Tbl_Situacao tbl_Situacao = db.Tbl_Situacao.Find(id);

            db.Tbl_Situacao.Remove(tbl_Situacao);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "id,cpf_cnpj_cliente,ativa,localizada,outrasOper")] Tbl_Situacao tbl_Situacao)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_Situacao).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tbl_Situacao));
 }
Exemple #3
0
        public ActionResult Create([Bind(Include = "id,cpf_cnpj_cliente,ativa,localizada,outrasOper")] Tbl_Situacao tbl_Situacao)
        {
            if (ModelState.IsValid)
            {
                db.Tbl_Situacao.Add(tbl_Situacao);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tbl_Situacao));
        }
Exemple #4
0
        // GET: Tbl_Situacao/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Tbl_Situacao tbl_Situacao = db.Tbl_Situacao.Find(id);

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