예제 #1
0
 public ActionResult Edit(Difficulty difficulty)
 {
     if (ModelState.IsValid)
     {
         db.Entry(difficulty).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(difficulty));
 }
예제 #2
0
 public ActionResult Edit(MuscleGroup musclegroup)
 {
     if (ModelState.IsValid)
     {
         db.Entry(musclegroup).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(musclegroup));
 }
예제 #3
0
 public ActionResult Edit(Trainee trainee)
 {
     if (ModelState.IsValid)
     {
         db.Entry(trainee).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(trainee));
 }
예제 #4
0
 public ActionResult Edit(PFTApp.Models.Attribute attribute)
 {
     if (ModelState.IsValid)
     {
         db.Entry(attribute).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(attribute));
 }
예제 #5
0
 public ActionResult Edit(Serie serie)
 {
     if (ModelState.IsValid)
     {
         db.Entry(serie).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.exerciseunitId = new SelectList(db.ExerciseUnits, "id", "id", serie.exerciseunitId);
     return(View(serie));
 }
예제 #6
0
 public ActionResult Edit(Training training)
 {
     if (ModelState.IsValid)
     {
         db.Entry(training).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.traineeId = new SelectList(db.Trainees, "id", "name", training.traineeId);
     return(View(training));
 }
예제 #7
0
 public ActionResult Edit(Workout workout)
 {
     if (ModelState.IsValid)
     {
         db.Entry(workout).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.trainingId = new SelectList(db.Trainings, "id", "name", workout.trainingId);
     return(View(workout));
 }
예제 #8
0
 public ActionResult Edit(Measure measure)
 {
     if (ModelState.IsValid)
     {
         db.Entry(measure).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.traineeId   = new SelectList(db.Trainees, "id", "name", measure.traineeId);
     ViewBag.attributeId = new SelectList(db.Attributes, "id", "name", measure.attributeId);
     return(View(measure));
 }
예제 #9
0
 public ActionResult Edit(Exercise exercise)
 {
     if (ModelState.IsValid)
     {
         db.Entry(exercise).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.difficultyId  = new SelectList(db.Difficulties, "id", "name", exercise.difficultyId);
     ViewBag.musclegroupId = new SelectList(db.MuscleGroups, "id", "name", exercise.musclegroupId);
     return(View(exercise));
 }
예제 #10
0
 public ActionResult Edit(ExerciseUnit exerciseunit)
 {
     if (ModelState.IsValid)
     {
         db.Entry(exerciseunit).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.exerciseId = new SelectList(db.Exercises, "id", "name", exerciseunit.exerciseId);
     ViewBag.workoutId  = new SelectList(db.Workouts, "id", "name", exerciseunit.workoutId);
     return(View(exerciseunit));
 }