示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            tipoVaga tipovaga = db.tipoVagas.Find(id);

            db.tipoVagas.Remove(tipovaga);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "id,Nome")] tipoVaga tipovaga)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tipovaga).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tipovaga));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "id,Nome")] tipoVaga tipovaga)
        {
            if (ModelState.IsValid)
            {
                db.tipoVagas.Add(tipovaga);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tipovaga));
        }
示例#4
0
        // GET: /TipoVaga/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tipoVaga tipovaga = db.tipoVagas.Find(id);

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