Пример #1
0
        /// <summary>
        /// 从IDataReader创建OrderRefundInfo
        /// </summary>
        public static OrderRefundInfo BuildOrderRefundFromReader(IDataReader reader)
        {
            OrderRefundInfo orderRefundInfo = new OrderRefundInfo();

            orderRefundInfo.Oid = TypeHelper.ObjectToInt(reader["oid"]);
            orderRefundInfo.OSN = reader["osn"].ToString();
            orderRefundInfo.Uid = TypeHelper.ObjectToInt(reader["uid"]);
            orderRefundInfo.State = TypeHelper.ObjectToInt(reader["state"]);
            orderRefundInfo.ApplyTime = TypeHelper.ObjectToDateTime(reader["applytime"]);
            orderRefundInfo.PayMoney = TypeHelper.ObjectToDecimal(reader["paymoney"]);
            orderRefundInfo.RefundMoney = TypeHelper.ObjectToDecimal(reader["refundmoney"]);
            orderRefundInfo.RefundSN = reader["refundsn"].ToString();
            orderRefundInfo.RefundSystemName = reader["refundsystemname"].ToString();
            orderRefundInfo.RefundFriendName = reader["refundfriendname"].ToString();
            orderRefundInfo.RefundTime = TypeHelper.ObjectToDateTime(reader["refundtime"]);
            orderRefundInfo.PaySN = reader["paysn"].ToString();
            orderRefundInfo.PaySystemName = reader["paysystemname"].ToString();
            orderRefundInfo.PayFriendName = reader["payfriendname"].ToString();

            return orderRefundInfo;
        }
Пример #2
0
 /// <summary>
 /// 申请退款
 /// </summary>
 /// <param name="orderRefundInfo">订单退款信息</param>
 public void ApplyRefund(OrderRefundInfo orderRefundInfo)
 {
     DbParameter[] parms = {
                             GenerateInParam("@oid", SqlDbType.Int, 4, orderRefundInfo.Oid),
                             GenerateInParam("@osn", SqlDbType.VarChar,30,orderRefundInfo.OSN),
                             GenerateInParam("@uid", SqlDbType.Int,4 ,orderRefundInfo.Uid),
                             GenerateInParam("@state", SqlDbType.TinyInt,1 ,orderRefundInfo.State),
                             GenerateInParam("@applytime", SqlDbType.DateTime,8,orderRefundInfo.ApplyTime),
                             GenerateInParam("@paymoney", SqlDbType.Decimal,8,orderRefundInfo.PayMoney),
                             GenerateInParam("@refundmoney", SqlDbType.Decimal,8,orderRefundInfo.RefundMoney),
                             GenerateInParam("@refundsn", SqlDbType.VarChar,30 ,orderRefundInfo.RefundSN),
                             GenerateInParam("@refundsystemname", SqlDbType.VarChar,20 ,orderRefundInfo.RefundSystemName),
                             GenerateInParam("@refundfriendname", SqlDbType.NVarChar,30 ,orderRefundInfo.RefundFriendName),
                             GenerateInParam("@refundtime", SqlDbType.DateTime,8 ,orderRefundInfo.RefundTime),
                             GenerateInParam("@paysn", SqlDbType.VarChar,30 ,orderRefundInfo.PaySN),
                             GenerateInParam("@paysystemname", SqlDbType.VarChar,20 ,orderRefundInfo.PaySystemName),
                             GenerateInParam("@payfriendname", SqlDbType.NVarChar,30 ,orderRefundInfo.PayFriendName)
                            };
     RdbsHelper.ExecuteNonQuery(CommandType.StoredProcedure,
                                string.Format("{0}applyrefund", RdbsHelper.RdbsTablePre),
                                parms);
 }
Пример #3
0
 /// <summary>
 /// 申请退款
 /// </summary>
 /// <param name="orderRefundInfo">订单退款信息</param>
 public static void ApplyRefund(OrderRefundInfo orderRefundInfo)
 {
     BrnShop.Core.BSPData.RDBS.ApplyRefund(orderRefundInfo);
 }