コード例 #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            t_config_m1 t_config_m1 = db.t_config_m1.Find(id);

            db.t_config_m1.Remove(t_config_m1);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "clave,f_objini,f_objfin,axo_activo,f_evalini1,f_evalfin1,f_evalini2,f_evalfin2,f_califica,f_calificafin")] t_config_m1 t_config_m1)
 {
     if (ModelState.IsValid)
     {
         db.Entry(t_config_m1).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Edit", new { id = t_config_m1.clave, alert = "1" }));
     }
     return(View(t_config_m1));
 }
コード例 #3
0
        public ActionResult Create([Bind(Include = "clave,f_objini,f_objfin,axo_activo,f_evalini1,f_evalfin1,f_evalini2,f_evalfin2,f_califica,f_calificafin")] t_config_m1 t_config_m1)
        {
            if (ModelState.IsValid)
            {
                db.t_config_m1.Add(t_config_m1);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(t_config_m1));
        }
コード例 #4
0
        // GET: t_config_m1/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            t_config_m1 t_config_m1 = db.t_config_m1.Find(id);

            if (t_config_m1 == null)
            {
                return(HttpNotFound());
            }
            return(View(t_config_m1));
        }
コード例 #5
0
        // GET: t_config_m1/Edit/5
        public ActionResult Edit(string id, string alert = "")
        {
            if (alert == "1")
            {
                ViewBag.Alert = "1";
            }
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            t_config_m1 t_config_m1 = db.t_config_m1.Find(id);

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