public ActionResult Register(FormCollection from) { string username, password, email; username = from["username"]; password = from["password"]; email = from["email"]; Coutomer ctomer = new Coutomer { Email = email, Name = username, Password = Cryptography.GetMD5Hash(password), RevordDate = DateTime.Now, }; if (membership.RegisterCoutomer(ctomer)) { return(RedirectToAction("Login")); } ViewBag["error"] = "Lüten bilgileriniz kontrol ediniz..."; return(View()); }
public bool CoutomerLogin(string user, string password) { Coutomer ctomer = this.coutomerDataStore.GetCoutomer(user, password); if (ctomer != null) { HttpContext.Current.Session["ctomerid"] = ctomer.ID; } return(false); }
public bool RegisterCoutomer(Coutomer coutomer) { CoustomerValidation cvalidation = new CoustomerValidation(); if (cvalidation.Validate(coutomer).IsValid) { this.coutomerDataStore.Insert(coutomer); return(true); } return(false); }