Control errores y comparacion columnas

Elena/develop
Gerardo 2022-06-29 21:29:06 +02:00
parent 828eff60c1
commit 7f0671935b
3 changed files with 9 additions and 2 deletions

View File

@ -787,7 +787,8 @@ namespace OliviaAddInPro.Helper
int mal = 0; int mal = 0;
for (i = 0; i < camps.Length; i++) for (i = 0; i < camps.Length; i++)
{ {
if (!fields.Contains(camps[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())))
{ {
OutStr = OutStr + camps[i] + " "; OutStr = OutStr + camps[i] + " ";
mal++; mal++;
@ -828,7 +829,9 @@ namespace OliviaAddInPro.Helper
int mal = 0; int mal = 0;
for (i = 0; i < camps.Length; i++) for (i = 0; i < camps.Length; i++)
{ {
if (!fields.Contains(camps[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())))
{ {
OutStr = OutStr + camps[i] + " "; OutStr = OutStr + camps[i] + " ";
mal++; mal++;
@ -1203,6 +1206,7 @@ namespace OliviaAddInPro.Helper
{ {
//realiza consulta //realiza consulta
n = 0; n = 0;
fc.GetDefinition().GetFields().First().Name kfadpskfpasp
using (Selection sel = fc.Select(new ArcGIS.Core.Data.QueryFilter { WhereClause = consulta }, SelectionType.ObjectID, SelectionOption.Normal)) using (Selection sel = fc.Select(new ArcGIS.Core.Data.QueryFilter { WhereClause = consulta }, SelectionType.ObjectID, SelectionOption.Normal))
n = sel.GetCount(); n = sel.GetCount();
} }

View File

@ -10,6 +10,8 @@ namespace OliviaAddInPro.Model
//************************************************************************************* //*************************************************************************************
//Enums y structs generales //Enums y structs generales
public static int BuffExport = 1000; public static int BuffExport = 1000;
//public static int MaxCaracteresBBDD = 10;
/** /**
* Nombre de los campos de la cartografía de la red navegable que se consultan para la exportación * Nombre de los campos de la cartografía de la red navegable que se consultan para la exportación
*/ */

View File

@ -129,6 +129,7 @@ namespace OliviaAddInPro.Services
if (res.HasError) if (res.HasError)
{ {
msg = res.Error.First(); msg = res.Error.First();
mal = true;
//actualiza los flags //actualiza los flags
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.FinEjecNOk); OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.FinEjecNOk);
} }