public ActionResult Create([Bind(Include = "UserId,Username,Password,ConfirmPassword,EmailAddress,FirstName,LastName,accessLevel,RememberMe,Inactive")] User user)
        {
            if (ModelState.IsValid)
            {
                db.Users.Add(user);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(user));
        }
Esempio n. 2
0
        public ActionResult Create([Bind(Include = "SdcDetailsId,FirstName,LastName,DateAdded,IsTeamCoordinator,IsFullTime")] SdcDetails sdcDetails)
        {
            if (ModelState.IsValid)
            {
                db.SdcDetails.Add(sdcDetails);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(sdcDetails));
        }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "DailyDataId,Date,WorkingSDC,Appointments,Presentations,SuccessfulPresentations,Attendance,Members,NinthKyus,Classes,EquipmentSales,Interviews")] DailyData dailyData)
        {
            if (ModelState.IsValid)
            {
                db.DailyData.Add(dailyData);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(dailyData));
        }
Esempio n. 4
0
 public ActionResult Register(User account)
 {
     if (ModelState.IsValid)
     {
         using (DbcContext db = new DbcContext())
         {
             db.Users.Add(account);
             db.SaveChanges();
         }
         ModelState.Clear();
         ViewBag.Message = account.FirstName + " " + account.LastName + " successfully registered.";
     }
     return(RedirectToAction("Login"));
 }