public ActionResult Edit(Content result) { if (ModelState.IsValid) { Content content = reposetory.GetContent(result.ContentID); if (content == null) return HttpNotFound(); content.Title = result.Title; content.Body = result.Body; content.AuthorID = CurrentProfile.PersonID; if (reposetory.Save(content)) { ViewBag.FormSucces = true; ModelState.Clear(); Notification not = reposetory.Notify(content, String.Format(Notifications.ContentEdited, CurrentProfile.Username)); reposetory.NotifyAddAdministration(not); reposetory.NotifySave(not); return View(content); } else { ViewBag.CaughtException = true; } } return View(result); }
public Content tagReplace(Content Value) { if (Value == null) return new Content(); Value.Body = Value.Body.Replace("##ForeningsNavn##", Basedata.AssociationName); return Value; }