/// <summary>
        /// 带事务的Update
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="trans">The trans.</param>
        /// <returns></returns>
        /// <remarks>2016/5/7 21:28:45</remarks>
        public bool Update(ConfigPlayerkillpointEntity entity, DbTransaction trans)
        {
            var       database       = new SqlDatabase(this.ConnectionString);
            DbCommand commandWrapper = database.GetStoredProcCommand("dbo.P_ConfigPlayerkillpoint_Update");

            database.AddInParameter(commandWrapper, "@Idx", DbType.Int32, entity.Idx);
            database.AddInParameter(commandWrapper, "@VipLevel", DbType.Int32, entity.VipLevel);
            database.AddInParameter(commandWrapper, "@PrizePoint", DbType.Int32, entity.PrizePoint);
            database.AddInParameter(commandWrapper, "@TotalPoint", DbType.Int32, entity.TotalPoint);


            int results = 0;

            if (trans != null)
            {
                results = database.ExecuteNonQuery(commandWrapper, trans);
            }
            else
            {
                results = database.ExecuteNonQuery(commandWrapper);
            }


            return(Convert.ToBoolean(results));
        }
        /// <summary>
        /// 将IDataReader的当前记录读取到ConfigPlayerkillpointEntity 对象
        /// </summary>
        /// <param name="reader"></param>
        /// <returns></returns>
        public ConfigPlayerkillpointEntity LoadSingleRow(IDataReader reader)
        {
            var obj = new ConfigPlayerkillpointEntity();

            obj.Idx        = (System.Int32)reader["Idx"];
            obj.VipLevel   = (System.Int32)reader["VipLevel"];
            obj.PrizePoint = (System.Int32)reader["PrizePoint"];
            obj.TotalPoint = (System.Int32)reader["TotalPoint"];

            return(obj);
        }
        /// <summary>
        /// GetById
        /// </summary>
        /// <param name="idx">idx</param>
        /// <returns>ConfigPlayerkillpointEntity</returns>
        /// <remarks>2016/5/7 21:28:44</remarks>
        public ConfigPlayerkillpointEntity GetById(System.Int32 idx)
        {
            var database = new SqlDatabase(this.ConnectionString);

            DbCommand commandWrapper = database.GetStoredProcCommand("P_ConfigPlayerkillpoint_GetById");

            database.AddInParameter(commandWrapper, "@Idx", DbType.Int32, idx);


            ConfigPlayerkillpointEntity obj = null;

            using (IDataReader reader = database.ExecuteReader(commandWrapper))
            {
                if (reader.Read())
                {
                    obj = LoadSingleRow(reader);
                }
            }
            return(obj);
        }
 /// <summary>
 /// Update
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 /// <remarks>2016/5/7 21:28:45</remarks>
 public bool Update(ConfigPlayerkillpointEntity entity)
 {
     return(Update(entity, null));
 }
 /// <summary>
 /// Insert
 /// </summary>
 /// <param name="entity"></param>
 /// <param name="trans">The trans.</param>
 /// <returns></returns>
 /// <remarks>2016/5/7 21:28:44</remarks>
 public bool Insert(ConfigPlayerkillpointEntity entity)
 {
     return(Insert(entity, null));
 }
        public static bool Update(ConfigPlayerkillpointEntity configPlayerkillpointEntity, DbTransaction trans = null, string zoneId = "")
        {
            var provider = new ConfigPlayerkillpointProvider(zoneId);

            return(provider.Update(configPlayerkillpointEntity, trans));
        }