示例#1
0
        public virtual ActionResult EditPublicSanitizedThreadTitle([Bind(Prefix = "Thread")] Thread model)
        {
            var thread = Repository.Thread.Get(model.Id);

            if(ModelState.IsValid)
            {
                thread.CatalogSanitizedThreadTitle = model.CatalogSanitizedThreadTitle;
                Repository.Thread.Update(thread);
                return RedirectToAction(MVC.Thread.Sanitization(thread.Id));
            }

            var modelError = new ThreadSanitizationDetailsModel(thread) { IsSanitizationMode = true };
            thread.CatalogSanitizedThreadTitle = model.CatalogSanitizedThreadTitle;

            return View(MVC.Thread.Views.ThreadDetailsForSanitization, modelError);
        }
示例#2
0
        public virtual ActionResult Sanitization(int threadId)
        {
            var thread = Repository.Thread.Get(threadId);

            thread.CatalogSanitizedThreadTitle = thread.CatalogThreadTitle;

            var model = new ThreadSanitizationDetailsModel(thread) { IsSanitizationMode = true };

            return View(MVC.Thread.Views.ThreadDetailsForSanitization, model);
        }