Exemplo n.º 1
0
        public ActionResult Delete(string members, string returnUrl)
        {
            var idArray = members.Split(',')
                          .Where(a => !string.IsNullOrEmpty(a))
                          .Select(a => a.ToInt32()).Distinct();

            foreach (var id in idArray)
            {
                var member = jlService.GetMember(id);
                if (member != null)
                {
                    jlService.DeleteMember(member);
                }
            }

            if (Url.IsLocalUrl(returnUrl))
            {
                return(Redirect(returnUrl));
            }
            return(RedirectToAction("index"));
        }