From c7f8bb403a5dafc9029a61bac79cb35c4101bbdf Mon Sep 17 00:00:00 2001 From: Elena Date: Mon, 13 Feb 2023 22:34:35 +0100 Subject: [PATCH] Arreglos ObjectID exportacion shp --- Helper/HelperGdb.cs | 11 +++++------ ViewModel/Limpieza/PaneLimpiezaSub1ViewModel.cs | 2 ++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Helper/HelperGdb.cs b/Helper/HelperGdb.cs index 65d5111..1ba3111 100644 --- a/Helper/HelperGdb.cs +++ b/Helper/HelperGdb.cs @@ -30,8 +30,7 @@ using Microsoft.Win32; namespace OliviaAddInPro.Helper { public static class HelperGdb - { - private static string ObjectId = "OBJECTID"; + { private static string out_str = string.Empty; public static string OutStr { @@ -877,7 +876,7 @@ namespace OliviaAddInPro.Helper for (i = 0; i < camps.Length; i++) { //if (!fields.Any(f=>f.ToUpper().Trim().Contains(camps[i].Substring (0,Math.Min(camps[i].Length, ComunDef.MaxCaracteresBBDD)).ToUpper().Trim()))) - if (!fields.Any(f=>f.ToUpper().Trim().Contains(camps[i].ToUpper().Trim()))) + if (!fields.Any(f=>f.ToUpper().Trim().Equals(camps[i].ToUpper().Trim()))) { OutStr = OutStr + camps[i] + " "; mal++; @@ -1451,8 +1450,8 @@ namespace OliviaAddInPro.Helper return false; } //convierte la lista de ids a string para la clause de la forma - //(id1, id2, id3..) - string whereClause = GetWhereClauseFromIds(ids); + //(id1, id2, id3..) + string whereClause = GetWhereClauseFromIds(ids, fc.GetDefinition().GetObjectIDField()); /////////////////////////////////////////////////////////// ///Exporta @@ -1771,7 +1770,7 @@ namespace OliviaAddInPro.Helper * Dada una lista de ids de elemento, crea una consulta en la que se llama a todos esos elementos * campo IN (id1, id2, id3..) */ - public static string GetWhereClauseFromIds(List ids) + public static string GetWhereClauseFromIds(List ids, string ObjectId = "OBJECTID") { if (ids.Count <= 0) return string.Empty; diff --git a/ViewModel/Limpieza/PaneLimpiezaSub1ViewModel.cs b/ViewModel/Limpieza/PaneLimpiezaSub1ViewModel.cs index 7861ab8..15b7af5 100644 --- a/ViewModel/Limpieza/PaneLimpiezaSub1ViewModel.cs +++ b/ViewModel/Limpieza/PaneLimpiezaSub1ViewModel.cs @@ -223,6 +223,8 @@ namespace OliviaAddInPro return false; } + LimpiezaDef.forma_filtros(); + amb_tra_gdb = limpServ.BuscAmbGdb(capa); bool hay_alguno = false; foreach (bool b in amb_tra_gdb)