Esempio n. 1
0
 /// <summary>
 /// 保存
 /// </summary>
 /// <param name="entity"></param>
 /// <param name="keyValue"></param>
 public bool SubmitForm(tUserRechargeRecordEntity entity, int keyValue)
 {
     if (keyValue > 0)
     {
         return(this.BaseRepository().Update(entity) > 0);
     }
     else
     {
         return(this.BaseRepository().Insert(entity) > 0);
     }
 }
Esempio n. 2
0
        //充值
        public bool Recharge(tUserRechargeRecordEntity entity, out string ret)
        {
            ret = this.BaseRepository().ExecuteByProc <string>("proc_Recharge", new
            {
                @ret    = "",
                @mbId   = entity.mbId,
                @guid   = entity.recordGuid,
                @img    = entity.transferImg,
                @bankId = entity.bankId,
                @amount = entity.rechargeAmount,
                @ip     = entity.ip,
                @client = entity.client
            });

            return(ret.IsEmpty());
        }
Esempio n. 3
0
        //充值申请
        public ActionResult Recharge()
        {
            RechargeParamter param = GetRequestParamter <RechargeParamter>();

            bool           isret;
            tMembersEntity member;
            ActionResult   ar = AnalysisToken(param, out isret, out member);

            if (isret)
            {
                return(ar);
            }

            if (param.img.IsEmpty())
            {
                return(RetJsonResult(ApiResponseCodeEnum.Fail, "请上传转款凭证"));
            }

            if (!MD5Helper.PwdEncryption(param.pwd).Equals(member.mbTwoPwd))
            {
                return(RetJsonResult(ApiResponseCodeEnum.Fail, "二级密码不正确"));
            }

            tUserRechargeRecordEntity entity = new tUserRechargeRecordEntity()
            {
                recordGuid     = param.reguId,
                mbId           = param.user.Id,
                bankId         = param.bankId,
                rechargeAmount = param.amount * 10000,
                transferImg    = param.img,
                ip             = IPAddressHelper.GetClientIPAddress,
                client         = param.clientType
            };
            string ret;

            if (tUserRechargeRecordBLL.Instance.Recharge(entity, out ret))
            {
                return(RetJsonResult(ApiResponseCodeEnum.Success, "提交成功"));
            }
            return(RetJsonResult(ApiResponseCodeEnum.Success, ret.IsEmpty() ? "提交失败" : ret));
        }
Esempio n. 4
0
 //充值
 public bool Recharge(tUserRechargeRecordEntity entity, out string ret)
 {
     return(dal.Recharge(entity, out ret));
 }
Esempio n. 5
0
 /// <summary>
 /// 保存
 /// </summary>
 /// <param name="entity"></param>
 /// <param name="keyValue"></param>
 public bool SubmitForm(tUserRechargeRecordEntity entity, int keyValue)
 {
     return(dal.SubmitForm(entity, keyValue));
 }