public ActionResult EditShortInfo(string id) { if (User.Identity.IsAuthenticated && ((User.IsInRole("Administrator") && (id == User.Identity.GetUserId())) || User.IsInRole("Admin"))) { EditShortInfoViewModel model = new EditShortInfoViewModel { Id = id, ShortInfo = KindergartenManager.GetKindergartenClaimValue(id, "ShortInfo") }; return(View(model)); } return(RedirectToAction("Index", "Home")); }
public ActionResult ChangeAddress(string id) { if (User.Identity.IsAuthenticated && ((User.IsInRole("Administrator") && (id == User.Identity.GetUserId())) || User.IsInRole("Admin"))) { ChangeAddressViewModel model = new ChangeAddressViewModel { Address = KindergartenManager.GetKindergartenById(id).Address, AltAddress = KindergartenManager.GetKindergartenClaimValue(id, "AltAddress") }; return(View(model)); } return(RedirectToAction("Index", "Home")); }