コード例 #1
0
        public ActionResult DeleteConfirmed(decimal id)
        {
            CALENDARIO cALENDARIO = db.CALENDARIO.Find(id);

            db.CALENDARIO.Remove(cALENDARIO);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "ID_FERIADO,ID_PAIS,FECHA_NO_LABORAL,DESCRIPCION_NO_LABORAL")] CALENDARIO cALENDARIO)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cALENDARIO).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ID_PAIS = new SelectList(db.PAISES, "ID_PAIS", "NOM_PAIS", cALENDARIO.ID_PAIS);
     return(View(cALENDARIO));
 }
コード例 #3
0
        // GET: CALENDARIOs/Details/5
        public ActionResult Details(decimal id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CALENDARIO cALENDARIO = db.CALENDARIO.Find(id);

            if (cALENDARIO == null)
            {
                return(HttpNotFound());
            }
            return(View(cALENDARIO));
        }
コード例 #4
0
        // GET: CALENDARIOs/Edit/5
        public ActionResult Edit(decimal id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CALENDARIO cALENDARIO = db.CALENDARIO.Find(id);

            if (cALENDARIO == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ID_PAIS = new SelectList(db.PAISES, "ID_PAIS", "NOM_PAIS", cALENDARIO.ID_PAIS);
            return(View(cALENDARIO));
        }