/// <summary>
        /// 审核销售员
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        private Result BatAuditDistributor(List <long> ids, string remark, DistributorStatus status)
        {
            Result result = new Result {
                success = false, msg = "错误的编号参数"
            };

            if (status != DistributorStatus.Audited && status != DistributorStatus.Refused)
            {
                result = new Result {
                    success = false, msg = "错误的状态参数"
                };
                return(result);
            }
            if (ids.Count() > 0)
            {
                switch (status)
                {
                case DistributorStatus.Refused:
                    DistributionApplication.RefuseDistributor(ids, remark);
                    break;

                case DistributorStatus.Audited:
                    DistributionApplication.AgreeDistributor(ids, remark);
                    break;
                }
                result = new Result {
                    success = true, msg = "审核销售员完成"
                };
            }

            return(result);
        }
        public JsonResult AuditDistributor(string ids, string remark, DistributorStatus status)
        {
            Result result = new Result {
                success = false, msg = "未知错误"
            };

            if (string.IsNullOrEmpty(ids))
            {
                return(Json(result));
            }
            remark = remark.Replace("'", "’").Replace("\"", "“").Replace("<", "&lt;").Replace(">", "&gt;");
            List <long> Ids = ids.Split(',').Where(d => !string.IsNullOrWhiteSpace(d)).Select(d => long.Parse(d)).ToList();

            result = BatAuditDistributor(Ids, remark, status);
            return(Json(result));
        }