Elena/develop
Elena 2022-07-06 00:02:48 +02:00
commit 89ae0cce42
1 changed files with 18 additions and 7 deletions

View File

@ -1328,7 +1328,16 @@ namespace OliviaAddInPro.Helper
/////////////////////////////////////////////////////////
//Añade a la lista los ids que cumplen el filtro espacial
using (RowCursor cursor = fc.Search(filter))
try
{
ids = fc.Select(filter, SelectionType.ObjectID, SelectionOption.Normal).GetObjectIDs().ToList();
}
catch
{
ids = new List<long>();
}
/*using (RowCursor cursor = fc.Search(filter))
{
while (cursor.MoveNext() && !cps.Getcancelled())
{
@ -1337,7 +1346,7 @@ namespace OliviaAddInPro.Helper
ids.Add(feature.GetObjectID());
}
}
}
}*/
if (ids.Count <= 0)
{
OutStr = "Error al aplicar filtro espacial en exportación";
@ -1675,7 +1684,9 @@ namespace OliviaAddInPro.Helper
if (ids.Count <= 0)
return string.Empty;
string ids_str = "(";
//string ids_str = "("+;
return ObjectId+" IN (" + String.Join(",", ids) + ")";
/*
bool first = true;
foreach (long i in ids)
{
@ -1688,9 +1699,9 @@ namespace OliviaAddInPro.Helper
ids_str += "," + i.ToString();
}
//el último
ids_str += ")";
string whereClause = ObjectId + " IN " + ids_str; //Cambiar id a otro sitio
return whereClause;
ids_str += ")";*/
//string whereClause = ObjectId + " IN " + ids_str; //Cambiar id a otro sitio
//return whereClause;
/*string consulta, orstr;
consulta = string.Empty;