コード例 #1
0
        public ActionResult DeleteConfirmed(decimal id)
        {
            TRN_USER_LOCATION trn_user_location = db.TRN_USER_LOCATION.Single(t => t.LOC_NO == id);

            db.TRN_USER_LOCATION.DeleteObject(trn_user_location);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
        //
        // GET: /UserLocation/Delete/5

        public ActionResult Delete(decimal id = 0)
        {
            TRN_USER_LOCATION trn_user_location = db.TRN_USER_LOCATION.Single(t => t.LOC_NO == id);

            if (trn_user_location == null)
            {
                return(HttpNotFound());
            }
            return(View(trn_user_location));
        }
コード例 #3
0
 public ActionResult Edit(TRN_USER_LOCATION trn_user_location)
 {
     if (ModelState.IsValid)
     {
         db.TRN_USER_LOCATION.Attach(trn_user_location);
         db.ObjectStateManager.ChangeObjectState(trn_user_location, EntityState.Modified);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(trn_user_location));
 }
コード例 #4
0
        public ActionResult Create(TRN_USER_LOCATION trn_user_location)
        {
            if (ModelState.IsValid)
            {
                db.TRN_USER_LOCATION.AddObject(trn_user_location);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(trn_user_location));
        }