public ActionResult DailyEntryCreate(DailyDietEntry dailydietentry) { if (ModelState.IsValid) { ddeb.DailyDietEntry.Add(dailydietentry); ddeb.SaveChanges(); return(RedirectToAction("Index")); } return(View(dailydietentry)); }
public ActionResult Create([Bind(Include = "Id,Name,Type,SaleStarts,SaleEnds,Status")] Event @event) { if (ModelState.IsValid) { db.Events.Add(@event); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(@event)); }
public ActionResult Create(Medications medications) { if (ModelState.IsValid) { db.Medications.Add(medications); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(medications)); }
public ActionResult Create(WeeklyDietEntry weeklydietentry) { if (ModelState.IsValid) { db.WeeklyDietEntry.Add(weeklydietentry); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(weeklydietentry)); }
public ActionResult Create(Accounts accounts) { if (ModelState.IsValid) { db.Accounts.Add(accounts); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(accounts)); }
public ActionResult Create(Exercises exercises) { if (ModelState.IsValid) { db.Exercises.Add(exercises); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(exercises)); }
public ActionResult CreateWorkout(WorkoutDescription workouts) { if (ModelState.IsValid) { wdb.WorkoutDescription.Add(workouts); wdb.SaveChanges(); return(RedirectToAction("Index")); } return(View(workouts)); }
public ActionResult Create(Hobbies hobbies) { if (ModelState.IsValid) { db.Hobbies.Add(hobbies); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(hobbies)); }
public ActionResult Create(Recipes recipes) { if (ModelState.IsValid) { db.Recipes.Add(recipes); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(recipes)); }
public ActionResult Create(Appointments appointments) { if (ModelState.IsValid) { appDb.Appointments.Add(appointments); appDb.SaveChanges(); return(RedirectToAction("Index")); } return(View(appointments)); }
public ActionResult Create([Bind(Include = "UserId,EventId")] UserFavorite userFavorite) { if (ModelState.IsValid) { db.UserFavorites.Add(userFavorite); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(userFavorite)); }
public ActionResult Create(DailyDiet dailydiet) { if (ModelState.IsValid) { ddb.DailyDiet.Add(dailydiet); ddb.SaveChanges(); return(RedirectToAction("Index")); } return(View(dailydiet)); }
public ActionResult Create(Doctor doctor) { if (ModelState.IsValid) { db.Doctor.Add(doctor); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(doctor)); }
public ActionResult Create(Finances finances) { if (ModelState.IsValid) { db.Finances.Add(finances); db.SaveChanges(); return(RedirectToAction("Edit", new { id = finances.ID })); } return(View(finances)); }