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)); }
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)); }
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)); }
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")); }