public ActionResult Resumes(string strIds, ListDistributors request) { ResultMsg result = new ResultMsg(); int successCount = 0; int errorCount = 0; if (!string.IsNullOrEmpty(strIds)) { string[] sId = strIds.Split(','); foreach (var id in sId) { int intId = 0; if (int.TryParse(id, out intId)) { result = request.Resume(intId); if (result.Code == 1) { successCount += 1; } else { errorCount += 1; } } } } result.CodeText = "启用成功" + successCount + "个经销商,失败" + errorCount + "个"; return(Json(result)); }
public ActionResult Resume(int id, ListDistributors request) { return(Json(request.Resume(id))); }