Пример #1
0
        public bool SavePandoraEquipmentUpgrade(ShadowPandoraEquipmentUpgradeEntity entity, DbTransaction trans = null)
        {
            var       database       = new SqlDatabase(this.ConnectionString);
            DbCommand commandWrapper = database.GetStoredProcCommand("dbo.P_PandoraEquipmentUpgrade_Insert");

            database.AddInParameter(commandWrapper, "@TransactionId", DbType.Guid, entity.TransactionId);
            database.AddInParameter(commandWrapper, "@ManagerId", DbType.Guid, entity.ManagerId);
            database.AddInParameter(commandWrapper, "@ItemId", DbType.Guid, entity.ItemId);
            database.AddInParameter(commandWrapper, "@CurLevel", DbType.Int32, entity.CurLevel);
            database.AddInParameter(commandWrapper, "@ResultLevle", DbType.Int32, entity.ResultLevel);
            database.AddInParameter(commandWrapper, "@Properties", DbType.String, entity.Properties);
            database.AddInParameter(commandWrapper, "@CostCoin", DbType.Int32, entity.CostCoin);

            int results = 0;

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


            return(Convert.ToBoolean(results));
        }
 public PandoraEquipmentUpgradeShadow(Guid managerId, Guid itemId, int curLevel, int resultLevle, string properties, int costCoin, Guid transactionId)
 {
     Shadow = new ShadowPandoraEquipmentUpgradeEntity();
     Shadow.TransactionId = transactionId;
     Shadow.ManagerId     = managerId;
     Shadow.ItemId        = itemId;
     Shadow.CurLevel      = curLevel;
     Shadow.ResultLevel   = resultLevle;
     Shadow.Properties    = properties;
     Shadow.CostCoin      = costCoin;
 }