public string getOrSetTarjeta() { StringBuilder busqueda = new StringBuilder().Append("select * from TRANSA_SQL.Card c join TRANSA_SQL.CardType ct on c.CardTypeId=ct.CardTypeId join TRANSA_SQL.PaymentType pt on pt.Name=ct.Name where c.CustomerId=").Append(_customerId).Append(" and ct.Name='").Append(TipoPago.TrimStart("Tarjeta ".ToCharArray())).Append("'"); DataTable table = cnn.ejecutarQuery(busqueda.ToString()); if (table.Rows.Count == 0) { throw new NoTenesTarjetaUachoExeption(); } else { return(table.Rows[0]["PaymentTypeId"].ToString()); } }