public bool SavePandoraEquipmentSell(ShadowPandoraEquipmentSellEntity entity, DbTransaction trans = null) { var database = new SqlDatabase(this.ConnectionString); DbCommand commandWrapper = database.GetStoredProcCommand("dbo.P_PandoraEquipmentSell_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, "@ItemCode", DbType.Int32, entity.ItemCode); database.AddInParameter(commandWrapper, "@Coin", DbType.Int32, entity.Coin); int results = 0; if (trans != null) { results = database.ExecuteNonQuery(commandWrapper, trans); } else { results = database.ExecuteNonQuery(commandWrapper); } return(Convert.ToBoolean(results)); }
public PandoraEquipmentSellShadow(Guid managerId, Guid itemId, int itemCode, int coin, Guid transactionId) { Shadow = new ShadowPandoraEquipmentSellEntity(); Shadow.TransactionId = transactionId; Shadow.ManagerId = managerId; Shadow.ItemId = itemId; Shadow.ItemCode = itemCode; Shadow.Coin = coin; }