예제 #1
0
        /// <summary>
        /// 带事务Insert
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="trans">The trans.</param>
        /// <returns></returns>
        /// <remarks>2014/3/23 22:11:08</remarks>
        public bool SavePandoraDecompose(ShadowPandoraDecomposeEntity entity, DbTransaction trans = null)
        {
            var       database       = new SqlDatabase(this.ConnectionString);
            DbCommand commandWrapper = database.GetStoredProcCommand("dbo.P_PandoraDecompose_Insert");

            database.AddInParameter(commandWrapper, "@TransactionId", DbType.Guid, entity.TransactionId);
            database.AddInParameter(commandWrapper, "@ItemIds", DbType.AnsiString, entity.ItemIds);
            database.AddInParameter(commandWrapper, "@ItemCodes", DbType.AnsiString, entity.ItemCodes);
            database.AddInParameter(commandWrapper, "@CritRate", DbType.Int32, entity.CritRate);
            database.AddInParameter(commandWrapper, "@IsCrit", DbType.Boolean, entity.IsCrit);
            database.AddInParameter(commandWrapper, "@Coin", DbType.Int32, entity.Coin);
            database.AddInParameter(commandWrapper, "@EquipmentList", DbType.AnsiString, entity.EquipmentList);
            int results = 0;

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


            return(Convert.ToBoolean(results));
        }
예제 #2
0
 public PandoraDecomposeShadow(string itemIds, string itemCodes, int critRate, bool isCrit, int coin, string equipmentList, Guid transactionId)
 {
     Shadow = new ShadowPandoraDecomposeEntity();
     Shadow.TransactionId = transactionId;
     Shadow.ItemIds       = itemIds;
     Shadow.ItemCodes     = itemCodes;
     Shadow.CritRate      = critRate;
     Shadow.IsCrit        = isCrit;
     Shadow.Coin          = coin;
     Shadow.EquipmentList = equipmentList;
 }