Exemplo n.º 1
0
        public ActionResult Register(RegisterViewModel model)
        {
            if (ModelState.IsValid)
            {
                BusinessLayerResult <KanBanKullanici> res = km.RegisterUser(model);

                if (res.Hata.Count > 0)
                {
                    res.Hata.ForEach(x => ModelState.AddModelError("", x.Mesaj));
                    return(View(model));
                }

                OkViewModel ok = new OkViewModel()
                {
                    Title              = "Kayıt Başarılı...Giriş Sayfasına Yönlendiriliyorsunuz",
                    RedirectingUrl     = "/Home/Login",
                    RedirectingTimeOut = 8000,
                };

                ok.Items.Add("Lütfen e-posta adresinize gelen aktivasyon linkine tıklayarak hesabınızı aktive ediniz. Hesabınızı aktive etmeden giriş yapamazsınız");

                return(View("Ok", ok));
            }
            return(View(model));
        }
Exemplo n.º 2
0
        public ActionResult Register(RegisterViewModel model)
        {
            if (ModelState.IsValid)
            {
                BusinessLayerResult <Kullanicilar> res = k.RegisterUser(model);
                if (res.Errors.Count > 0)
                {
                    res.Errors.ForEach(x => ModelState.AddModelError("", x.Message));
                    return(View(model));
                }
                OkViewModel notifyobj = new OkViewModel()
                {
                    Title          = "Kayıt Başarılı",
                    RedirectingUrl = "/Home/LoginKullanici",
                };
                notifyobj.Items.Add("Lütfen E-Posta adresinize gönderilen link ile hesabınızı onaylatın ve sonra sisteminize giriş yapın.");

                return(View("Ok", notifyobj));
            }

            return(View(model));
        }