You need to return something when an error happens, to be consistent with the fact that this
must return an int.
public int? FarmInfraDetailsUpdate(FarmRecordPL FormrecordPL)
{
try
{
return Convert.ToInt16(SqlHelper.ExecuteScalar(connection.ConnectionString, CommandType.StoredProcedure, "k_UpdateFarmRecordInfraDetail", arParams));
}
catch
{
return 0;
}
}