示例#1
0
        public ActionResult EditAuthor(EditAuthorViewModel post)
        {
            StoredProcs.Authors_CreateOrUpdateAuthor(
                post.Author.Slug,
                post.Author.Name,
                post.Author.IsAdmin,
                post.Author.DescriptionHtml,
                post.Author.ShortDescription,
                Inedo.InedoLib.Util.NullIf(post.Author.ImageUrl, string.Empty)
                ).Execute();

            if (!string.IsNullOrEmpty(post.Password))
            {
                StoredProcs.Authors_SetPassword(post.Author.Slug, post.Password).Execute();
            }

            return(RedirectToAction("index"));
        }