public ActionResult Registrer(Kunde nyKunde)
 {
     if (ModelState.IsValid)
     {
         var  kundeDb  = new KundeBLL();
         bool insertOk = kundeDb.Registrer(nyKunde);
         if (insertOk)
         {
             return(RedirectToAction("Innlogging"));
         }
     }
     return(View());
 }
示例#2
0
        public ActionResult Registrer(KundeRegistreringViewModel innKunde)
        {
            if (ModelState.IsValid)
            {
                var  kundeBLL = new KundeBLL();
                bool OK       = kundeBLL.Registrer(innKunde);
                if (OK)
                {
                    return(RedirectToAction("Login"));
                }

                ViewBag.Error = "Denne Eposten eksisterer allerede";
            }

            return(View());
        }