コード例 #1
0
 public void Update(WXHouseReservationRedeemEntity pEntity, bool pIsUpdateNullField, IDbTransaction pTran)
 {
     _currentDAO.Update(pEntity, pIsUpdateNullField, pTran);
 }
コード例 #2
0
 /// <summary>
 /// 在事务内创建一个新实例
 /// </summary>
 /// <param name="pEntity">实体实例</param>
 /// <param name="pTran">事务实例,可为null,如果为null,则不使用事务来更新</param>
 public void Create(WXHouseReservationRedeemEntity pEntity, IDbTransaction pTran)
 {
     _currentDAO.Create(pEntity, pTran);
 }
コード例 #3
0
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="pEntity">实体实例</param>
 /// <param name="pTran">事务实例,可为null,如果为null,则不使用事务来更新</param>
 public void Update(WXHouseReservationRedeemEntity pEntity, IDbTransaction pTran)
 {
     Update(pEntity, true, pTran);
 }
コード例 #4
0
 /// <summary>
 /// 分页根据实体条件查询实体
 /// </summary>
 /// <param name="pQueryEntity">以实体形式传入的参数</param>
 /// <param name="pOrderBys">排序组合</param>
 /// <returns>符合条件的实体集</returns>
 public PagedQueryResult <WXHouseReservationRedeemEntity> PagedQueryByEntity(WXHouseReservationRedeemEntity pQueryEntity, OrderBy[] pOrderBys, int pPageSize, int pCurrentPageIndex)
 {
     return(_currentDAO.PagedQueryByEntity(pQueryEntity, pOrderBys, pPageSize, pCurrentPageIndex));
 }
コード例 #5
0
 /// <summary>
 /// 创建一个新实例
 /// </summary>
 /// <param name="pEntity">实体实例</param>
 public void Create(WXHouseReservationRedeemEntity pEntity)
 {
     _currentDAO.Create(pEntity);
 }
コード例 #6
0
 /// <summary>
 /// 根据实体条件查询实体
 /// </summary>
 /// <param name="pQueryEntity">以实体形式传入的参数</param>
 /// <param name="pOrderBys">排序组合</param>
 /// <returns>符合条件的实体集</returns>
 public WXHouseReservationRedeemEntity[] QueryByEntity(WXHouseReservationRedeemEntity pQueryEntity, OrderBy[] pOrderBys)
 {
     return(_currentDAO.QueryByEntity(pQueryEntity, pOrderBys));
 }
コード例 #7
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="pEntity"></param>
 public void Delete(WXHouseReservationRedeemEntity pEntity)
 {
     _currentDAO.Delete(pEntity);
 }
コード例 #8
0
 public void Update(WXHouseReservationRedeemEntity pEntity, bool pIsUpdateNullField)
 {
     _currentDAO.Update(pEntity, pIsUpdateNullField);
 }
コード例 #9
0
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="pEntity">实体实例</param>
 public void Update(WXHouseReservationRedeemEntity pEntity)
 {
     Update(pEntity, true);
 }
コード例 #10
0
        /// <summary>
        /// 基金赎回。
        /// </summary>
        /// <param name="message"></param>
        /// <param name="content"></param>
        /// <returns></returns>
        public static void RansomCallBack(string content)
        {
            Loggers.DEFAULT.Debug(new DebugLogInfo {
                Message = "赎回  content" + content
            });

            SendRansomMessage model  = GetRansomModelResponse(content);
            Hashtable         htComm = GetCommonreturn(model.Commonreturn);

            string customerId    = htComm["CustomerID"].ToString();
            string userId        = htComm["UserID"].ToString();
            string prePaymentId  = htComm["PrePaymentID"].ToString();
            string seqNo         = htComm["SeqNO"].ToString();
            string merchantdate  = htComm["Merchantdate"].ToString();
            string resultPageUrl = htComm["ToPageURL"].ToString();

            Loggers.DEFAULT.Debug(new DebugLogInfo {
                Message = "赎回  ToPageURL" + resultPageUrl
            });

            string retMsg;
            int    fundState;

            //判断华安赎回返回Retcode状态
            if (model.Retcode == "0000")
            {
                fundState = (int)FundStateEnum.Order;
                retMsg    = "委托已受理";
            }
            else
            {
                fundState = (int)FundStateEnum.Error;
                retMsg    = "委托失败";
            }

            var loggingSessionInfo = Default.GetBSLoggingSession(customerId, userId);

            #region  添加赎回记录
            try
            {
                var redeemBll = new WXHouseReservationRedeemBLL(loggingSessionInfo);
                var entity    = redeemBll.GetByPrePaymentID(customerId, prePaymentId);
                if (entity != null)
                {
                    entity.FundState = fundState;
                    redeemBll.Update(entity);
                }
                else
                {
                    entity = new WXHouseReservationRedeemEntity
                    {
                        RedeemID     = Guid.NewGuid(),
                        PrePaymentID = new Guid(prePaymentId),
                        Fundtype     = (int)FundtypeeEnum.ReservationRedeem,
                        FundState    = fundState,
                        Merchantdate = merchantdate,
                        SeqNO        = seqNo,
                        Retmsg       = model.Retmsg,
                        Retcode      = model.Retcode,
                        CustomerID   = customerId
                    };

                    redeemBll.Create(entity);
                }
            }
            catch (Exception ex)
            {
                Loggers.DEFAULT.Exception(new ExceptionLogInfo(ex));
                // throw new APIException(string.Format("操作赎回记录失败,原因:{0}", ex.Message)) { ErrorCode = 201 };
            }
            #endregion

            string toPageUrl = resultPageUrl + "&type=2&retStatus=" + fundState + "&retMsg=" + retMsg + "&Retcode=" + model.Retcode;
            RedirectUrl(toPageUrl);
        }