private static IOrderNOSQLStrategy _ordernosql = BSPData.OrderNOSQL; //订单非关系型数据库 #endregion Fields #region Methods /// <summary> /// 从IDataReader创建OrderActionInfo /// </summary> public static OrderActionInfo BuildOrderActionFromReader(IDataReader reader) { OrderActionInfo orderActionInfo = new OrderActionInfo(); orderActionInfo.Oid = TypeHelper.ObjectToInt(reader["oid"]); orderActionInfo.Uid = TypeHelper.ObjectToInt(reader["uid"]); orderActionInfo.RealName = reader["realname"].ToString(); orderActionInfo.AdminGid = TypeHelper.ObjectToInt(reader["admingid"]); orderActionInfo.AdminGTitle = reader["admingtitle"].ToString(); orderActionInfo.ActionType = TypeHelper.ObjectToInt(reader["actiontype"]); orderActionInfo.ActionTime = TypeHelper.ObjectToDateTime(reader["actiontime"]); orderActionInfo.ActionDes = reader["actiondes"].ToString(); return orderActionInfo; }
/// <summary> /// 创建订单处理 /// </summary> /// <param name="orderActionInfo">订单处理信息</param> public void CreateOrderAction(OrderActionInfo orderActionInfo) { DbParameter[] parms = { GenerateInParam("@oid", SqlDbType.Int,4,orderActionInfo.Oid), GenerateInParam("@uid", SqlDbType.Int,4 ,orderActionInfo.Uid), GenerateInParam("@realname", SqlDbType.NVarChar,10,orderActionInfo.RealName), GenerateInParam("@admingid", SqlDbType.SmallInt,2 ,orderActionInfo.AdminGid), GenerateInParam("@admingtitle", SqlDbType.NVarChar,50 ,orderActionInfo.AdminGTitle), GenerateInParam("@actiontype", SqlDbType.TinyInt,1 ,orderActionInfo.ActionType), GenerateInParam("@actiontime", SqlDbType.DateTime, 8,orderActionInfo.ActionTime), GenerateInParam("@actiondes", SqlDbType.NVarChar, 250,orderActionInfo.ActionDes) }; RdbsHelper.ExecuteNonQuery(CommandType.StoredProcedure, string.Format("{0}createorderaction", RdbsHelper.RdbsTablePre), parms); }
/// <summary> /// 创建订单处理 /// </summary> /// <param name="orderActionInfo">订单处理信息</param> public static void CreateOrderAction(OrderActionInfo orderActionInfo) { BrnShop.Core.BSPData.RDBS.CreateOrderAction(orderActionInfo); if (_ordernosql != null) _ordernosql.CreateOrderAction(orderActionInfo); }
/// <summary> /// 创建订单处理 /// </summary> /// <param name="orderActionInfo">订单处理信息</param> public static void CreateOrderAction(OrderActionInfo orderActionInfo) { BrnShop.Data.OrderActions.CreateOrderAction(orderActionInfo); }