public ActionResult EditSetting(SiteAttribute attr)
 {
     this.serviceFactory.SiteService.Update(attr);
     return(RedirectToAction(ControllerNaming.Action <AdminSettingsController>(x => x.EditSetting(attr.Id)),
                             ControllerNaming.Name <AdminSettingsController>(),
                             new { id = attr.Id }));
 }
        public ActionResult EditUser(User user, FormCollection forms)
        {
            user.Password = forms.Get("Password");

            this.serviceFactory.UserService.Update(user);
            return(RedirectToAction(ControllerNaming.Action <AdminUserController>(x => x.EditUser(user.Id)),
                                    ControllerNaming.Name <AdminUserController>(),
                                    new { id = user.Id }));
        }
        public ActionResult LogOn(string userName, string password, bool rememberMe, string returnUrl)
        {
            if (!this.ValidateLogOn(userName, password))
            {
                return(View());
            }

            FormsAuthentication.SetAuthCookie(userName, rememberMe);
            if (!String.IsNullOrEmpty(returnUrl))
            {
                return(Redirect(returnUrl));
            }

            return(RedirectToAction(ControllerNaming.Action <AdminController>(x => x.Dashboard()), ControllerNaming.Name <AdminController>()));
        }
        public ActionResult LogOff()
        {
            FormsAuthentication.SignOut();

            return(RedirectToAction(ControllerNaming.Action <HomeController>(x => x.Default()), ControllerNaming.Name <HomeController>()));
        }