Exemplo n.º 1
0
        public ActionResult UserActivate(Guid id)
        {
            //user activation

            MyUserManager userManager           = new MyUserManager();
            BusinessLayerResult <MyUser> result = userManager.ActivateUser(id);

            if (result.Errors.Count > 0)
            {
                ErrorViewModel errorNotifyObj = new ErrorViewModel()
                {
                    Title = "Wrong Attempt",
                    Items = result.Errors,
                };

                return(View("Error", errorNotifyObj));
            }

            OkViewModel okNotifyObj = new OkViewModel();

            okNotifyObj.Title          = "Account is Activated";
            okNotifyObj.RedirectingUrl = "/Home/Login";
            okNotifyObj.Items.Add("Welcome to TrendOl family. We wish you have great enjoy during the shopping!");

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