Esempio n. 1
0
 public ActionResult AddElementConfirm(Int64 id /*chart id.*/, Int64 elementId, String returnUrl)
 {
     try
     {
         if (Url.IsLocalUrl(returnUrl) && returnUrl.Length > 1 &&
             !returnUrl.StartsWith("//") && !returnUrl.StartsWith("/\\"))
         {
             ChartRepository.AddElementToChart(elementId, id, GetUserId());
             return(Redirect(returnUrl));
         }
         return(RedirectToAction("DataSet", new { id }));
     }
     catch (Exception e)
     {
         ExceptionMessageToViewBag(e);
         return(View("Error"));
     }
 }