public ActionResult SetRole4Action() { int actionID = int.Parse(Request["ID"]); string[] roleIDS = Request.Form.AllKeys; List <int> roleIDList = new List <int>(); foreach (var item in roleIDS) { if (item.StartsWith("pe_")) { roleIDList.Add(int.Parse(item.Replace("pe_", ""))); } } if (ActionInfoService.SetRole4Action(actionID, roleIDList)) { return(Content("Y")); } else { return(Content("N")); } }