Well verified code
-
Not only the code uses hardcoded "enums" and uses everything as strings, it also does very "useful" IFs.
if(cboTipoIncentivo.SelectedValue == "414")
dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);
else
dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue); -
Not only the code uses hardcoded "enums" and uses everything as strings, it also does very "useful" IFs.
if(cboTipoIncentivo.SelectedValue == "414")
dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);
else
dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);Looks like a breakpoint construction to me. I would consider using such things myself assuming you can't break on an empty code block. :)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
-
Not only the code uses hardcoded "enums" and uses everything as strings, it also does very "useful" IFs.
if(cboTipoIncentivo.SelectedValue == "414")
dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);
else
dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);A switch would have been more fun! ;-)
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
-
Looks like a breakpoint construction to me. I would consider using such things myself assuming you can't break on an empty code block. :)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
-
A switch would have been more fun! ;-)
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
-
Even more fun: inheritance. And delegates :)
Between the idea And the reality Between the motion And the act Falls the Shadow
Haha, why make simple when we can make it complicated!? Challenge: write a 12193 lines long C# program which convert any value to the integer value 1 (or 0). Bonus point: all method should be called, through different path, for any values!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
-
Looks like a breakpoint construction to me. I would consider using such things myself assuming you can't break on an empty code block. :)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
Right click on the breakpoint's red ball => Condition. Here you go! ;-) Admittedly it does slow down the program a bit...
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
-
Not only the code uses hardcoded "enums" and uses everything as strings, it also does very "useful" IFs.
if(cboTipoIncentivo.SelectedValue == "414")
dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);
else
dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);Looks developer is in hurry to finish code or he/she missing some work to do in condition. :^)
Viral My Site Tips & Tracks
-
Not only the code uses hardcoded "enums" and uses everything as strings, it also does very "useful" IFs.
if(cboTipoIncentivo.SelectedValue == "414")
dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);
else
dtIncentivo = oIncentivo.ConsultaCreditoIncentivo("", txtN_Processo.Text, sIdf_Pessoa, cboTipoIncentivo.SelectedValue);My favorite...
if(5 == 5)
do something...
else
do the same thing... -
Right click on the breakpoint's red ball => Condition. Here you go! ;-) Admittedly it does slow down the program a bit...
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
Thanks. I'll give it a try sometime next week. :)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
-
Right click on the breakpoint's red ball => Condition. Here you go! ;-) Admittedly it does slow down the program a bit...
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.