alfinete
Power Member
c#
erro
gostava de saber porque esta a dar este erro sublinhando a azul o que esta a letra azul na função
???
Código:
private bool [COLOR=Blue]Savequestiontrainees[/COLOR](string [] TxtBox,System.Web.UI.WebControls.GridView grv,string TypeQuery)
{
string values = string.Empty;
string Valuesids = string.Empty;
bool res = true;
ENB.BussinessLayer.EnbETAnswersTrainees oQuestionstrainee = new ENB.BussinessLayer.EnbETAnswersTrainees();
try
{
foreach (GridViewRow row in grv.Rows)
{
//string teste = row.Cells[3].Text;
int value =0, value1=0, value2=0, value3 = 0;
int idquestion = 0;
string teste = TxtBox[0].ToString();
string Valuetxt = ((TextBox)row.Cells[2].FindControl(TxtBox[0].ToString())).Text;
string Valuetxt2 = ((TextBox)row.Cells[3].FindControl(TxtBox[1].ToString())).Text;
string Valuetxt3 = ((TextBox)row.Cells[4].FindControl(TxtBox[2].ToString())).Text;
string Valuetxt4 = ((TextBox)row.Cells[5].FindControl(TxtBox[3].ToString())).Text;
if (row.Cells[1].Text != " ")
{
idquestion = Int32.Parse(row.Cells[6].Text);
//// valor linha a linha
if (!string.IsNullOrEmpty(Valuetxt))
value = Int32.Parse(Valuetxt);
else if (string.IsNullOrEmpty(Valuetxt))
value = 0 ;
if (!string.IsNullOrEmpty(Valuetxt2))
value1 = Int32.Parse(Valuetxt2);
else if (string.IsNullOrEmpty(Valuetxt2))
value1 =0;
if (!string.IsNullOrEmpty(Valuetxt3))
value2 = Int32.Parse(Valuetxt3);
else if (string.IsNullOrEmpty(Valuetxt3))
value2 = 0;
if (!string.IsNullOrEmpty(Valuetxt4))
value3 = Int32.Parse(Valuetxt4);
else if (string.IsNullOrEmpty(Valuetxt4))
value3 = 0;
oQuestionstrainee.ClassIdFormees = Int32.Parse(Session["class"].ToString() );
oQuestionstrainee.QuestionIdFormees = idquestion ;
oQuestionstrainee.TrainerIdFormees = Int32.Parse(ddlTrainers.SelectedValue);
oQuestionstrainee.Res1 = value;
oQuestionstrainee.Res2 = value1;
oQuestionstrainee.Res3 = value2;
oQuestionstrainee.Res4 = value3;
oQuestionstrainee.SuggestionsReviews = txtSuggestionsReviews.Text;
oQuestionstrainee.ImportantTopics = txtImportantTopics.Text;
oQuestionstrainee.DevelopingThemes = txtDevelopingThemes.Text;
oQuestionstrainee.OtherTopics = txtOtherTopics.Text;
oQuestionstrainee.Positiveaspects = txtPositiveaspects.Text;
oQuestionstrainee.Improveaspects = txtImproveaspects.Text;
oQuestionstrainee.Suggestions = txtSuggestions.Text;
oQuestionstrainee.ChangingPractice = txtChangingPractice.Text;
oQuestionstrainee.Comments = txtComments.Text;
if (TypeQuery == "Insert")
{
if (oQuestionstrainee.EnbETAnswersTraineesINS() == false)
res = false;
}
else
{
if (oQuestionstrainee.EnbETAnswersTraineesUPD() == false)
res = false;
}
}
if (res == false)
break;
}
return res;
}
catch (Exception ex)
{
string err = ex.Message;
}
finally
{
oQuestionstrainee = null;
}
}
erro
Código:
Error 3 'StepAhead.Web.EnbEvaluationTraining.EnbEvaluationTrainingWuControl.wucEnbEvaluationTrainingTrainee.Savequestiontrainees(string[], System.Web.UI.WebControls.GridView, string)': not all code paths return a value C:\alfredo\my projects\sourcesave\enb_framework\development\project\ENBFramework\EnbEvaluationTraining\EnbEvaluationTrainingWuControl\wucEnbEvaluationTrainingTrainee.ascx.cs 524 26 ENBFramework
gostava de saber porque esta a dar este erro sublinhando a azul o que esta a letra azul na função
???