public ActionResult RegisterPost(FormCollection form) { Gebruiker newUser = new Gebruiker(form["Email"], form["Password"], form["Name"], form["Lastname"], false, form["Street"], form["HouseNumber"], form["Zipcode"], form["Country"], form["City"]); string id = newUser.SaveOrUpdate(); if (id == null) { ViewBag.RegisterResult = false; return(View("~/Views/Auth/Register.cshtml")); } else { return(Login()); } }
public ActionResult Changepassword(FormCollection form) { Gebruiker g = (Gebruiker)Session["AuthGebruiker"]; if (g.Wachtwoord == form["oldPassword"] && (form["newPassword"] == form["validateNewPassword"])) { g.Wachtwoord = form["newPassword"]; g.SaveOrUpdate(); ViewBag.UpdateResult = "true"; } else { ViewBag.UpdateResult = "false"; } return(View("~/Views/Account/Settings.cshtml")); }
public ActionResult Update(FormCollection form) { Gebruiker g = (Gebruiker)Session["AuthGebruiker"]; g.Email = form["Email"]; g.Voornaam = form["Name"]; g.Achternaam = form["Lastname"]; g.Straat = form["Street"]; g.Huisnummer = form["HouseNumber"]; g.Postcode = form["Zipcode"]; g.Woonplaats = form["Country"]; g.Land = form["City"]; string id = g.SaveOrUpdate(); if (id != null) { ViewBag.UpdateResult = "true"; } return(View("~/Views/Account/Settings.cshtml")); }