Log mensaje error
parent
e834cdfb57
commit
895d4e89f0
|
|
@ -1443,11 +1443,14 @@ namespace OliviaAddInPro.Helper
|
|||
if (!System.IO.Directory.Exists(outpath))
|
||||
System.IO.Directory.CreateDirectory(outpath);
|
||||
FeatureClass fc = null;
|
||||
bool debug = true;
|
||||
/////////////////////////////////////////////////////////
|
||||
//Prepara una where_clause con las entidades que cumplen el filtro
|
||||
//Abre la featureclass
|
||||
try
|
||||
{
|
||||
if (debug)
|
||||
HelperGlobal.ponMsg("pathLayerIn " + pathLayerIn);
|
||||
fc = GetFtClassSync(pathLayerIn);
|
||||
if (fc == null)
|
||||
{
|
||||
|
|
@ -1456,14 +1459,17 @@ namespace OliviaAddInPro.Helper
|
|||
}
|
||||
List<long> ids = new List<long>();
|
||||
|
||||
if (debug)
|
||||
HelperGlobal.ponMsg("fc " + fc.GetName() + " tipo " + fc.GetType().Name);
|
||||
/////////////////////////////////////////////////////////
|
||||
//Añade a la lista los ids que cumplen el filtro espacial
|
||||
try
|
||||
{
|
||||
ids = fc.Select(filter, SelectionType.ObjectID, SelectionOption.Normal).GetObjectIDs().ToList();
|
||||
}
|
||||
catch
|
||||
{
|
||||
catch(Exception ex)
|
||||
{
|
||||
OutStr = "Error al seleccionar IDs. "+ex.Message;
|
||||
ids = new List<long>();
|
||||
}
|
||||
|
||||
|
|
@ -1479,7 +1485,7 @@ namespace OliviaAddInPro.Helper
|
|||
}*/
|
||||
if (ids.Count <= 0)
|
||||
{
|
||||
OutStr = "Error al aplicar filtro espacial en exportación";
|
||||
OutStr = "Error al aplicar filtro espacial en exportación: "+ OutStr;
|
||||
return false;
|
||||
}
|
||||
/////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -832,7 +832,6 @@ namespace OliviaAddInPro.Services
|
|||
string shapefile = System.IO.Path.GetFileNameWithoutExtension(path_shape);
|
||||
int ind = shapefile.IndexOf("_", 0);
|
||||
string prefijo = shapefile.Substring(ind + 1, 1);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//decodifica el nombre del shapefile para asignarle el correspondiente nombre en la GDB a la que se importa el shape
|
||||
string tratamiento = string.Empty;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace OliviaAddInPro.Services
|
|||
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<bool>)(() =>
|
||||
{
|
||||
string GdbFileName = resp.Value;
|
||||
|
||||
string nombAmbitos = string.Empty;
|
||||
if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.EjecSecto)) //Ha terminado bien la sectorización
|
||||
{
|
||||
//actualiza los flags
|
||||
|
|
@ -130,7 +130,7 @@ namespace OliviaAddInPro.Services
|
|||
if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.EjecPlanif)) //Ha terminado bien la planificación
|
||||
{
|
||||
//guarda csv
|
||||
GuardaCsv(inst);
|
||||
GuardaCsv(inst,resp2.Value);
|
||||
}
|
||||
msg = Resource1.String_exito;
|
||||
|
||||
|
|
@ -209,7 +209,7 @@ namespace OliviaAddInPro.Services
|
|||
/*
|
||||
* Permite guardar el archivo CSV que contiene la secuencia que se ha llevado a cabo en las rutas en la planificación.
|
||||
*/
|
||||
public static void GuardaCsv(TratamientoComun inst)
|
||||
public static void GuardaCsv(TratamientoComun inst, string pathImport)
|
||||
{
|
||||
string auxi, nombre = null;
|
||||
string[] nameDokL;
|
||||
|
|
@ -221,7 +221,10 @@ namespace OliviaAddInPro.Services
|
|||
string Filter = "Secuencia en formato CSV (*.csv)|*.csv";
|
||||
inst.decode_gdb(System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathData),
|
||||
out auxi, out nombre);
|
||||
|
||||
if (!string.IsNullOrEmpty(pathImport))
|
||||
{
|
||||
nombre = System.IO.Path.GetFileNameWithoutExtension(pathImport);
|
||||
}
|
||||
//string Path = HelperGdb.SaveFileDlg(Title, DirData, inst.ServCom.EXT_CSV, Filter);
|
||||
string Path = string.Empty;
|
||||
if (OliviaGlob.CompruebaExistePath(OliviaGlob.Paths.PathGuardCsv))
|
||||
|
|
@ -234,7 +237,7 @@ namespace OliviaAddInPro.Services
|
|||
bool ok = HelperGlobal.ponMsg("Se va a perder el archivo que contiene la secuencia en planificación, ¿está seguro?",
|
||||
MessageBoxImage.Question,"OLIVIA",MessageBoxButton.YesNo);
|
||||
if (!ok)
|
||||
GuardaCsv(inst);
|
||||
GuardaCsv(inst, pathImport);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
</DataTemplate>
|
||||
</-->
|
||||
</ComboBox>
|
||||
<TextBox x:Name="txtBox_densCont" Width="60" ToolTip="{Binding ToolTip_TextDensCont}" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Visibility="{Binding Path=VisTextDens, Mode = TwoWay}" Grid.Column="1" Margin="10,0" TextWrapping="NoWrap" Text="{Binding Path=TextDensCont, Mode = TwoWay}" TextAlignment="Right" MaxLength="5" PreviewTextInput="txtBox_densCont_PreviewTextInput"/>
|
||||
<TextBox x:Name="txtBox_densCont" Width="60" ToolTip="{Binding ToolTip_TextDensCont}" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Visibility="{Binding Path=VisTextDens, Mode = TwoWay}" Grid.Column="1" Margin="10,0" TextWrapping="NoWrap" Text="{Binding Path=TextDensCont, Mode = TwoWay}" TextAlignment="Right" MaxLength="8" PreviewTextInput="txtBox_densCont_PreviewTextInput"/>
|
||||
<Label x:Name="label_densCont" Grid.Column="2" Content="kg/m3" Margin="0,-1,0,0" Visibility="{Binding Path=VisTextDens, Mode = TwoWay}"/>
|
||||
</Grid>
|
||||
<Label Content="Tipo de carga" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
||||
|
|
@ -91,7 +91,7 @@
|
|||
<ComboBox x:Name="comboBox_tipoCapac" IsEnabled="{Binding EnabComboCapac, Mode=TwoWay}" ItemsSource="{Binding TiposCapac, Mode=TwoWay}" HorizontalAlignment="Left" Margin="0,0,0,0"
|
||||
VerticalAlignment="Top" Width="75"
|
||||
SelectedIndex="{Binding TipoCapac}" SelectionChanged="comboBox_tipoCapac_SelectionChanged"/>
|
||||
<TextBox x:Name="txtBox_kgCapac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Grid.Column="1" Margin="5,0,0,3" TextWrapping="NoWrap" Text="{Binding Path=TextKgCapac, Mode = TwoWay}" TextAlignment="Right" MaxLength="4" PreviewTextInput="txtBox_kgCapac_PreviewTextInput"/>
|
||||
<TextBox x:Name="txtBox_kgCapac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Grid.Column="1" Margin="5,0,0,3" TextWrapping="NoWrap" Text="{Binding Path=TextKgCapac, Mode = TwoWay}" TextAlignment="Right" MaxLength="8" PreviewTextInput="txtBox_kgCapac_PreviewTextInput"/>
|
||||
<Label x:Name="label_kgmax" Grid.Column="2" Content="kg máx. por viaje" Margin="0,-1,0,0"/>
|
||||
</Grid>
|
||||
<Label Content="Tiempo de vaciado de contenedor" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Margin="0,0,0,8" TextWrapping="NoWrap" Text="{Binding Path=TextTVaci, Mode = TwoWay}" TextAlignment="Right" MaxLength="3" PreviewTextInput="TextBox_PreviewTextInput"/>
|
||||
<TextBox IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Margin="0,0,0,8" TextWrapping="NoWrap" Text="{Binding Path=TextTVaci, Mode = TwoWay}" TextAlignment="Right" MaxLength="4" PreviewTextInput="TextBox_PreviewTextInput"/>
|
||||
<Label Grid.Column="1" Content="seg." Margin="0,-3,0,8"/>
|
||||
</Grid>
|
||||
<Label Margin="15,0,0,0" Content="Planta de descarga" FontWeight="DemiBold"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue