コード例 #1
0
ファイル: OrderActions.cs プロジェクト: JohnsonYuan/BrnShop
        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;
        }
コード例 #2
0
ファイル: OrderStrategy.cs プロジェクト: charles-lei/Shop
 /// <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);
 }
コード例 #3
0
ファイル: OrderActions.cs プロジェクト: JohnsonYuan/BrnShop
 /// <summary>
 /// 创建订单处理
 /// </summary>
 /// <param name="orderActionInfo">订单处理信息</param>
 public static void CreateOrderAction(OrderActionInfo orderActionInfo)
 {
     BrnShop.Core.BSPData.RDBS.CreateOrderAction(orderActionInfo);
     if (_ordernosql != null)
         _ordernosql.CreateOrderAction(orderActionInfo);
 }
コード例 #4
0
ファイル: OrderActions.cs プロジェクト: JohnsonYuan/BrnShop
 /// <summary>
 /// 创建订单处理
 /// </summary>
 /// <param name="orderActionInfo">订单处理信息</param>
 public static void CreateOrderAction(OrderActionInfo orderActionInfo)
 {
     BrnShop.Data.OrderActions.CreateOrderAction(orderActionInfo);
 }