Exemple #1
0
 /// <summary>
 /// 通过ordercode获取积分订单信息
 /// </summary>
 /// <param name="orderCode">订单外部订单号</param>
 /// <returns></returns>
 public static CreditOrderInfo GetCreditOrderByOrderCode(string orderCode)
 {
     IDataReader reader = DatabaseProvider.GetInstance().GetCreditOrderByOrderCode(orderCode);
     CreditOrderInfo orderInfo = new CreditOrderInfo();
     if (reader.Read())
     {
         orderInfo = LoadCreditOrderInfo(reader);
     }
     reader.Close();
     return orderInfo;
 }
Exemple #2
0
 private static CreditOrderInfo LoadCreditOrderInfo(IDataReader reader)
 {
     CreditOrderInfo orderInfo = new CreditOrderInfo();
     orderInfo.Amount = TypeConverter.ObjectToInt(reader["amount"]);
     orderInfo.Buyer = reader["buyer"].ToString();
     orderInfo.CreatedTime = reader["createdtime"].ToString();
     orderInfo.ConfirmedTime=reader["confirmedtime"].ToString();
     orderInfo.Credit = TypeConverter.ObjectToInt(reader["credit"]);
     orderInfo.OrderCode = reader["ordercode"].ToString();
     orderInfo.OrderId = TypeConverter.ObjectToInt(reader["orderid"]);
     orderInfo.OrderStatus = TypeConverter.ObjectToInt(reader["orderstatus"]);
     orderInfo.PayType = TypeConverter.ObjectToInt(reader["paytype"]);
     orderInfo.Price = (decimal)TypeConverter.ObjectToFloat(reader["price"]);
     orderInfo.TradeNo = reader["tradeno"].ToString();
     orderInfo.Uid = TypeConverter.ObjectToInt(reader["uid"]);
     return orderInfo;
 }
Exemple #3
0
 /// <summary>
 /// 创建积分订单信息
 /// </summary>
 /// <param name="creditOrderInfo"></param>
 /// <returns></returns>
 public static int CreateCreditOrder(CreditOrderInfo creditOrderInfo)
 {
     return DatabaseProvider.GetInstance().CreateCreditOrder(creditOrderInfo);
 }