예제 #1
0
 public ActionResult DailyEntryCreate(DailyDietEntry dailydietentry)
 {
     if (ModelState.IsValid)
     {
         ddeb.DailyDietEntry.Add(dailydietentry);
         ddeb.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(dailydietentry));
 }
예제 #2
0
        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));
        }
예제 #3
0
        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));
        }
예제 #5
0
        public ActionResult Create(Accounts accounts)
        {
            if (ModelState.IsValid)
            {
                db.Accounts.Add(accounts);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(accounts));
        }
예제 #6
0
        public ActionResult Create(Exercises exercises)
        {
            if (ModelState.IsValid)
            {
                db.Exercises.Add(exercises);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(exercises));
        }
예제 #7
0
        public ActionResult CreateWorkout(WorkoutDescription workouts)
        {
            if (ModelState.IsValid)
            {
                wdb.WorkoutDescription.Add(workouts);
                wdb.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(workouts));
        }
예제 #8
0
        public ActionResult Create(Hobbies hobbies)
        {
            if (ModelState.IsValid)
            {
                db.Hobbies.Add(hobbies);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(hobbies));
        }
예제 #9
0
        public ActionResult Create(Recipes recipes)
        {
            if (ModelState.IsValid)
            {
                db.Recipes.Add(recipes);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(recipes));
        }
예제 #10
0
        public ActionResult Create(Appointments appointments)
        {
            if (ModelState.IsValid)
            {
                appDb.Appointments.Add(appointments);
                appDb.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(appointments));
        }
예제 #11
0
        public ActionResult Create([Bind(Include = "UserId,EventId")] UserFavorite userFavorite)
        {
            if (ModelState.IsValid)
            {
                db.UserFavorites.Add(userFavorite);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(userFavorite));
        }
예제 #12
0
        public ActionResult Create(DailyDiet dailydiet)
        {
            if (ModelState.IsValid)
            {
                ddb.DailyDiet.Add(dailydiet);
                ddb.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(dailydiet));
        }
예제 #13
0
        public ActionResult Create(Doctor doctor)
        {
            if (ModelState.IsValid)
            {
                db.Doctor.Add(doctor);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(doctor));
        }
예제 #14
0
        public ActionResult Create(Finances finances)
        {
            if (ModelState.IsValid)
            {
                db.Finances.Add(finances);
                db.SaveChanges();
                return(RedirectToAction("Edit", new { id = finances.ID }));
            }

            return(View(finances));
        }