public ActionResult SaveReorderedIndicators(FormCollection fc, int?currentDomainId, string indicatorOrder) { var indicatorSpecifierStrings = indicatorOrder.Split('¬').ToList(); indicatorSpecifierStrings.RemoveAt(indicatorSpecifierStrings.Count - 1); var sequenceNumber = 1; var indicatorSpecifiers = IndicatorSpecifierParser.Parse(indicatorSpecifierStrings); foreach (var indicatorSpecifier in indicatorSpecifiers) { _dataAccess.UpdateIndicatorGroupingSequence(indicatorSpecifier.IndicatorId, sequenceNumber, currentDomainId, Convert.ToInt32(fc["AreaType"]), indicatorSpecifier.SexId); sequenceNumber++; } if (Request.UrlReferrer != null) { return(Redirect(Request.UrlReferrer.AbsoluteUri)); } return(View("ProfilesAndIndicators")); }