@ -92,9 +92,9 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
public String ImageName = null ; // Название файла рисунка
public String ImageName = null ; // Название файла рисунка
public String tmp_ImageName = null ; // Временное название файла
public String tmp_ImageName = null ; // Временное название файла
public EditText edtImage1 = null ; // Фото
// public EditText edtImage1 = null; // Фото
public EditText edtImage2 = null ; // Фото
// public EditText edtImage2 = null; // Фото
public EditText edtImage3 = null ; // Фото
// public EditText edtImage3 = null; // Фото
public View spiCountry = null ; // страна
public View spiCountry = null ; // страна
public View spiRegion = null ; // Область
public View spiRegion = null ; // Область
public EditText edtArea = null ; // Район
public EditText edtArea = null ; // Район
@ -274,6 +274,12 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
public View spiSafControl = null ; //"safety_Control boolean," + // Осуществлялся ли бригадой по мониторингу ЗЧ и О С контроль в отношении наблюдаемого или зарегистрированного воздействия на окружающую среду
public View spiSafControl = null ; //"safety_Control boolean," + // Осуществлялся ли бригадой по мониторингу ЗЧ и О С контроль в отношении наблюдаемого или зарегистрированного воздействия на окружающую среду
public EditText edtSafControlActions = null ; //"safety_Control_Actions text," + // Если Да, опишите последующее действие(я)
public EditText edtSafControlActions = null ; //"safety_Control_Actions text," + // Если Да, опишите последующее действие(я)
public View spiMapTreatment = null ; //"map_treatment boolean," + // Была ли составлена ситуационная карта обработки?
public EditText edtImage1 = null ; // Фотография
public EditText edtImage2 = null ; // Фотография
public EditText edtImage3 = null ; // Фотография
public EditText edtImage4 = null ; // Фотография
public EditText edtImage5 = null ; // Фотография
public EditText edtComments = null ; // КОММЕНТАРИИ
public EditText edtComments = null ; // КОММЕНТАРИИ
@ -378,6 +384,7 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
guiTableDel . add ( frmlocustdel_uid , " uid " ) ;
guiTableDel . add ( frmlocustdel_uid , " uid " ) ;
guiTableHealth = new DBGUITable ( this , " frmlocusthealth " ) ;
guiTableHealth = new DBGUITable ( this , " frmlocusthealth " ) ;
guiTableHealth . add ( frmlocusthealth_uid , " uid " ) ;
guiTableHealth . add ( frmlocusthealth_uid , " uid " ) ;
guiTableHealth . add ( frmlocustdel_uid , " frmlocustdel_uid " ) ; //Связь с формой обследования саранчи
//Страна
//Страна
spiCountry = findViewById ( R . id . spiCountry ) ;
spiCountry = findViewById ( R . id . spiCountry ) ;
@ -405,7 +412,7 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
( ( selectDB ) spiRegion ) . clearFields ( ) ;
( ( selectDB ) spiRegion ) . clearFields ( ) ;
( ( selectDB ) spiRegion ) . addField ( " " , " " ) ;
( ( selectDB ) spiRegion ) . addField ( " " , " " ) ;
if ( ( ( selectDB ) spiCountry ) . getValue ( ) ! = null & & ( ( selectDB ) spiCountry ) . getValue ( ) ! = " " )
if ( ( ( selectDB ) spiCountry ) . getValue ( ) ! = null & & ! ( ( selectDB ) spiCountry ) . getValue ( ) . equals ( " " ) )
{
{
DbOpenHelper dboh = new DbOpenHelper ( LocustHealthActivity . this ) ;
DbOpenHelper dboh = new DbOpenHelper ( LocustHealthActivity . this ) ;
Cursor cursor = dboh . getReadableDatabase ( ) . rawQuery (
Cursor cursor = dboh . getReadableDatabase ( ) . rawQuery (
@ -1326,9 +1333,23 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
guiTableDel . add ( edtComments , " comments " ) ;
guiTableDel . add ( edtComments , " comments " ) ;
//********** Карта и фотографии **********
//********** Карта и фотографии **********
//H Была ли составлена ситуационная карта обработки?
//H Была ли составлена ситуационная карта обработки?
spiMapTreatment = findViewById ( R . id . spiMapTreatment ) ;
guiTableHealth . add ( spiMapTreatment , " risk_house " ) ;
( ( selectDB ) spiMapTreatment ) . addField ( " " , " " ) ;
( ( selectDB ) spiMapTreatment ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiMapTreatment ) . addField ( getString ( R . string . No ) , " 0 " ) ;
//H Фото ситуации, возникшей при обработке, любых инцидентов и т. д.
//H Фото ситуации, возникшей при обработке, любых инцидентов и т. д.
edtImage1 = ( EditText ) findViewById ( R . id . edtImage1 ) ; // Фото
guiTableHealth . add ( edtImage1 , " image_name1 " ) ;
edtImage2 = ( EditText ) findViewById ( R . id . edtImage2 ) ; // Фото
guiTableHealth . add ( edtImage2 , " image_name2 " ) ;
edtImage3 = ( EditText ) findViewById ( R . id . edtImage3 ) ; // Фото
guiTableHealth . add ( edtImage3 , " image_name3 " ) ;
edtImage4 = ( EditText ) findViewById ( R . id . edtImage3 ) ; // Фото
guiTableHealth . add ( edtImage4 , " image_name4 " ) ;
edtImage5 = ( EditText ) findViewById ( R . id . edtImage3 ) ; // Фото
guiTableHealth . add ( edtImage5 , " image_name5 " ) ;
//********** Оценки риска **********
//********** Оценки риска **********
//H Имеются ли в непосредственной близости от обработок жилые дома или жилье (в радиусе 2 км вокруг обрабатываемого участка)
//H Имеются ли в непосредственной близости от обработок жилые дома или жилье (в радиусе 2 км вокруг обрабатываемого участка)
@ -1365,6 +1386,28 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
( ( selectDB ) spiRiskWater ) . addField ( " " , " " ) ;
( ( selectDB ) spiRiskWater ) . addField ( " " , " " ) ;
( ( selectDB ) spiRiskWater ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskWater ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskWater ) . addField ( getString ( R . string . No ) , " 0 " ) ;
( ( selectDB ) spiRiskWater ) . addField ( getString ( R . string . No ) , " 0 " ) ;
( ( selectDB ) spiRiskWater ) . setOnChangeValueListener ( new OnClickListener ( )
{
@Override
public void onClick ( View v )
{
LinearLayout llRiskWaterDistance = findViewById ( R . id . llRiskWaterDistance ) ;
LinearLayout llRiskWaterBufferZones = findViewById ( R . id . llRiskWaterBufferZones ) ;
LinearLayout llRiskWaterImpact = findViewById ( R . id . llRiskWaterImpact ) ;
if ( ( ( selectDB ) spiRiskWater ) . getValue ( ) ! = null & & ( ( selectDB ) spiRiskWater ) . getValue ( ) . equals ( " 1 " ) ) {
llRiskWaterDistance . setVisibility ( View . VISIBLE ) ;
llRiskWaterBufferZones . setVisibility ( View . VISIBLE ) ;
llRiskWaterImpact . setVisibility ( View . VISIBLE ) ;
} else {
edtRiskWaterDistance . setText ( " " ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskWaterBufferZones ) . setValue ( null ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskAgriculturalInform ) . setValue ( null ) ;
llRiskWaterDistance . setVisibility ( View . GONE ) ;
llRiskWaterBufferZones . setVisibility ( View . GONE ) ;
llRiskWaterImpact . setVisibility ( View . GONE ) ;
}
}
} ) ;
//H Расстояние от ближайшего края обрабатываемого участка (м) до ближайшего источника поверхностной воды:
//H Расстояние от ближайшего края обрабатываемого участка (м) до ближайшего источника поверхностной воды:
edtRiskWaterDistance = ( EditText ) findViewById ( R . id . edtRiskWaterDistance ) ;
edtRiskWaterDistance = ( EditText ) findViewById ( R . id . edtRiskWaterDistance ) ;
guiTableHealth . add ( edtRiskWaterDistance , " risk_water_distance " ) ;
guiTableHealth . add ( edtRiskWaterDistance , " risk_water_distance " ) ;
@ -1387,6 +1430,33 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
( ( selectDB ) spiRiskApiary ) . addField ( " " , " " ) ;
( ( selectDB ) spiRiskApiary ) . addField ( " " , " " ) ;
( ( selectDB ) spiRiskApiary ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskApiary ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskApiary ) . addField ( getString ( R . string . No ) , " 0 " ) ;
( ( selectDB ) spiRiskApiary ) . addField ( getString ( R . string . No ) , " 0 " ) ;
// Чтоб при изменении значения скрывались соответствующие поля
( ( selectDB ) spiRiskApiary ) . setOnChangeValueListener ( new OnClickListener ( )
{
@Override
public void onClick ( View v )
{
LinearLayout llRiskApiaryDistance = findViewById ( R . id . llRiskApiaryDistance ) ;
LinearLayout llRiskApiaryInformed = findViewById ( R . id . llRiskApiaryInformed ) ;
LinearLayout llRiskApiaryMeasure = findViewById ( R . id . llRiskApiaryMeasure ) ;
LinearLayout llRiskApiaryImpact = findViewById ( R . id . llRiskApiaryImpact ) ;
if ( ( ( selectDB ) spiRiskApiary ) . getValue ( ) ! = null & & ( ( selectDB ) spiRiskApiary ) . getValue ( ) . equals ( " 1 " ) ) {
llRiskApiaryDistance . setVisibility ( View . VISIBLE ) ;
llRiskApiaryInformed . setVisibility ( View . VISIBLE ) ;
llRiskApiaryMeasure . setVisibility ( View . VISIBLE ) ;
llRiskApiaryImpact . setVisibility ( View . VISIBLE ) ;
} else {
edtRiskApiaryDistance . setText ( " " ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskApiaryInformed ) . setValue ( null ) ;
edtRiskApiaryMeasure . setText ( " " ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskAgriculturalInform ) . setValue ( null ) ;
llRiskApiaryDistance . setVisibility ( View . GONE ) ;
llRiskApiaryInformed . setVisibility ( View . GONE ) ;
llRiskApiaryMeasure . setVisibility ( View . GONE ) ;
llRiskApiaryImpact . setVisibility ( View . GONE ) ;
}
}
} ) ;
//H Расстояние от ближайшего края обрабатываемого участка (м) до пасеки
//H Расстояние от ближайшего края обрабатываемого участка (м) до пасеки
edtRiskApiaryDistance = ( EditText ) findViewById ( R . id . edtRiskApiaryDistance ) ;
edtRiskApiaryDistance = ( EditText ) findViewById ( R . id . edtRiskApiaryDistance ) ;
guiTableHealth . add ( edtRiskApiaryDistance , " risk_apiary_distance " ) ;
guiTableHealth . add ( edtRiskApiaryDistance , " risk_apiary_distance " ) ;
@ -1412,6 +1482,33 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
( ( selectDB ) spiRiskAgricultural ) . addField ( " " , " " ) ;
( ( selectDB ) spiRiskAgricultural ) . addField ( " " , " " ) ;
( ( selectDB ) spiRiskAgricultural ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskAgricultural ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskAgricultural ) . addField ( getString ( R . string . No ) , " 0 " ) ;
( ( selectDB ) spiRiskAgricultural ) . addField ( getString ( R . string . No ) , " 0 " ) ;
// Чтоб при изменении значения скрывались соответствующие поля
( ( selectDB ) spiRiskAgricultural ) . setOnChangeValueListener ( new OnClickListener ( )
{
@Override
public void onClick ( View v )
{
LinearLayout llRiskAgriculturalName = findViewById ( R . id . llRiskAgriculturalName ) ;
LinearLayout llRiskAgriculturalPhase = findViewById ( R . id . llRiskAgriculturalPhase ) ;
LinearLayout llRiskAgriculturalToxic = findViewById ( R . id . llRiskAgriculturalToxic ) ;
LinearLayout llRiskAgriculturalInform = findViewById ( R . id . llRiskAgriculturalInform ) ;
if ( ( ( selectDB ) spiRiskAgricultural ) . getValue ( ) ! = null & & ( ( selectDB ) spiRiskAgricultural ) . getValue ( ) . equals ( " 1 " ) ) {
llRiskAgriculturalName . setVisibility ( View . VISIBLE ) ;
llRiskAgriculturalPhase . setVisibility ( View . VISIBLE ) ;
llRiskAgriculturalToxic . setVisibility ( View . VISIBLE ) ;
llRiskAgriculturalInform . setVisibility ( View . VISIBLE ) ;
} else {
edtRiskAgriculturalName . setText ( " " ) ;
edtRiskAgriculturalPhase . setText ( " " ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskAgriculturalToxic ) . setValue ( null ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskAgriculturalInform ) . setValue ( null ) ;
llRiskAgriculturalName . setVisibility ( View . GONE ) ;
llRiskAgriculturalPhase . setVisibility ( View . GONE ) ;
llRiskAgriculturalToxic . setVisibility ( View . GONE ) ;
llRiskAgriculturalInform . setVisibility ( View . GONE ) ;
}
}
} ) ;
//H Наименование сельхозкультуры
//H Наименование сельхозкультуры
edtRiskAgriculturalName = ( EditText ) findViewById ( R . id . edtRiskAgriculturalName ) ;
edtRiskAgriculturalName = ( EditText ) findViewById ( R . id . edtRiskAgriculturalName ) ;
guiTableHealth . add ( edtRiskAgriculturalName , " risk_agricultural_name " ) ;
guiTableHealth . add ( edtRiskAgriculturalName , " risk_agricultural_name " ) ;
@ -1431,12 +1528,40 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
( ( selectDB ) spiRiskAgriculturalInform ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskAgriculturalInform ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskAgriculturalInform ) . addField ( getString ( R . string . No ) , " 0 " ) ;
( ( selectDB ) spiRiskAgriculturalInform ) . addField ( getString ( R . string . No ) , " 0 " ) ;
//H Имеются ли в непосредственной близости от обработок шелководства (в радиусе 2 км вокруг обрабатываемого участка)
//H Имеются ли в непосредственной близости от обработок шелководства (в радиусе 2 км вокруг обрабатываемого участка)
spiRiskSilk = findViewById ( R . id . spiRiskSilk ) ;
spiRiskSilk = findViewById ( R . id . spiRiskSilk ) ;
guiTableHealth . add ( spiRiskSilk , " risk_silk " ) ;
guiTableHealth . add ( spiRiskSilk , " risk_silk " ) ;
( ( selectDB ) spiRiskSilk ) . addField ( " " , " " ) ;
( ( selectDB ) spiRiskSilk ) . addField ( " " , " " ) ;
( ( selectDB ) spiRiskSilk ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskSilk ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskSilk ) . addField ( getString ( R . string . No ) , " 0 " ) ;
( ( selectDB ) spiRiskSilk ) . addField ( getString ( R . string . No ) , " 0 " ) ;
// Чтоб при изменении значения скрывались соответствующие поля
( ( selectDB ) spiRiskSilk ) . setOnChangeValueListener ( new OnClickListener ( )
{
@Override
public void onClick ( View v )
{
LinearLayout llRiskSilkDistance = findViewById ( R . id . llRiskSilkDistance ) ;
LinearLayout llRiskSilkInform = findViewById ( R . id . llRiskSilkInform ) ;
LinearLayout llRiskSilkTreesMeasure = findViewById ( R . id . llRiskSilkTreesMeasure ) ;
LinearLayout llRiskSilkTreesImpact = findViewById ( R . id . llRiskSilkTreesImpact ) ;
if ( ( ( selectDB ) spiRiskSilk ) . getValue ( ) ! = null & & ( ( selectDB ) spiRiskSilk ) . getValue ( ) . equals ( " 1 " ) ) {
llRiskSilkDistance . setVisibility ( View . VISIBLE ) ;
llRiskSilkInform . setVisibility ( View . VISIBLE ) ;
llRiskSilkTreesMeasure . setVisibility ( View . VISIBLE ) ;
llRiskSilkTreesImpact . setVisibility ( View . VISIBLE ) ;
} else {
edtRiskSilkDistance . setText ( " " ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskSilkInform ) . setValue ( null ) ;
edtRiskSilkTreesMeasure . setText ( " " ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskSilkTreesImpact ) . setValue ( null ) ;
llRiskSilkDistance . setVisibility ( View . GONE ) ;
llRiskSilkInform . setVisibility ( View . GONE ) ;
llRiskSilkTreesMeasure . setVisibility ( View . GONE ) ;
llRiskSilkTreesImpact . setVisibility ( View . GONE ) ;
}
}
} ) ;
//H Расстояние от ближайшего края обрабатываемого участка (м) до тутовой плантации
//H Расстояние от ближайшего края обрабатываемого участка (м) до тутовой плантации
edtRiskSilkDistance = ( EditText ) findViewById ( R . id . edtRiskSilkDistance ) ;
edtRiskSilkDistance = ( EditText ) findViewById ( R . id . edtRiskSilkDistance ) ;
guiTableHealth . add ( edtRiskSilkDistance , " risk_silk_distance " ) ;
guiTableHealth . add ( edtRiskSilkDistance , " risk_silk_distance " ) ;
@ -1456,12 +1581,28 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
( ( selectDB ) spiRiskSilkTreesImpact ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskSilkTreesImpact ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskSilkTreesImpact ) . addField ( getString ( R . string . No ) , " 0 " ) ;
( ( selectDB ) spiRiskSilkTreesImpact ) . addField ( getString ( R . string . No ) , " 0 " ) ;
//H Были ли обработаны луга или пастбища?
//H Были ли обработаны луга или пастбища?
spiRiskPastures = findViewById ( R . id . spiRiskPastures ) ;
spiRiskPastures = findViewById ( R . id . spiRiskPastures ) ;
guiTableHealth . add ( spiRiskPastures , " risk_pastures " ) ;
guiTableHealth . add ( spiRiskPastures , " risk_pastures " ) ;
( ( selectDB ) spiRiskPastures ) . addField ( " " , " " ) ;
( ( selectDB ) spiRiskPastures ) . addField ( " " , " " ) ;
( ( selectDB ) spiRiskPastures ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskPastures ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskPastures ) . addField ( getString ( R . string . No ) , " 0 " ) ;
( ( selectDB ) spiRiskPastures ) . addField ( getString ( R . string . No ) , " 0 " ) ;
// Чтоб при изменении значения скрывались соответствующие поля
( ( selectDB ) spiRiskPastures ) . setOnChangeValueListener ( new OnClickListener ( )
{
@Override
public void onClick ( View v )
{
LinearLayout llRiskPasturesInform = findViewById ( R . id . llRiskPasturesInform ) ;
if ( ( ( selectDB ) spiRiskPastures ) . getValue ( ) ! = null & & ( ( selectDB ) spiRiskPastures ) . getValue ( ) . equals ( " 1 " ) ) {
llRiskPasturesInform . setVisibility ( View . VISIBLE ) ;
} else {
( ( dbfields . AutoCompleteTextViewDB ) spiRiskPasturesInform ) . setValue ( null ) ;
llRiskPasturesInform . setVisibility ( View . GONE ) ;
}
}
} ) ;
//H Были ли пастухи проинформированы о периодах удержания домашнего скота?
//H Были ли пастухи проинформированы о периодах удержания домашнего скота?
spiRiskPasturesInform = findViewById ( R . id . spiRiskPasturesInform ) ;
spiRiskPasturesInform = findViewById ( R . id . spiRiskPasturesInform ) ;
guiTableHealth . add ( spiRiskPasturesInform , " risk_pastures_inform " ) ;
guiTableHealth . add ( spiRiskPasturesInform , " risk_pastures_inform " ) ;
@ -1475,6 +1616,35 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
( ( selectDB ) spiRiskPark ) . addField ( " " , " " ) ;
( ( selectDB ) spiRiskPark ) . addField ( " " , " " ) ;
( ( selectDB ) spiRiskPark ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskPark ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskPark ) . addField ( getString ( R . string . No ) , " 0 " ) ;
( ( selectDB ) spiRiskPark ) . addField ( getString ( R . string . No ) , " 0 " ) ;
// Чтоб при изменении значения скрывались соответствующие поля
( ( selectDB ) spiRiskPark ) . setOnChangeValueListener ( new OnClickListener ( )
{
@Override
public void onClick ( View v )
{
LinearLayout llRiskParkType = findViewById ( R . id . llRiskParkType ) ;
LinearLayout llRiskParkDistance = findViewById ( R . id . llRiskParkDistance ) ;
LinearLayout llRiskParkBufferZones = findViewById ( R . id . llRiskParkBufferZones ) ;
LinearLayout llRiskParkImpact = findViewById ( R . id . llRiskParkImpact ) ;
if ( ( ( selectDB ) spiRiskPark ) . getValue ( ) ! = null & & ( ( selectDB ) spiRiskPark ) . getValue ( ) . equals ( " 1 " ) ) {
llRiskParkType . setVisibility ( View . VISIBLE ) ;
llRiskParkDistance . setVisibility ( View . VISIBLE ) ;
llRiskParkBufferZones . setVisibility ( View . VISIBLE ) ;
llRiskParkImpact . setVisibility ( View . VISIBLE ) ;
} else {
edtRiskParkType . setText ( " " ) ;
edtRiskParkDistance . setText ( " " ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskParkBufferZones ) . setValue ( null ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskParkImpact ) . setValue ( null ) ;
llRiskParkType . setVisibility ( View . GONE ) ;
llRiskParkDistance . setVisibility ( View . GONE ) ;
llRiskParkBufferZones . setVisibility ( View . GONE ) ;
llRiskParkImpact . setVisibility ( View . GONE ) ;
}
}
} ) ;
//H Какой тип экологически чувствительной зоны
//H Какой тип экологически чувствительной зоны
edtRiskParkType = ( EditText ) findViewById ( R . id . edtRiskParkType ) ;
edtRiskParkType = ( EditText ) findViewById ( R . id . edtRiskParkType ) ;
guiTableHealth . add ( edtRiskParkType , " risk_park_type " ) ;
guiTableHealth . add ( edtRiskParkType , " risk_park_type " ) ;
@ -1501,6 +1671,25 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
( ( selectDB ) spiRiskProbeAnalysis ) . addField ( " " , " " ) ;
( ( selectDB ) spiRiskProbeAnalysis ) . addField ( " " , " " ) ;
( ( selectDB ) spiRiskProbeAnalysis ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskProbeAnalysis ) . addField ( getString ( R . string . Yes ) , " 1 " ) ;
( ( selectDB ) spiRiskProbeAnalysis ) . addField ( getString ( R . string . No ) , " 0 " ) ;
( ( selectDB ) spiRiskProbeAnalysis ) . addField ( getString ( R . string . No ) , " 0 " ) ;
// Чтоб при изменении значения скрывались соответствующие поля
( ( selectDB ) spiRiskProbeAnalysis ) . setOnChangeValueListener ( new OnClickListener ( )
{
@Override
public void onClick ( View v )
{
LinearLayout llRiskProbeAnalysisName = findViewById ( R . id . llRiskProbeAnalysisName ) ;
LinearLayout llRiskProbeAnalysisNumber = findViewById ( R . id . llRiskProbeAnalysisNumber ) ;
if ( ( ( selectDB ) spiRiskProbeAnalysis ) . getValue ( ) ! = null & & ( ( selectDB ) spiRiskProbeAnalysis ) . getValue ( ) . equals ( " 1 " ) ) {
llRiskProbeAnalysisName . setVisibility ( View . VISIBLE ) ;
llRiskProbeAnalysisNumber . setVisibility ( View . VISIBLE ) ;
} else {
edtRiskProbeAnalysisName . setText ( " " ) ;
edtRiskProbeAnalysisNumber . setText ( " " ) ;
llRiskProbeAnalysisName . setVisibility ( View . GONE ) ;
llRiskProbeAnalysisNumber . setVisibility ( View . GONE ) ;
}
}
} ) ;
//H Проба какого субстрата или организма была взята
//H Проба какого субстрата или организма была взята
edtRiskProbeAnalysisName = ( EditText ) findViewById ( R . id . edtComments ) ;
edtRiskProbeAnalysisName = ( EditText ) findViewById ( R . id . edtComments ) ;
guiTableHealth . add ( edtRiskProbeAnalysisName , " risk_probe_analysis_name " ) ;
guiTableHealth . add ( edtRiskProbeAnalysisName , " risk_probe_analysis_name " ) ;
@ -1509,6 +1698,8 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
guiTableHealth . add ( edtRiskProbeAnalysisNumber , " risk_probe_analysis_number " ) ;
guiTableHealth . add ( edtRiskProbeAnalysisNumber , " risk_probe_analysis_number " ) ;
Integer user_id = null ;
Integer user_id = null ;
/*DbOpenHelper dboh = new DbOpenHelper(this);
/*DbOpenHelper dboh = new DbOpenHelper(this);
SQLiteDatabase db = dboh.getReadableDatabase();
SQLiteDatabase db = dboh.getReadableDatabase();
@ -1586,7 +1777,7 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
// ((selectDB)spiRegion).clearFields();
// ((selectDB)spiRegion).clearFields();
// ((selectDB)spiRegion).addField("", "");
// ((selectDB)spiRegion).addField("", "");
//
//
// if(((selectDB)spiCountry).getValue() != null && ((selectDB)spiCountry).getValue() != "")
// if(((selectDB)spiCountry).getValue() != null && ! ((selectDB)spiCountry).getValue().equals( ""))
// {
// {
// DbOpenHelper dboh = new DbOpenHelper(LocustHealthActivity.this);
// DbOpenHelper dboh = new DbOpenHelper(LocustHealthActivity.this);
// Cursor cursor = dboh.getReadableDatabase().rawQuery(
// Cursor cursor = dboh.getReadableDatabase().rawQuery(
@ -2246,10 +2437,9 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
//
//
//
//
//
cbTest = ( CheckBox ) findViewById ( R . id . cbTest ) ;
// cbTest = (CheckBox) findViewById(R.id.cbTest) ;
guiTableHealth . add ( cbTest , " test " ) ;
// guiTable.add(cbTest, "test");
//
// OnCheckedChangeListener ccl = new OnCheckedChangeListener()
// OnCheckedChangeListener ccl = new OnCheckedChangeListener()
// {
// {
// public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
// public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
@ -2745,40 +2935,73 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
@Override
@Override
public void onResume ( ) {
public void onResume ( ) {
super . onResume ( ) ;
super . onResume ( ) ;
//
// if( spiCountry. getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) (( AutoCompleteTextViewDB) spiCountry). updateAdapter(this) ;
if ( spiCountry. getClass( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB) spiCountry) . updateAdapter( this ) ;
// if( spiRegion. getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) (( AutoCompleteTextViewDB) spiRegion). updateAdapter(this) ;
if ( spiRegion. getClass( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB) spiRegion) . updateAdapter( this ) ;
// if( spiVegType. getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) (( AutoCompleteTextViewDB) spiVegType). updateAdapter(this) ;
if ( spiVegType. getClass( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB) spiVegType) . updateAdapter( this ) ;
// if( spiVegCover. getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) (( AutoCompleteTextViewDB) spiVegCover). updateAdapter(this) ;
if ( spiVegCover. getClass( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB) spiVegCover) . updateAdapter( this ) ;
// if(spiVegDamage.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiVegDamage).updateAdapter(this) ;
if ( spiInsFormulation . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiInsFormulation ) . updateAdapter ( this ) ;
// if(spiInsFormulation.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) (( AutoCompleteTextViewDB) spiInsFormulation).updateAdapter(this) ;
if ( spiInsDiluted . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB) spiInsDiluted ) . updateAdapter ( this ) ;
// if(spiWeaTimeStart.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiWeaTimeStart).updateAdapter(this) ;
if ( spiInsContainerState . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiInsContainerState ) . updateAdapter ( this ) ;
// if(spiWeaTimeEnd.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) (( AutoCompleteTextViewDB) spiWeaTimeEnd).updateAdapter(this) ;
if ( spiWeaTimeStart . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB) spiWeaTimeStart ) . updateAdapter ( this ) ;
// if(spiWindDirectionStart.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiWindDirectionStart).updateAdapter(this) ;
if ( spiWeaTimeEnd . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiWeaTimeEnd ) . updateAdapter ( this ) ;
// if( spiWindDirectionEnd.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) (( AutoCompleteTextViewDB) spiWindDirectionEnd).updateAdapter(this) ;
if ( spiWindDirectionStart . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB) spiWindDirectionStart ) . updateAdapter ( this ) ;
// if(spiSprayDirectionStart.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiSprayDirectionStart).updateAdapter(this) ;
if ( spiWindDirectionEnd . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiWindDirectionEnd ) . updateAdapter ( this ) ;
// if( spiSprayDirectionEnd.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) (( AutoCompleteTextViewDB) spiSprayDirectionEnd).updateAdapter(this) ;
if ( spiSprayDirectionStart . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB) spiSprayDirectionStart ) . updateAdapter ( this ) ;
// //if(spiLocSpecies.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiLocSpeciese).updateAdapter(this) ;
if ( spiSprayDirectionEnd . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiSprayDirectionEnd ) . updateAdapter ( this ) ;
// if(spiLocHoppers.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) (( AutoCompleteTextViewDB) spiLocHoppers).updateAdapter(this) ;
if ( spiLocSpecies . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB) spiLocSpecies ) . updateAdapter ( this ) ;
// //if(spiImago.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiImago).updateAdapter(this) ;
if ( spiLocHoppers . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiLocHoppers ) . updateAdapter ( this ) ;
// //if(spiKuliguli.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiKuliguli).updateAdapter(this) ;
if ( spiMainPurpose . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiMainPurpose ) . updateAdapter ( this ) ;
// //if(spiSwarm.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiSwarm).updateAdapter(this) ;
if ( spiSprPlatform . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiSprPlatform ) . updateAdapter ( this ) ;
// //if(spiSparse.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiSparse).updateAdapter(this) ;
if ( spiSprPlatformA . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiSprPlatformA ) . updateAdapter ( this ) ;
// if(spiMainPurpose.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiMainPurpose).updateAdapter(this) ;
if ( spiSprPlatformG . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiSprPlatformG ) . updateAdapter ( this ) ;
// if(spiLocustPhaseId.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiLocustPhaseId).updateAdapter(this) ;
if ( spiSprPlatformH . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiSprPlatformH ) . updateAdapter ( this ) ;
// if(spiSprPlatform.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) (( AutoCompleteTextViewDB) spiSprPlatform). updateAdapter(this) ;
if ( spiSprLeak . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB) spiSprLeak ) . updateAdapter( this ) ;
// if(spiSprPlatformA.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) (( AutoCompleteTextViewDB) spiSprPlatformA).updateAdapter(this) ;
if ( spiSprDamage . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB) spiSprDamage ) . updateAdapter ( this ) ;
// if(spiSprPlatformG.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) (( AutoCompleteTextViewDB) spiSprPlatformG).updateAdapter(this) ;
if ( spiSprBarrier . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB) spiSprBarrier ) . updateAdapter ( this ) ;
// if(spiSprPlatformH.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) (( AutoCompleteTextViewDB) spiSprPlatformH).updateAdapter(this) ;
if ( spiSprMarking . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB) spiSprMarking ) . updateAdapter ( this ) ;
// if(spiSprBarrier.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) (( AutoCompleteTextViewDB) spiSprBarrier).updateAdapter(this) ;
if ( spiSprObservation . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB) spiSprObservation ) . updateAdapter ( this ) ;
// if(spiSprMarking.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiSprMarking).updateAdapter(this) ;
if ( spiCalibrConsumptionCheck . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiCalibrConsumptionCheck ) . updateAdapter ( this ) ;
// if(spiEffMethod.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiEffMethod).updateAdapter(this) ;
if ( spiCalibrPrecipitation . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiCalibrPrecipitation ) . updateAdapter ( this ) ;
// if(spiProtectiveClothingClean.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiProtectiveClothingClean).updateAdapter(this) ;
if ( spiEffControl . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiEffControl ) . updateAdapter ( this ) ;
// if(spiOperatorExposedInsecticide.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiOperatorExposedInsecticide).updateAdapter(this) ;
if ( spiEffTypeImpact . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiEffTypeImpact ) . updateAdapter ( this ) ;
// if(spiSafNonTarget.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiSafNonTarget).updateAdapter(this) ;
if ( spiEffMethod . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiEffMethod ) . updateAdapter ( this ) ;
// if(spiSafIncident.getClass().toString().indexOf("dbfields.AutoCompleteTextViewDB")!=-1) ((AutoCompleteTextViewDB)spiSafIncident).updateAdapter(this) ;
if ( spiEffControl2 . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiEffControl2 ) . updateAdapter ( this ) ;
//
if ( spiEffTypeImpact2 . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiEffTypeImpact2 ) . updateAdapter ( this ) ;
// updateAlpha() ;
if ( spiEffMethod2 . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiEffMethod2 ) . updateAdapter ( this ) ;
if ( spiHlthProtectiveClothingClean . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiHlthProtectiveClothingClean ) . updateAdapter ( this ) ;
if ( spiHlthClothingReserve . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiHlthClothingReserve ) . updateAdapter ( this ) ;
if ( spiHlthInhibition . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiHlthInhibition ) . updateAdapter ( this ) ;
if ( spiOperatorExposedInsecticide . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiOperatorExposedInsecticide ) . updateAdapter ( this ) ;
if ( spiSafObservedPollution . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiSafObservedPollution ) . updateAdapter ( this ) ;
if ( spiSafNonTarget . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiSafNonTarget ) . updateAdapter ( this ) ;
if ( spiSafNonTarget2 . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiSafNonTarget2 ) . updateAdapter ( this ) ;
if ( spiSafIncident . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiSafIncident ) . updateAdapter ( this ) ;
if ( spiSafControl . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiSafControl ) . updateAdapter ( this ) ;
if ( spiMapTreatment . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiMapTreatment ) . updateAdapter ( this ) ;
if ( spiRiskHouse . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskHouse ) . updateAdapter ( this ) ;
if ( spiRiskHouseBufferZones . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskHouseBufferZones ) . updateAdapter ( this ) ;
if ( spiRiskHouseImpact . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskHouseImpact ) . updateAdapter ( this ) ;
if ( spiRiskHouseInformed . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskHouseInformed ) . updateAdapter ( this ) ;
if ( spiRiskWater . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskWater ) . updateAdapter ( this ) ;
if ( spiRiskWaterBufferZones . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskWaterBufferZones ) . updateAdapter ( this ) ;
if ( spiRiskWaterImpact . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskWaterImpact ) . updateAdapter ( this ) ;
if ( spiRiskApiary . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskApiary ) . updateAdapter ( this ) ;
if ( spiRiskApiaryInformed . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskApiaryInformed ) . updateAdapter ( this ) ;
if ( spiRiskApiaryImpact . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskApiaryImpact ) . updateAdapter ( this ) ;
if ( spiRiskAgricultural . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskAgricultural ) . updateAdapter ( this ) ;
if ( spiRiskAgriculturalToxic . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskAgriculturalToxic ) . updateAdapter ( this ) ;
if ( spiRiskAgriculturalInform . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskAgriculturalInform ) . updateAdapter ( this ) ;
if ( spiRiskSilk . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskSilk ) . updateAdapter ( this ) ;
if ( spiRiskSilkInform . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskSilkInform ) . updateAdapter ( this ) ;
if ( spiRiskSilkTreesImpact . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskSilkTreesImpact ) . updateAdapter ( this ) ;
if ( spiRiskPastures . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskPastures ) . updateAdapter ( this ) ;
if ( spiRiskPasturesInform . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskPasturesInform ) . updateAdapter ( this ) ;
if ( spiRiskPark . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskPark ) . updateAdapter ( this ) ;
if ( spiRiskParkBufferZones . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskParkBufferZones ) . updateAdapter ( this ) ;
if ( spiRiskParkImpact . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskParkImpact ) . updateAdapter ( this ) ;
if ( spiRiskProbeAnalysis . getClass ( ) . toString ( ) . indexOf ( " dbfields.AutoCompleteTextViewDB " ) ! = - 1 ) ( ( AutoCompleteTextViewDB ) spiRiskProbeAnalysis ) . updateAdapter ( this ) ;
updateAlpha ( ) ;
}
}
// Сохраняются настройки перед уничтожением формы
// Сохраняются настройки перед уничтожением формы
@ -2921,9 +3144,144 @@ public class LocustHealthActivity extends FragmentActivity implements LocationLi
*/
*/
public void updateAlpha ( )
public void updateAlpha ( )
{
{
String value ;
boolean f ;
boolean f ;
int c ;
int c ;
//Галочка: "Контроль эффективности"
//Имеются ли в непосредственной близости от обработок жилые дома или жилье (в радиусе 2 км вокруг обрабатываемого участка)
//Имеются ли в непосредственной близости от обработок поверхностные воды (в радиусе 2 км вокруг обрабатываемого участка)
LinearLayout llRiskWaterDistance = findViewById ( R . id . llRiskWaterDistance ) ;
LinearLayout llRiskWaterBufferZones = findViewById ( R . id . llRiskWaterBufferZones ) ;
LinearLayout llRiskWaterImpact = findViewById ( R . id . llRiskWaterImpact ) ;
value = ( ( selectDB ) spiRiskApiary ) . getValue ( ) ;
if ( value ! = null & & value . equals ( " 1 " ) ) {
llRiskWaterDistance . setVisibility ( View . VISIBLE ) ;
llRiskWaterBufferZones . setVisibility ( View . VISIBLE ) ;
llRiskWaterImpact . setVisibility ( View . VISIBLE ) ;
} else {
edtRiskWaterDistance . setText ( " " ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskWaterBufferZones ) . setValue ( null ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskAgriculturalInform ) . setValue ( null ) ;
llRiskWaterDistance . setVisibility ( View . GONE ) ;
llRiskWaterBufferZones . setVisibility ( View . GONE ) ;
llRiskWaterImpact . setVisibility ( View . GONE ) ;
}
//Имеются ли в непосредственной близости от обработок пчеловодства (в радиусе 5 км вокруг обрабатываемого участка)
LinearLayout llRiskApiaryDistance = findViewById ( R . id . llRiskApiaryDistance ) ;
LinearLayout llRiskApiaryInformed = findViewById ( R . id . llRiskApiaryInformed ) ;
LinearLayout llRiskApiaryMeasure = findViewById ( R . id . llRiskApiaryMeasure ) ;
LinearLayout llRiskApiaryImpact = findViewById ( R . id . llRiskApiaryImpact ) ;
value = ( ( selectDB ) spiRiskApiary ) . getValue ( ) ;
if ( value ! = null & & value . equals ( " 1 " ) ) {
llRiskApiaryDistance . setVisibility ( View . VISIBLE ) ;
llRiskApiaryInformed . setVisibility ( View . VISIBLE ) ;
llRiskApiaryMeasure . setVisibility ( View . VISIBLE ) ;
llRiskApiaryImpact . setVisibility ( View . VISIBLE ) ;
} else {
edtRiskApiaryDistance . setText ( " " ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskApiaryInformed ) . setValue ( null ) ;
edtRiskApiaryMeasure . setText ( " " ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskAgriculturalInform ) . setValue ( null ) ;
llRiskApiaryDistance . setVisibility ( View . GONE ) ;
llRiskApiaryInformed . setVisibility ( View . GONE ) ;
llRiskApiaryMeasure . setVisibility ( View . GONE ) ;
llRiskApiaryImpact . setVisibility ( View . GONE ) ;
}
//Были ли обработаны или подверглись воздействию какие-либо сельхозкультуры?
LinearLayout llRiskAgriculturalName = findViewById ( R . id . llRiskAgriculturalName ) ;
LinearLayout llRiskAgriculturalPhase = findViewById ( R . id . llRiskAgriculturalPhase ) ;
LinearLayout llRiskAgriculturalToxic = findViewById ( R . id . llRiskAgriculturalToxic ) ;
LinearLayout llRiskAgriculturalInform = findViewById ( R . id . llRiskAgriculturalInform ) ;
value = ( ( selectDB ) spiRiskAgricultural ) . getValue ( ) ;
if ( value ! = null & & value . equals ( " 1 " ) ) {
llRiskAgriculturalName . setVisibility ( View . VISIBLE ) ;
llRiskAgriculturalPhase . setVisibility ( View . VISIBLE ) ;
llRiskAgriculturalToxic . setVisibility ( View . VISIBLE ) ;
llRiskAgriculturalInform . setVisibility ( View . VISIBLE ) ;
} else {
edtRiskAgriculturalName . setText ( " " ) ;
edtRiskAgriculturalPhase . setText ( " " ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskAgriculturalToxic ) . setValue ( null ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskAgriculturalInform ) . setValue ( null ) ;
llRiskAgriculturalName . setVisibility ( View . GONE ) ;
llRiskAgriculturalPhase . setVisibility ( View . GONE ) ;
llRiskAgriculturalToxic . setVisibility ( View . GONE ) ;
llRiskAgriculturalInform . setVisibility ( View . GONE ) ;
}
//Имеются ли в непосредственной близости от обработок шелководства (в радиусе 2 км вокруг обрабатываемого участка)
LinearLayout llRiskSilkDistance = findViewById ( R . id . llRiskSilkDistance ) ;
LinearLayout llRiskSilkInform = findViewById ( R . id . llRiskSilkInform ) ;
LinearLayout llRiskSilkTreesMeasure = findViewById ( R . id . llRiskSilkTreesMeasure ) ;
LinearLayout llRiskSilkTreesImpact = findViewById ( R . id . llRiskSilkTreesImpact ) ;
value = ( ( selectDB ) spiRiskSilk ) . getValue ( ) ;
if ( value ! = null & & value . equals ( " 1 " ) ) {
llRiskSilkDistance . setVisibility ( View . VISIBLE ) ;
llRiskSilkInform . setVisibility ( View . VISIBLE ) ;
llRiskSilkTreesMeasure . setVisibility ( View . VISIBLE ) ;
llRiskSilkTreesImpact . setVisibility ( View . VISIBLE ) ;
} else {
edtRiskSilkDistance . setText ( " " ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskSilkInform ) . setValue ( null ) ;
edtRiskSilkTreesMeasure . setText ( " " ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskSilkTreesImpact ) . setValue ( null ) ;
llRiskSilkDistance . setVisibility ( View . GONE ) ;
llRiskSilkInform . setVisibility ( View . GONE ) ;
llRiskSilkTreesMeasure . setVisibility ( View . GONE ) ;
llRiskSilkTreesImpact . setVisibility ( View . GONE ) ;
}
//H Были ли обработаны луга или пастбища?
LinearLayout llRiskPasturesInform = findViewById ( R . id . llRiskPasturesInform ) ;
value = ( ( selectDB ) spiRiskPastures ) . getValue ( ) ;
if ( value ! = null & & value . equals ( " 1 " ) ) {
llRiskPasturesInform . setVisibility ( View . VISIBLE ) ;
} else {
( ( dbfields . AutoCompleteTextViewDB ) spiRiskPasturesInform ) . setValue ( null ) ;
llRiskPasturesInform . setVisibility ( View . GONE ) ;
}
LinearLayout llRiskParkType = findViewById ( R . id . llRiskParkType ) ;
LinearLayout llRiskParkDistance = findViewById ( R . id . llRiskParkDistance ) ;
LinearLayout llRiskParkBufferZones = findViewById ( R . id . llRiskParkBufferZones ) ;
LinearLayout llRiskParkImpact = findViewById ( R . id . llRiskParkImpact ) ;
value = ( ( selectDB ) spiRiskPark ) . getValue ( ) ;
if ( value ! = null & & value . equals ( " 1 " ) ) {
llRiskParkType . setVisibility ( View . VISIBLE ) ;
llRiskParkDistance . setVisibility ( View . VISIBLE ) ;
llRiskParkBufferZones . setVisibility ( View . VISIBLE ) ;
llRiskParkImpact . setVisibility ( View . VISIBLE ) ;
} else {
edtRiskParkType . setText ( " " ) ;
edtRiskParkDistance . setText ( " " ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskParkBufferZones ) . setValue ( null ) ;
( ( dbfields . AutoCompleteTextViewDB ) spiRiskParkImpact ) . setValue ( null ) ;
llRiskParkType . setVisibility ( View . GONE ) ;
llRiskParkDistance . setVisibility ( View . GONE ) ;
llRiskParkBufferZones . setVisibility ( View . GONE ) ;
llRiskParkImpact . setVisibility ( View . GONE ) ;
}
//Пробы, взятые для анализа остатков
LinearLayout llRiskProbeAnalysisName = findViewById ( R . id . llRiskProbeAnalysisName ) ;
LinearLayout llRiskProbeAnalysisNumber = findViewById ( R . id . llRiskProbeAnalysisNumber ) ;
value = ( ( selectDB ) spiRiskProbeAnalysis ) . getValue ( ) ;
if ( value ! = null & & value . equals ( " 1 " ) ) {
llRiskProbeAnalysisName . setVisibility ( View . VISIBLE ) ;
llRiskProbeAnalysisNumber . setVisibility ( View . VISIBLE ) ;
} else {
edtRiskProbeAnalysisName . setText ( " " ) ;
edtRiskProbeAnalysisNumber . setText ( " " ) ;
llRiskProbeAnalysisName . setVisibility ( View . GONE ) ;
llRiskProbeAnalysisNumber . setVisibility ( View . GONE ) ;
}
/*if (spiEffControl.isChecked())
/*if (spiEffControl.isChecked())
{
{
f = true;
f = true;