December 5, 2007
@ 05:06 PM

Who ever thought this was a good idea?  It feels wrong on so many levels.

Dim enableRegistration As Boolean = CBool(IIf(CBool(DataBinder.Eval(e.Item.DataItem, "IsOnlineRegistration")), IIf(CInt(DataBinder.Eval(e.Item.DataItem, "EventSize")) = 0 Or CInt(DataBinder.Eval(e.Item.DataItem, "EventSize")) = -1 Or (CInt(DataBinder.Eval(e.Item.DataItem, "EventSize")) - CInt(DataBinder.Eval(e.Item.DataItem, "Registrants"))) > 0, True, False), False))

And since we code review like the mafia, put the poor soul out of his misery .


 
Wednesday, December 05, 2007 7:17:15 PM (Central Standard Time, UTC-06:00)
that is hilarious! I like that you showed in VB!
Zac
Thursday, December 06, 2007 8:55:54 AM (Central Standard Time, UTC-06:00)
Zac,

I'm showing it in VB, because that's the language I'm finding it in. This just happens to be a snippet of code that I'm working on right now.
Comments are closed.