예제 #1
0
        public bool SavePandoraArousal(ShadowPandoraArousalEntity entity, DbTransaction trans = null)
        {
            var       database       = new SqlDatabase(this.ConnectionString);
            DbCommand commandWrapper = database.GetStoredProcCommand("dbo.P_PandoraArousal_Insert");

            database.AddInParameter(commandWrapper, "@TransactionId", DbType.Guid, entity.TransactionId);
            database.AddInParameter(commandWrapper, "@ManagerId", DbType.Guid, entity.ManagerId);
            database.AddInParameter(commandWrapper, "@SourceCard", DbType.Guid, entity.SourceCard);
            database.AddInParameter(commandWrapper, "@SourceCardLv", DbType.Int32, entity.SourceCardLv);
            database.AddInParameter(commandWrapper, "@CurArousalLv", DbType.Int32, entity.CurArousalLv);
            database.AddInParameter(commandWrapper, "@TarArousalLv", DbType.Int32, entity.TarArousalLv);
            database.AddInParameter(commandWrapper, "@UseCard", DbType.Guid, entity.UseCard);
            database.AddInParameter(commandWrapper, "@UseCardStrenth", DbType.Int32, entity.UseCardStrenth);
            database.AddInParameter(commandWrapper, "@IsBinding", DbType.Boolean, entity.IsBinding);

            int results = 0;

            if (trans != null)
            {
                results = database.ExecuteNonQuery(commandWrapper, trans);
            }
            else
            {
                results = database.ExecuteNonQuery(commandWrapper);
            }
            return(Convert.ToBoolean(results));
        }
예제 #2
0
 public PandoraArousalShadow(Guid managerId, Guid sourceCard, int sourceCardLv, int curArousalLv, int tarArousalLv, Guid useCard,
                             int useCardStrenth, bool isBingding, Guid transactionId)
 {
     Shadow = new ShadowPandoraArousalEntity();
     Shadow.TransactionId  = transactionId;
     Shadow.ManagerId      = managerId;
     Shadow.SourceCard     = sourceCard;
     Shadow.SourceCardLv   = sourceCardLv;
     Shadow.CurArousalLv   = curArousalLv;
     Shadow.TarArousalLv   = tarArousalLv;
     Shadow.UseCard        = useCard;
     Shadow.UseCardStrenth = useCardStrenth;
     Shadow.IsBinding      = isBingding;
 }