Vote count:
0
I am not sure how to handle this scenario.
I have the following code.
public int SaveAssessmentData(Assessment objAssessment)
{
int functionReturnValue = 0;
string strMsg = null;
SqlHelper objSQLHelper = new SqlHelper();
try
{
if (objAssessment.tblAssessmentCircle.Count > 1)
{
strMsg = "More than one assessment circle found, please delete.";
}
else
{
functionReturnValue = objSQLHelper.CreateRecord(ConstantCollectionDataAccess.str_SP_BBCC_SaveAssessment, objAssessment);
}
}
catch (Exception ex)
{
strMsg = "BBCC.DataAccess.daBBCCAssessment.SaveAssessmentData, error saving the assessment data." + ex.Message;
throw new BBCCDataAccessException(strMsg, ex, objAssessment);
}
finally
{
if ((objSQLHelper != null))
{
objSQLHelper.Dispose();
objSQLHelper = null;
}
}
return functionReturnValue;
}
I am trying to show an warning message and not save in to DB.
if (objAssessment.tblAssessmentCircle.Count > 1)
{
strMsg = "More than one assessment circle found, please delete.";
}
asked 1 min ago
how to show warning message and not save in to db
Aucun commentaire:
Enregistrer un commentaire