예제 #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            TRAINING_SC tRAINING_SC = db.TRAINING_SC.Find(id);

            db.TRAINING_SC.Remove(tRAINING_SC);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "sc_id,from_time,to_time,EMP_ID,attend,PLAN_ID,time_open,extra1,extra2,extra3,time_closed,comment")] TRAINING_SC tRAINING_SC)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tRAINING_SC).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PLAN_ID = new SelectList(db.TRAINING_PLAN, "PLAN_ID", "TRAINING_PLACE", tRAINING_SC.PLAN_ID);
     return(View(tRAINING_SC));
 }
예제 #3
0
        // GET: TRAINING_SC/Details/5
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TRAINING_SC tRAINING_SC = db.TRAINING_SC.Find(id);

            if (tRAINING_SC == null)
            {
                return(HttpNotFound());
            }
            return(View(tRAINING_SC));
        }
예제 #4
0
        // GET: TRAINING_SC/Edit/5
        public ActionResult Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TRAINING_SC tRAINING_SC = db.TRAINING_SC.Find(id);

            if (tRAINING_SC == null)
            {
                return(HttpNotFound());
            }
            ViewBag.PLAN_ID = new SelectList(db.TRAINING_PLAN, "PLAN_ID", "TRAINING_PLACE", tRAINING_SC.PLAN_ID);
            return(View(tRAINING_SC));
        }