public void Refuse(HttpContext context)
        {
            int?intParam = base.GetIntParam(context, "id", true);

            if (!intParam.HasValue || intParam < 1)
            {
                throw new HidistroAshxException("错误的数据编号");
            }
            string parameter = base.GetParameter(context, "Reason", true);

            if (string.IsNullOrWhiteSpace(parameter))
            {
                throw new HidistroAshxException("请填写拒绝申请的原因");
            }
            if (parameter.Length > 50)
            {
                throw new HidistroAshxException("拒绝原因不能超过50字符");
            }
            if (StoreBalanceHelper.DealBalanceDrawRequestById(intParam.Value, false, ref this.sError, parameter))
            {
                base.ReturnSuccessResult(context, "拒绝申请成功", 0, true);
                return;
            }
            throw new HidistroAshxException("提现申请操作失败");
        }
        public void Confirm(HttpContext context)
        {
            if (!base.CurrentSiteSetting.EnableBulkPaymentAliPay)
            {
                throw new HidistroAshxException("系统已关闭支付宝批量转账功能,请拒绝转账申请");
            }
            string parameter = base.GetParameter(context, "ids", false);

            if (string.IsNullOrWhiteSpace(parameter))
            {
                throw new HidistroAshxException("错误的数据编号");
            }
            List <int> list = (from d in parameter.Split(',')
                               where !string.IsNullOrWhiteSpace(d)
                               select int.Parse(d)).ToList();
            string text = "";
            bool   flag = true;

            foreach (int item in list)
            {
                if (!StoreBalanceHelper.DealBalanceDrawRequestById(item, true, ref this.sError, ""))
                {
                    text = text + item.ToString() + ":预付款提现申请操作失败," + this.sError + "。";
                    flag = false;
                }
            }
            if (flag)
            {
                base.ReturnSuccessResult(context, "预付款提现成功,等待支付宝处理结果", 0, true);
                return;
            }
            throw new HidistroAshxException(text);
        }
Example #3
0
        public void Confirm(HttpContext context)
        {
            int?intParam = base.GetIntParam(context, "id", true);

            if (!intParam.HasValue || intParam < 1)
            {
                throw new HidistroAshxException("错误的数据编号");
            }
            if (StoreBalanceHelper.DealBalanceDrawRequestById(intParam.Value, true, ref this.sError, ""))
            {
                base.ReturnSuccessResult(context, "预付款提现成功", 0, true);
                return;
            }
            throw new HidistroAshxException(this.sError);
        }