personal previsiones y otros
parent
52b0dd99a9
commit
e389725954
|
|
@ -0,0 +1,31 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 14
|
||||||
|
VisualStudioVersion = 14.0.25420.1
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exferia_Kronos", "Exferia_Kronos\Exferia_Kronos.csproj", "{79DC322B-22F1-47FA-95EF-BEF62106F9F8}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj", "{A7DAC7F3-A963-462A-846F-FA4B8433542B}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{79DC322B-22F1-47FA-95EF-BEF62106F9F8} = {79DC322B-22F1-47FA-95EF-BEF62106F9F8}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{79DC322B-22F1-47FA-95EF-BEF62106F9F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{79DC322B-22F1-47FA-95EF-BEF62106F9F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{79DC322B-22F1-47FA-95EF-BEF62106F9F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{79DC322B-22F1-47FA-95EF-BEF62106F9F8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{A7DAC7F3-A963-462A-846F-FA4B8433542B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{A7DAC7F3-A963-462A-846F-FA4B8433542B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A7DAC7F3-A963-462A-846F-FA4B8433542B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{A7DAC7F3-A963-462A-846F-FA4B8433542B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._1_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo : KRO_TareasProgramadas_Historico
|
||||||
|
{
|
||||||
|
public INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
//TareaProgramada
|
||||||
|
public string TareaProgramada_Codigo { get; set; }
|
||||||
|
public string TareaProgramada_Descripcion { get; set; }
|
||||||
|
public DateTime? TareaProgramada_FechaBorrado { get; set; }
|
||||||
|
public string TareaProgramada
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (TareaProgramada_Codigo != null && TareaProgramada_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + TareaProgramada_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (TareaProgramada_Descripcion != null && TareaProgramada_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += TareaProgramada_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._1_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo : KRO_TareasProgramadas_Historico
|
||||||
|
{
|
||||||
|
public INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
//TareaProgramada
|
||||||
|
public string TareaProgramada_Codigo { get; set; }
|
||||||
|
public string TareaProgramada_Descripcion { get; set; }
|
||||||
|
public DateTime? TareaProgramada_FechaBorrado { get; set; }
|
||||||
|
public string TareaProgramada
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (TareaProgramada_Codigo != null && TareaProgramada_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + TareaProgramada_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (TareaProgramada_Descripcion != null && TareaProgramada_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += TareaProgramada_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._1_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_KRO_TareasProgramadas_Listado_Modelo : KRO_TareasProgramadas
|
||||||
|
{
|
||||||
|
public INTERNO_KRO_TareasProgramadas_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._1_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo : KRO_TareasProgramadas_Historico
|
||||||
|
{
|
||||||
|
public INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
//TareaProgramada
|
||||||
|
public string TareaProgramada_Codigo { get; set; }
|
||||||
|
public string TareaProgramada_Descripcion { get; set; }
|
||||||
|
public DateTime? TareaProgramada_FechaBorrado { get; set; }
|
||||||
|
public string TareaProgramada
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (TareaProgramada_Codigo != null && TareaProgramada_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + TareaProgramada_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (TareaProgramada_Descripcion != null && TareaProgramada_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += TareaProgramada_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._1_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_Retenciones_Modelo
|
||||||
|
{
|
||||||
|
public INTERNO_Retenciones_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
public int? retenciones_GuardarTodasLasVersiones_Dias { get; set; }
|
||||||
|
public int? retenciones_MantenerUltimaVersionDia_Dias { get; set; }
|
||||||
|
public int? retenciones_MantenerUltimaVersionSemana_Semanas { get; set; }
|
||||||
|
public int? retenciones_MantenerUltimaVersionMes_Meses { get; set; }
|
||||||
|
public int? retenciones_MantenerUltimaVersionAnyo_Anyos { get; set; }
|
||||||
|
public int? retenciones_UltimasVersionConservadas { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,719 @@
|
||||||
|
using Exferia_Aplicacion.Herencia.Capas;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using Exferia_General;
|
||||||
|
using Exferia_Kronos._1_Modelos;
|
||||||
|
using static Exferia_Aplicacion.General.Enumerados;
|
||||||
|
using System.Transactions;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._2_Datos
|
||||||
|
{
|
||||||
|
public class KRO_Notificaciones_Datos : ABS_Datos
|
||||||
|
{
|
||||||
|
#region Listados
|
||||||
|
public override List<dynamic> Obtener_Listado(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_RegistroListado(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo, long _lng_id, List<long> _lst_ids)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
protected override void ConsultaRellenar_Listado(Exferia_Entities _obj_Exferia_Entities, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<long> _lst_idEmpresasRelacionas, List<string> _lst_CamposConRelacionABuscar, long _lng_id, List<long> _lst_id, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{ }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Listado Secundario
|
||||||
|
public override List<dynamic> Obtener_Listado_Secundario(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_RegistroListado_Secundario(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo, long _lng_id, List<long> _lst_ids)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
protected override void ConsultaRellenar_Listado_Secundario(Exferia_Entities _obj_Exferia_Entities, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<long> _lst_idEmpresasRelacionadas, List<string> _lst_CamposConRelacionABuscar, long _lng_id, List<long> _lst_ids, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{ }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region F3
|
||||||
|
public override dynamic Obtener_F3(string _str_filtro, string _str_CampoBusqueda, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_F3_PorId(long _lng_id, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
protected override void ConsultaRellenar_F3(Exferia_Entities _obj_Exferia_Entities, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<long> _lst_idEmpresasRelacionadas, string _str_CampoBusqueda, string _str_Filtro, long _lng_id, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Obtener
|
||||||
|
|
||||||
|
#region Obtener Simple
|
||||||
|
private dynamic g_dnm_Modelo_Obtener = null;
|
||||||
|
|
||||||
|
private static int g_int_TotalHilos_Obtener = 2;
|
||||||
|
private bool[] g_bol_Hilos_Terminados_Obtener = new bool[g_int_TotalHilos_Obtener];
|
||||||
|
|
||||||
|
public override dynamic Obtener(long _lng_id)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string str_SQL =
|
||||||
|
" SELECT " +
|
||||||
|
nameof(KRO_Notificaciones) + "." + nameof(KRO_Notificaciones.id) + "," +
|
||||||
|
nameof(KRO_Notificaciones) + "." + nameof(KRO_Notificaciones.idTareaProgramada) + "," +
|
||||||
|
nameof(KRO_Notificaciones) + "." + nameof(KRO_Notificaciones.tipo) + "," +
|
||||||
|
nameof(KRO_Notificaciones) + "." + nameof(KRO_Notificaciones.idConfiguracionEmail) + "," +
|
||||||
|
nameof(KRO_Notificaciones) + "." + nameof(KRO_Notificaciones.notificarSiError) +
|
||||||
|
" FROM " + nameof(KRO_Notificaciones) +
|
||||||
|
" WHERE " + nameof(KRO_Notificaciones) + "." + nameof(KRO_Notificaciones.id) + "=@id ";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@id", _lng_id)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Rellenar el Modelo
|
||||||
|
g_dnm_Modelo_Obtener = obj_Exferia_Entities.Database.SqlQuery<KRO_Notificaciones>(str_SQL, arr_Parametros).FirstOrDefault();
|
||||||
|
|
||||||
|
#region Rellenar tablas relacionadas
|
||||||
|
if (g_dnm_Modelo_Obtener != null)
|
||||||
|
{
|
||||||
|
//reiniciar Valores de los hilos
|
||||||
|
for (int int_Contador = 0; int_Contador < g_int_TotalHilos_Obtener; int_Contador++)
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Obtener[int_Contador] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//KRO_TareasProgramadas ##########################################################################################
|
||||||
|
if (g_dnm_Modelo_Obtener.idTareaProgramada != null)
|
||||||
|
{
|
||||||
|
ThreadStart obj_ThreadStart_TAREAPROGRAMADA = new ThreadStart(Obtener_TareaProgramada_Modelo_Obtener);
|
||||||
|
Thread obj_Thread_TAREAPROGRAMADA = new Thread(obj_ThreadStart_TAREAPROGRAMADA);
|
||||||
|
obj_Thread_TAREAPROGRAMADA.Start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Obtener[0] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//GEN_ConfiguracionesEmails ##########################################################################################
|
||||||
|
if (g_dnm_Modelo_Obtener.idConfiguracionEmail != null)
|
||||||
|
{
|
||||||
|
ThreadStart obj_ThreadStart_CONFIGURACIONEMAIL = new ThreadStart(Obtener_ConfiguracionEmail_Modelo_Obtener);
|
||||||
|
Thread obj_Thread_CONFIGURACIONEMAIL = new Thread(obj_ThreadStart_CONFIGURACIONEMAIL);
|
||||||
|
obj_Thread_CONFIGURACIONEMAIL.Start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Obtener[1] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Esperando a que terminen todos los hilos .........................................
|
||||||
|
bool bol_Termino = false;
|
||||||
|
while (bol_Termino == false)
|
||||||
|
{
|
||||||
|
bol_Termino = true;
|
||||||
|
foreach (bool bol_Termino_Hilo in g_bol_Hilos_Terminados_Obtener)
|
||||||
|
{
|
||||||
|
if (bol_Termino_Hilo == false)
|
||||||
|
{
|
||||||
|
bol_Termino = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Thread.Sleep(10);
|
||||||
|
}
|
||||||
|
//.................................................................................
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Datos) + "/" + nameof(Obtener), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
return g_dnm_Modelo_Obtener;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Tablas Relacioandas
|
||||||
|
private void Obtener_TareaProgramada_Modelo_Obtener()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
KRO_TareasProgramadas_Datos obj_KRO_TareasProgramadas_Datos = new KRO_TareasProgramadas_Datos();
|
||||||
|
g_dnm_Modelo_Obtener.KRO_TareasProgramadas = obj_KRO_TareasProgramadas_Datos.Obtener_Modelo_Por_Id(g_dnm_Modelo_Obtener.idTareaProgramada);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Obtener[0] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void Obtener_ConfiguracionEmail_Modelo_Obtener()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
g_dnm_Modelo_Obtener.GEN_ConfiguracionesEmails = Datos_Generales.GEN_ConfiguracionesEmails_Obtener_Modelo_Por_Id(g_dnm_Modelo_Obtener.idConfiguracionEmail);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Obtener[1] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public override dynamic Obtener_Registro_PorCampo(string _str_Filtro, string _str_CampoBusqueda, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region MODELOS
|
||||||
|
|
||||||
|
#region Modelo Simple
|
||||||
|
private KRO_Notificaciones g_mdl_KRO_Notificaciones = null;
|
||||||
|
|
||||||
|
public KRO_Notificaciones Obtener_Modelo_Por_Id(long _lng_id)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + nameof(KRO_Notificaciones) + "." + nameof(KRO_Notificaciones.id) + "=@id";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@id", _lng_id)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el modelo
|
||||||
|
Ejecutar_Consulta_Modelo(str_SQL,
|
||||||
|
arr_Parametros);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Datos) + "/" + nameof(Obtener_Modelo_Por_Id), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_mdl_KRO_Notificaciones;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Ejecutar_Consulta_Modelo(string _str_SQL,
|
||||||
|
object[] _arr_Parametros)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Conexion
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
//Rellenar el Modelo
|
||||||
|
g_mdl_KRO_Notificaciones = obj_Exferia_Entities.Database.SqlQuery<KRO_Notificaciones>(_str_SQL, _arr_Parametros).FirstOrDefault();
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Datos) + "/" + nameof(Ejecutar_Consulta_Modelo), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Modelo Listado
|
||||||
|
private List<KRO_Notificaciones> g_lst_KRO_Notificaciones = null;
|
||||||
|
|
||||||
|
public List<KRO_Notificaciones> Obtener_ModeloListado_Por_Por_IdTareaprogramada(long _lng_idTareaProgramada,
|
||||||
|
bool _bol_Cargar_NotificacionesDestinos,
|
||||||
|
bool _bol_Cargar_ConfiguracionesEmails)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Consulta
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + nameof(KRO_Notificaciones) + "." + nameof(KRO_Notificaciones.idTareaProgramada) + "=@idTareaProgramada ";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idTareaProgramada", _lng_idTareaProgramada)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el listado
|
||||||
|
Ejecutar_Consulta_Modelo_Listado(str_SQL,
|
||||||
|
arr_Parametros,
|
||||||
|
_bol_Cargar_NotificacionesDestinos,
|
||||||
|
_bol_Cargar_ConfiguracionesEmails);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Datos) + "/" + nameof(Obtener_ModeloListado_Por_Por_IdTareaprogramada), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_lst_KRO_Notificaciones;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<KRO_Notificaciones> Obtener_ModeloListado_Por_IdsTareaProgramanadas(List<long> _lst_IdsTareaProgramada,
|
||||||
|
bool _bol_Cargar_NotificacionesDestinos,
|
||||||
|
bool _bol_Cargar_ConfiguracionesEmails)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (_lst_IdsTareaProgramada != null && _lst_IdsTareaProgramada.Count > 0)
|
||||||
|
{
|
||||||
|
List<SqlParameter> lst_Parametros = new List<SqlParameter>();
|
||||||
|
string str_Filtro_IDS = Funciones.Formar_ContenidoIN_ParaConsultaWhere(nameof(KRO_Notificaciones) ,
|
||||||
|
nameof(KRO_Notificaciones.idTareaProgramada),
|
||||||
|
G_ENUM_FORMARCONTENIDOIN_CONDICIONANTES.NADA,
|
||||||
|
_lst_IdsTareaProgramada);
|
||||||
|
|
||||||
|
//Consulta
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + str_Filtro_IDS;
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros = lst_Parametros.ToArray();
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el listado
|
||||||
|
Ejecutar_Consulta_Modelo_Listado(str_SQL,
|
||||||
|
arr_Parametros,
|
||||||
|
_bol_Cargar_NotificacionesDestinos,
|
||||||
|
_bol_Cargar_ConfiguracionesEmails);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Datos) + "/" + nameof(Obtener_ModeloListado_Por_IdsTareaProgramanadas), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_lst_KRO_Notificaciones;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Ejecutar Consulta
|
||||||
|
//Listado de modelos Relacionados
|
||||||
|
private List<KRO_Notificaciones_Destinos> g_lst_KRO_Notificaciones_Destinos = null;
|
||||||
|
private List<GEN_ConfiguracionesEmails> g_lst_GEN_ConfiguracionesEmails = null;
|
||||||
|
|
||||||
|
//Hilos
|
||||||
|
private static int g_int_TotalHilos_Modelo_Listado = 2;
|
||||||
|
private bool[] g_bol_Hilos_Terminados_Modelo_Listado = new bool[g_int_TotalHilos_Modelo_Listado];
|
||||||
|
|
||||||
|
private void Ejecutar_Consulta_Modelo_Listado(string _str_SQL,
|
||||||
|
object[] _arr_Parametros,
|
||||||
|
bool _bol_Cargar_NotificacionesDestinos,
|
||||||
|
bool _bol_Cargar_ConfiguracionesEmails)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Conexion
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
|
||||||
|
//Rellenar el modelo
|
||||||
|
g_lst_KRO_Notificaciones = obj_Exferia_Entities.Database.SqlQuery<KRO_Notificaciones>(_str_SQL, _arr_Parametros).ToList();
|
||||||
|
|
||||||
|
#region Rellenar tablas Relacionadas
|
||||||
|
if (g_lst_KRO_Notificaciones != null && g_lst_KRO_Notificaciones.Count > 0)
|
||||||
|
{
|
||||||
|
//Si tiene que buscar alguna tabla relacionada
|
||||||
|
if (_bol_Cargar_NotificacionesDestinos ||
|
||||||
|
_bol_Cargar_ConfiguracionesEmails)
|
||||||
|
{
|
||||||
|
#region PRIMERO BUSCO LOS DATOS DE LAS TABLAS RELACIONADAS
|
||||||
|
//reiniciar Valores de los hilos
|
||||||
|
for (int int_Contador = 0; int_Contador < g_int_TotalHilos_Modelo_Listado; int_Contador++)
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Modelo_Listado[int_Contador] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//KRO_Notificaciones_DEstinos #############################################
|
||||||
|
if (_bol_Cargar_NotificacionesDestinos)
|
||||||
|
{
|
||||||
|
ThreadStart obj_ThreadStart_NOTIFICACIONES_DESTINOS = new ThreadStart(Obtener_NotifiacionesDestinos_Modelo_Listado);
|
||||||
|
Thread obj_Thread_NOTIFICACIONES_DESTINOS = new Thread(obj_ThreadStart_NOTIFICACIONES_DESTINOS);
|
||||||
|
obj_Thread_NOTIFICACIONES_DESTINOS.Start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Modelo_Listado[0] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//GEN_ConfiguracionesEmails #############################################
|
||||||
|
if (_bol_Cargar_ConfiguracionesEmails)
|
||||||
|
{
|
||||||
|
ThreadStart obj_ThreadStart_CONFIGURACIONESEMAILS = new ThreadStart(Obtener_ConfiguracionesEmails_Modelo_Listado);
|
||||||
|
Thread obj_Thread_CONFIGURACIONESEMAILS = new Thread(obj_ThreadStart_CONFIGURACIONESEMAILS);
|
||||||
|
obj_Thread_CONFIGURACIONESEMAILS.Start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Modelo_Listado[0] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Esperando a que terminen todos los hilos .........................................
|
||||||
|
bool bol_Termino = false;
|
||||||
|
while (bol_Termino == false)
|
||||||
|
{
|
||||||
|
bol_Termino = true;
|
||||||
|
foreach (bool bol_Termino_Hilo in g_bol_Hilos_Terminados_Modelo_Listado)
|
||||||
|
{
|
||||||
|
if (bol_Termino_Hilo == false)
|
||||||
|
{
|
||||||
|
bol_Termino = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Thread.Sleep(10);
|
||||||
|
}
|
||||||
|
//.................................................................................
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region DESPUES SE LO VOY ASIGNANDO A LOS REGISTRO UNO A UNO
|
||||||
|
foreach (KRO_Notificaciones mdl_KRO_Notificaciones in g_lst_KRO_Notificaciones)
|
||||||
|
{
|
||||||
|
//KRO_NotificacionesDestinos #############################################
|
||||||
|
if (_bol_Cargar_NotificacionesDestinos &&
|
||||||
|
g_lst_KRO_Notificaciones_Destinos != null &&
|
||||||
|
g_lst_KRO_Notificaciones_Destinos.Count > 0)
|
||||||
|
{
|
||||||
|
mdl_KRO_Notificaciones.KRO_Notificaciones_Destinos = g_lst_KRO_Notificaciones_Destinos.Where(m => m.idNotificacion == mdl_KRO_Notificaciones.id).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
//GEN_ConfiguracionesEmails #############################################
|
||||||
|
if (_bol_Cargar_ConfiguracionesEmails &&
|
||||||
|
mdl_KRO_Notificaciones.idConfiguracionEmail != null &&
|
||||||
|
g_lst_GEN_ConfiguracionesEmails != null &&
|
||||||
|
g_lst_GEN_ConfiguracionesEmails.Count > 0)
|
||||||
|
{
|
||||||
|
mdl_KRO_Notificaciones.GEN_ConfiguracionesEmails = g_lst_GEN_ConfiguracionesEmails.Where(m => m.id == mdl_KRO_Notificaciones.idConfiguracionEmail.Value).FirstOrDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Datos) + "/" + nameof(Ejecutar_Consulta_Modelo_Listado), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Tablas Relacionadas
|
||||||
|
private void Obtener_NotifiacionesDestinos_Modelo_Listado()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
KRO_Notificaciones_Destinos_Datos obj_KRO_Notificaciones_Destinos_Datos = new KRO_Notificaciones_Destinos_Datos();
|
||||||
|
g_lst_KRO_Notificaciones_Destinos = obj_KRO_Notificaciones_Destinos_Datos.Obtener_ModeloListado_Por_IdsNotificacion(g_lst_KRO_Notificaciones.Select(m => m.id).ToList());
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{ }
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Modelo_Listado[0] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void Obtener_ConfiguracionesEmails_Modelo_Listado()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
g_lst_GEN_ConfiguracionesEmails = Datos_Generales.GEN_ConfiguracionesEmails_Obtener_Modelo_Listado_Por_Ids(g_lst_KRO_Notificaciones.Where(x => x.idConfiguracionEmail != null).Select(m => m.idConfiguracionEmail.Value).ToList());
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{ }
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Modelo_Listado[1] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private string Obtener_Consulta_Modelo()
|
||||||
|
{
|
||||||
|
return
|
||||||
|
" SELECT " +
|
||||||
|
nameof(KRO_Notificaciones.id) + "," +
|
||||||
|
nameof(KRO_Notificaciones.idTareaProgramada) + "," +
|
||||||
|
nameof(KRO_Notificaciones.tipo) + "," +
|
||||||
|
nameof(KRO_Notificaciones.idConfiguracionEmail) + "," +
|
||||||
|
nameof(KRO_Notificaciones.notificarSiError) +
|
||||||
|
" FROM " + nameof(KRO_Notificaciones);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Grabar
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Grabar(object _mdl_obj)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_INTERNO_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
KRO_Notificaciones mdl_KRO_Notificaciones_AGrabar = (KRO_Notificaciones)_mdl_obj;
|
||||||
|
KRO_Notificaciones mdl_KRO_Notificaciones_DatosViejos = new KRO_Notificaciones();
|
||||||
|
|
||||||
|
// Ver si existe ######################################################################
|
||||||
|
KRO_Notificaciones mdl_KRO_Notificaciones_Final = Obtener_Modelo_Por_Id(mdl_KRO_Notificaciones_AGrabar.id);
|
||||||
|
//######################################################################################
|
||||||
|
|
||||||
|
//UPDATE
|
||||||
|
if (mdl_KRO_Notificaciones_Final != null)
|
||||||
|
{
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_MODIFICAR;
|
||||||
|
|
||||||
|
//Datos viejos para la trazabilidad
|
||||||
|
Funciones.CopiarPropiedadesObjetos(mdl_KRO_Notificaciones_Final, mdl_KRO_Notificaciones_DatosViejos, false, false);
|
||||||
|
|
||||||
|
//Cargar los Datos Nuevos del Modelo
|
||||||
|
Funciones.CopiarPropiedadesObjetos(mdl_KRO_Notificaciones_AGrabar, mdl_KRO_Notificaciones_Final, false, false);
|
||||||
|
|
||||||
|
#region Update
|
||||||
|
string str_SQL_Update = " UPDATE " + nameof(KRO_Notificaciones) +
|
||||||
|
" SET " +
|
||||||
|
nameof(KRO_Notificaciones.idTareaProgramada) + "=@idTareaProgramada," +
|
||||||
|
nameof(KRO_Notificaciones.tipo) + "=@tipo," +
|
||||||
|
nameof(KRO_Notificaciones.idConfiguracionEmail) + "=@idConfiguracionEmail," +
|
||||||
|
nameof(KRO_Notificaciones.notificarSiError) + "=@notificarSiError" +
|
||||||
|
" WHERE " +
|
||||||
|
nameof(KRO_Notificaciones.id) + "=@id";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Update = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idTareaProgramada", mdl_KRO_Notificaciones_Final.idTareaProgramada),
|
||||||
|
new SqlParameter("@tipo", mdl_KRO_Notificaciones_Final.tipo),
|
||||||
|
mdl_KRO_Notificaciones_Final.idConfiguracionEmail != null
|
||||||
|
? new SqlParameter("@idConfiguracionEmail", mdl_KRO_Notificaciones_Final.idConfiguracionEmail.Value)
|
||||||
|
: new SqlParameter("@idConfiguracionEmail", DBNull.Value),
|
||||||
|
mdl_KRO_Notificaciones_Final.notificarSiError != null
|
||||||
|
? new SqlParameter("@notificarSiError", mdl_KRO_Notificaciones_Final.notificarSiError)
|
||||||
|
: new SqlParameter("@notificarSiError", DBNull.Value),
|
||||||
|
new SqlParameter("@id", mdl_KRO_Notificaciones_Final.id)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Update
|
||||||
|
obj_Exferia_Entities.Database.ExecuteSqlCommand(str_SQL_Update, arr_Parametros_Update);
|
||||||
|
|
||||||
|
//Id de la tabla
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Id = mdl_KRO_Notificaciones_Final.id;
|
||||||
|
}
|
||||||
|
//INSERT
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mdl_KRO_Notificaciones_Final = new KRO_Notificaciones();
|
||||||
|
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_INSERTAR;
|
||||||
|
|
||||||
|
//Cargar los Datos del Modelo
|
||||||
|
Funciones.CopiarPropiedadesObjetos(mdl_KRO_Notificaciones_AGrabar, mdl_KRO_Notificaciones_Final, false, false);
|
||||||
|
|
||||||
|
#region INSERT
|
||||||
|
string str_SQL_Insert = " INSERT INTO " + nameof(KRO_Notificaciones) +
|
||||||
|
" (" +
|
||||||
|
nameof(KRO_Notificaciones.idTareaProgramada) + "," +
|
||||||
|
nameof(KRO_Notificaciones.tipo) + "," +
|
||||||
|
nameof(KRO_Notificaciones.idConfiguracionEmail) + "," +
|
||||||
|
nameof(KRO_Notificaciones.notificarSiError) +
|
||||||
|
" ) " +
|
||||||
|
" OUTPUT INSERTED." + nameof(KRO_Notificaciones.id) +
|
||||||
|
" VALUES " +
|
||||||
|
" ( " +
|
||||||
|
"@idTareaProgramada," +
|
||||||
|
"@tipo," +
|
||||||
|
"@idConfiguracionEmail," +
|
||||||
|
"@notificarSiError" +
|
||||||
|
" ) ";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Insert = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idTareaProgramada", mdl_KRO_Notificaciones_Final.idTareaProgramada),
|
||||||
|
new SqlParameter("@tipo", mdl_KRO_Notificaciones_Final.tipo),
|
||||||
|
mdl_KRO_Notificaciones_Final.idConfiguracionEmail != null
|
||||||
|
? new SqlParameter("@idConfiguracionEmail", mdl_KRO_Notificaciones_Final.idConfiguracionEmail.Value)
|
||||||
|
: new SqlParameter("@idConfiguracionEmail", DBNull.Value),
|
||||||
|
mdl_KRO_Notificaciones_Final.notificarSiError != null
|
||||||
|
? new SqlParameter("@notificarSiError", mdl_KRO_Notificaciones_Final.notificarSiError)
|
||||||
|
: new SqlParameter("@notificarSiError", DBNull.Value)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Id de la tabla
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Id = obj_Exferia_Entities.Database.SqlQuery<long>(str_SQL_Insert, arr_Parametros_Insert).Single();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Grabar un registro de trazailidad con los datos de la transaccion realizada
|
||||||
|
Datos_Generales.USR_Trazabilidad_Grabar(typeof(KRO_Notificaciones), mdl_KRO_Notificaciones_DatosViejos, mdl_KRO_Notificaciones_DatosViejos, mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion, obj_Exferia_Entities);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Datos) + "/" + nameof(Grabar), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_INTERNO_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Borrar
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Borrar(long _lng_id)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_ELIMINAR;
|
||||||
|
|
||||||
|
using (TransactionScope transaccion_SQL = new TransactionScope(TransactionScopeOption.Required))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
// Ver si existe ######################################################################
|
||||||
|
KRO_Notificaciones mdl_KRO_Notificaciones_Final = Obtener_Modelo_Por_Id(_lng_id);
|
||||||
|
//######################################################################################
|
||||||
|
|
||||||
|
if (mdl_KRO_Notificaciones_Final != null)
|
||||||
|
{
|
||||||
|
#region Delete
|
||||||
|
string str_SQL_Delete = " DELETE FROM " + nameof(KRO_Notificaciones) +
|
||||||
|
" WHERE " +
|
||||||
|
nameof(KRO_Notificaciones.id) + "=@id";
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Delete = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@id", _lng_id)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Delete
|
||||||
|
obj_Exferia_Entities.Database.ExecuteSqlCommand(str_SQL_Delete, arr_Parametros_Delete);
|
||||||
|
|
||||||
|
//Grabar un registro de trazabailidad con los datos de la transaccion realizada.
|
||||||
|
Datos_Generales.USR_Trazabilidad_Grabar(typeof(KRO_Notificaciones), null, mdl_KRO_Notificaciones_Final, G_ENUM_TIPOACCION.INT_ELIMINAR, obj_Exferia_Entities);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Devolver también el Objeto
|
||||||
|
mdl_ValorDevuelto_Modelo.Id = _lng_id;
|
||||||
|
|
||||||
|
// Se termina la Transaccion Correctamente
|
||||||
|
transaccion_SQL.Complete();
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Datos) + "/" + nameof(Borrar), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
|
||||||
|
// Finalizar transaccion
|
||||||
|
transaccion_SQL.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return mdl_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Borrar(long _lng_id, long _lng_idAuxiliar)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Borrar(object _mdl_obj)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,416 @@
|
||||||
|
using Exferia_Aplicacion.Herencia.Capas;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using static Exferia_Aplicacion.General.Enumerados;
|
||||||
|
using Exferia_General;
|
||||||
|
using System.Transactions;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._2_Datos
|
||||||
|
{
|
||||||
|
public class KRO_Notificaciones_Destinos_Datos : ABS_Datos
|
||||||
|
{
|
||||||
|
#region Listado
|
||||||
|
public override List<dynamic> Obtener_Listado(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_RegistroListado(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo, long _lng_id, List<long> _lst_id)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
protected override void ConsultaRellenar_Listado(Exferia_Entities _obj_Exferia_Entities, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<long> _lst_idEmpresasRelacionas, List<string> _lst_CamposConRelacionABuscar, long _lng_id, List<long> _lst_id, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{ }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Listado Secundario
|
||||||
|
public override List<dynamic> Obtener_Listado_Secundario(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_RegistroListado_Secundario(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo, long _lng_id, List<long> _lst_ids)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
protected override void ConsultaRellenar_Listado_Secundario(Exferia_Entities _obj_Exferia_Entities, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<long> _lst_idEmpresasRelacionadas, List<string> _lst_CamposConRelacionABuscar, long _lng_id, List<long> _lst_ids, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{ }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region F3
|
||||||
|
public override dynamic Obtener_F3(string _str_filtro, string _str_CampoBusqueda, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_F3_PorId(long _lng_id, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
protected override void ConsultaRellenar_F3(Exferia_Entities _obj_Exferia_Entities, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<long> _lst_idEmpresasRelacionadas, string _str_CampoBusqueda, string _str_Filtro, long _lng_id, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{ }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Obtener
|
||||||
|
public override dynamic Obtener(long _lng_id)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_Registro_PorCampo(string _str_Filtro, string _str_CampoBusqueda, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region MODELOS
|
||||||
|
|
||||||
|
#region Modelo Simple
|
||||||
|
private KRO_Notificaciones_Destinos g_mdl_KRO_Notificaciones_Destinos = null;
|
||||||
|
|
||||||
|
public KRO_Notificaciones_Destinos Obtener_Modelo_Por_Id(long _lng_id)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + nameof(KRO_Notificaciones_Destinos) + "." + nameof(KRO_Notificaciones_Destinos.id) + "=@id";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@id", _lng_id)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el modelo
|
||||||
|
Ejecutar_Consulta_Modelo(str_SQL,
|
||||||
|
arr_Parametros);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Destinos_Datos) + "/" + nameof(Obtener_Modelo_Por_Id), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_mdl_KRO_Notificaciones_Destinos;
|
||||||
|
}
|
||||||
|
private void Ejecutar_Consulta_Modelo(string _str_SQL,
|
||||||
|
object[] _arr_Parametros)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Conexion
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
//Rellenar el Modelo
|
||||||
|
g_mdl_KRO_Notificaciones_Destinos = obj_Exferia_Entities.Database.SqlQuery<KRO_Notificaciones_Destinos>(_str_SQL, _arr_Parametros).FirstOrDefault();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Destinos_Datos) + "/" + nameof(Ejecutar_Consulta_Modelo), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Modelo Listado
|
||||||
|
private List<KRO_Notificaciones_Destinos> g_lst_KRO_Notificaciones_Destinos = null;
|
||||||
|
|
||||||
|
public List<KRO_Notificaciones_Destinos> Obtener_ModeloListado_Por_IdsNotificacion(List<long> _lst_IdsNotificacion)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (_lst_IdsNotificacion != null && _lst_IdsNotificacion.Count > 0)
|
||||||
|
{
|
||||||
|
string str_Filtro_IDS = Funciones.Formar_ContenidoIN_ParaConsultaWhere(nameof(KRO_Notificaciones_Destinos),
|
||||||
|
nameof(KRO_Notificaciones_Destinos.idNotificacion),
|
||||||
|
G_ENUM_FORMARCONTENIDOIN_CONDICIONANTES.NADA,
|
||||||
|
_lst_IdsNotificacion);
|
||||||
|
|
||||||
|
//Consulta
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + str_Filtro_IDS;
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el listado
|
||||||
|
Ejecutar_Consulta_Modelo_Listado(str_SQL,
|
||||||
|
new object[] { });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Destinos_Datos) + "/" + nameof(Obtener_ModeloListado_Por_IdsNotificacion), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_lst_KRO_Notificaciones_Destinos;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Ejecutar_Consulta_Modelo_Listado(string _str_SQL,
|
||||||
|
object[] _arr_Parametros)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Conexion
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
|
||||||
|
//Rellenar el modelo
|
||||||
|
g_lst_KRO_Notificaciones_Destinos = obj_Exferia_Entities.Database.SqlQuery<KRO_Notificaciones_Destinos>(_str_SQL, _arr_Parametros).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Destinos_Datos) + "/" + nameof(Ejecutar_Consulta_Modelo_Listado), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private string Obtener_Consulta_Modelo()
|
||||||
|
{
|
||||||
|
return
|
||||||
|
" SELECT " +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.id) + "," +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.idNotificacion) + "," +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.email) + "," +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.emailOculto) +
|
||||||
|
" FROM " + nameof(KRO_Notificaciones_Destinos);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Grabar
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Grabar(object _mdl_obj)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_INTERNO_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
KRO_Notificaciones_Destinos mdl_KRO_Notificaciones_Destinos_AGrabar = (KRO_Notificaciones_Destinos)_mdl_obj;
|
||||||
|
KRO_Notificaciones_Destinos mdl_KRO_Notificaciones_Destinos_DatosViejos = new KRO_Notificaciones_Destinos();
|
||||||
|
|
||||||
|
// Ver si existe ######################################################################
|
||||||
|
KRO_Notificaciones_Destinos mdl_KRO_Notificaciones_Destinos_Final = Obtener_Modelo_Por_Id(mdl_KRO_Notificaciones_Destinos_AGrabar.id);
|
||||||
|
//######################################################################################
|
||||||
|
|
||||||
|
//UPDATE
|
||||||
|
if (mdl_KRO_Notificaciones_Destinos_Final != null)
|
||||||
|
{
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_MODIFICAR;
|
||||||
|
|
||||||
|
//Datos viejos para la trazabilidad
|
||||||
|
Funciones.CopiarPropiedadesObjetos(mdl_KRO_Notificaciones_Destinos_Final, mdl_KRO_Notificaciones_Destinos_DatosViejos, false, false);
|
||||||
|
|
||||||
|
// Cargar los Datos Nuevos del Modelo
|
||||||
|
Funciones.CopiarPropiedadesObjetos(mdl_KRO_Notificaciones_Destinos_AGrabar, mdl_KRO_Notificaciones_Destinos_Final, false, false);
|
||||||
|
|
||||||
|
#region Update
|
||||||
|
string str_SQL_Update = " UPDATE " + nameof(KRO_Notificaciones_Destinos) +
|
||||||
|
" SET " +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.idNotificacion) + "=@idNotificacion," +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.email) + "=@email," +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.emailOculto) + "=@emailOculto" +
|
||||||
|
" WHERE " +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.id) + "=@id";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Update = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idNotificacion", mdl_KRO_Notificaciones_Destinos_Final.idNotificacion),
|
||||||
|
mdl_KRO_Notificaciones_Destinos_Final.email != null
|
||||||
|
? new SqlParameter("@email", mdl_KRO_Notificaciones_Destinos_Final.email)
|
||||||
|
: new SqlParameter("@email", DBNull.Value),
|
||||||
|
mdl_KRO_Notificaciones_Destinos_Final.emailOculto != null
|
||||||
|
? new SqlParameter("@emailOculto", mdl_KRO_Notificaciones_Destinos_Final.emailOculto.Value)
|
||||||
|
: new SqlParameter("@emailOculto", DBNull.Value),
|
||||||
|
new SqlParameter("@id", mdl_KRO_Notificaciones_Destinos_Final.id)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Update
|
||||||
|
obj_Exferia_Entities.Database.ExecuteSqlCommand(str_SQL_Update, arr_Parametros_Update);
|
||||||
|
|
||||||
|
//Id de la tabla
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Id = mdl_KRO_Notificaciones_Destinos_Final.id;
|
||||||
|
}
|
||||||
|
//INSERT
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mdl_KRO_Notificaciones_Destinos_Final = new KRO_Notificaciones_Destinos();
|
||||||
|
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_INSERTAR;
|
||||||
|
|
||||||
|
// Cargar los Datos del Modelo
|
||||||
|
Funciones.CopiarPropiedadesObjetos(mdl_KRO_Notificaciones_Destinos_AGrabar, mdl_KRO_Notificaciones_Destinos_Final, false, false);
|
||||||
|
|
||||||
|
#region INSERT
|
||||||
|
string str_SQL_Insert = " INSERT INTO " + nameof(KRO_Notificaciones_Destinos) +
|
||||||
|
" (" +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.idNotificacion) + "," +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.email) + "," +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.emailOculto) +
|
||||||
|
" ) " +
|
||||||
|
" OUTPUT INSERTED." + nameof(KRO_Notificaciones_Destinos.id) +
|
||||||
|
" VALUES " +
|
||||||
|
" ( " +
|
||||||
|
"@idNotificacion," +
|
||||||
|
"@email," +
|
||||||
|
"@emailOculto" +
|
||||||
|
" ) ";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Insert = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idNotificacion", mdl_KRO_Notificaciones_Destinos_Final.idNotificacion),
|
||||||
|
mdl_KRO_Notificaciones_Destinos_Final.email != null
|
||||||
|
? new SqlParameter("@email", mdl_KRO_Notificaciones_Destinos_Final.email)
|
||||||
|
: new SqlParameter("@email", DBNull.Value),
|
||||||
|
mdl_KRO_Notificaciones_Destinos_Final.emailOculto != null
|
||||||
|
? new SqlParameter("@emailOculto", mdl_KRO_Notificaciones_Destinos_Final.emailOculto.Value)
|
||||||
|
: new SqlParameter("@emailOculto", DBNull.Value),
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Id de la tabla
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Id = obj_Exferia_Entities.Database.SqlQuery<long>(str_SQL_Insert, arr_Parametros_Insert).Single();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Grabar un registro de trazabilidad con los datos de la transacción realizada
|
||||||
|
Datos_Generales.USR_Trazabilidad_Grabar(typeof(KRO_Notificaciones_Destinos), mdl_KRO_Notificaciones_Destinos_DatosViejos, mdl_KRO_Notificaciones_Destinos_Final, mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion, obj_Exferia_Entities);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Destinos) + "/" + nameof(Grabar), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
// Finalizar transaccion
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_INTERNO_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Borrar
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Borrar(long _lng_id)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_ELIMINAR;
|
||||||
|
|
||||||
|
using (TransactionScope transaccion_SQL = new TransactionScope(TransactionScopeOption.Required))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
// Ver si existe ######################################################################
|
||||||
|
KRO_Notificaciones_Destinos mdl_KRO_Notificaciones_Destinos_Final = Obtener_Modelo_Por_Id(_lng_id);
|
||||||
|
//######################################################################################
|
||||||
|
|
||||||
|
if (mdl_KRO_Notificaciones_Destinos_Final != null)
|
||||||
|
{
|
||||||
|
#region Delete
|
||||||
|
string str_SQL_Delete = " DELETE FROM " + nameof(KRO_Notificaciones_Destinos) +
|
||||||
|
" WHERE " +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.id) + "=@id";
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Delete = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@id", _lng_id)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Delete
|
||||||
|
obj_Exferia_Entities.Database.ExecuteSqlCommand(str_SQL_Delete, arr_Parametros_Delete);
|
||||||
|
|
||||||
|
//Grabar un registro de trazabailidad con los datos de la transaccion realizada.
|
||||||
|
Datos_Generales.USR_Trazabilidad_Grabar(typeof(KRO_Notificaciones_Destinos), null, mdl_KRO_Notificaciones_Destinos_Final, G_ENUM_TIPOACCION.INT_ELIMINAR, obj_Exferia_Entities);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Devolver también el Objeto
|
||||||
|
mdl_ValorDevuelto_Modelo.Id = _lng_id;
|
||||||
|
|
||||||
|
// Se termina la Transaccion Correctamente
|
||||||
|
transaccion_SQL.Complete();
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Destinos_Datos) + "/" + nameof(Borrar), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
|
||||||
|
// Finalizar transaccion
|
||||||
|
transaccion_SQL.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return mdl_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Borrar(long _lng_id, long _lng_idAuxiliar)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Borrar(object _mdl_obj)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,416 @@
|
||||||
|
using Exferia_Aplicacion.Herencia.Capas;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using static Exferia_Aplicacion.General.Enumerados;
|
||||||
|
using Exferia_General;
|
||||||
|
using System.Transactions;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._2_Datos
|
||||||
|
{
|
||||||
|
public class KRO_Notificaciones_Destinos_Datos : ABS_Datos
|
||||||
|
{
|
||||||
|
#region Listado
|
||||||
|
public override List<dynamic> Obtener_Listado(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_RegistroListado(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo, long _lng_id, List<long> _lst_id)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
protected override void ConsultaRellenar_Listado(Exferia_Entities _obj_Exferia_Entities, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<long> _lst_idEmpresasRelacionas, List<string> _lst_CamposConRelacionABuscar, long _lng_id, List<long> _lst_id, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{ }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Listado Secundario
|
||||||
|
public override List<dynamic> Obtener_Listado_Secundario(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_RegistroListado_Secundario(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo, long _lng_id, List<long> _lst_ids)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
protected override void ConsultaRellenar_Listado_Secundario(Exferia_Entities _obj_Exferia_Entities, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<long> _lst_idEmpresasRelacionadas, List<string> _lst_CamposConRelacionABuscar, long _lng_id, List<long> _lst_ids, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{ }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region F3
|
||||||
|
public override dynamic Obtener_F3(string _str_filtro, string _str_CampoBusqueda, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_F3_PorId(long _lng_id, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
protected override void ConsultaRellenar_F3(Exferia_Entities _obj_Exferia_Entities, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<long> _lst_idEmpresasRelacionadas, string _str_CampoBusqueda, string _str_Filtro, long _lng_id, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{ }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Obtener
|
||||||
|
public override dynamic Obtener(long _lng_id)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_Registro_PorCampo(string _str_Filtro, string _str_CampoBusqueda, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region MODELOS
|
||||||
|
|
||||||
|
#region Modelo Simple
|
||||||
|
private KRO_Notificaciones_Destinos g_mdl_KRO_Notificaciones_Destinos = null;
|
||||||
|
|
||||||
|
public KRO_Notificaciones_Destinos Obtener_Modelo_Por_Id(long _lng_id)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + nameof(KRO_Notificaciones_Destinos) + "." + nameof(KRO_Notificaciones_Destinos.id) + "=@id";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@id", _lng_id)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el modelo
|
||||||
|
Ejecutar_Consulta_Modelo(str_SQL,
|
||||||
|
arr_Parametros);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Destinos_Datos) + "/" + nameof(Obtener_Modelo_Por_Id), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_mdl_KRO_Notificaciones_Destinos;
|
||||||
|
}
|
||||||
|
private void Ejecutar_Consulta_Modelo(string _str_SQL,
|
||||||
|
object[] _arr_Parametros)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Conexion
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
//Rellenar el Modelo
|
||||||
|
g_mdl_KRO_Notificaciones_Destinos = obj_Exferia_Entities.Database.SqlQuery<KRO_Notificaciones_Destinos>(_str_SQL, _arr_Parametros).FirstOrDefault();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Destinos_Datos) + "/" + nameof(Ejecutar_Consulta_Modelo), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Modelo Listado
|
||||||
|
private List<KRO_Notificaciones_Destinos> g_lst_KRO_Notificaciones_Destinos = null;
|
||||||
|
|
||||||
|
public List<KRO_Notificaciones_Destinos> Obtener_ModeloListado_Por_IdsNotificacion(List<long> _lst_IdsNotificacion)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (_lst_IdsNotificacion != null && _lst_IdsNotificacion.Count > 0)
|
||||||
|
{
|
||||||
|
string str_Filtro_IDS = Funciones.Formar_ContenidoIN_ParaConsultaWhere(nameof(KRO_Notificaciones_Destinos),
|
||||||
|
nameof(KRO_Notificaciones_Destinos.idNotificacion),
|
||||||
|
G_ENUM_FORMARCONTENIDOIN_CONDICIONANTES.NADA,
|
||||||
|
_lst_IdsNotificacion);
|
||||||
|
|
||||||
|
//Consulta
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + str_Filtro_IDS;
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el listado
|
||||||
|
Ejecutar_Consulta_Modelo_Listado(str_SQL,
|
||||||
|
new object[] { });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Destinos_Datos) + "/" + nameof(Obtener_ModeloListado_Por_IdsNotificacion), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_lst_KRO_Notificaciones_Destinos;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Ejecutar_Consulta_Modelo_Listado(string _str_SQL,
|
||||||
|
object[] _arr_Parametros)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Conexion
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
|
||||||
|
//Rellenar el modelo
|
||||||
|
g_lst_KRO_Notificaciones_Destinos = obj_Exferia_Entities.Database.SqlQuery<KRO_Notificaciones_Destinos>(_str_SQL, _arr_Parametros).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Destinos_Datos) + "/" + nameof(Ejecutar_Consulta_Modelo_Listado), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private string Obtener_Consulta_Modelo()
|
||||||
|
{
|
||||||
|
return
|
||||||
|
" SELECT " +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.id) + "," +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.idNotificacion) + "," +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.email) + "," +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.emailOculto) +
|
||||||
|
" FROM " + nameof(KRO_Notificaciones_Destinos);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Grabar
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Grabar(object _mdl_obj)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_INTERNO_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
KRO_Notificaciones_Destinos mdl_KRO_Notificaciones_Destinos_AGrabar = (KRO_Notificaciones_Destinos)_mdl_obj;
|
||||||
|
KRO_Notificaciones_Destinos mdl_KRO_Notificaciones_Destinos_DatosViejos = new KRO_Notificaciones_Destinos();
|
||||||
|
|
||||||
|
// Ver si existe ######################################################################
|
||||||
|
KRO_Notificaciones_Destinos mdl_KRO_Notificaciones_Destinos_Final = Obtener_Modelo_Por_Id(mdl_KRO_Notificaciones_Destinos_AGrabar.id);
|
||||||
|
//######################################################################################
|
||||||
|
|
||||||
|
//UPDATE
|
||||||
|
if (mdl_KRO_Notificaciones_Destinos_Final != null)
|
||||||
|
{
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_MODIFICAR;
|
||||||
|
|
||||||
|
//Datos viejos para la trazabilidad
|
||||||
|
Funciones.CopiarPropiedadesObjetos(mdl_KRO_Notificaciones_Destinos_Final, mdl_KRO_Notificaciones_Destinos_DatosViejos, false, false);
|
||||||
|
|
||||||
|
// Cargar los Datos Nuevos del Modelo
|
||||||
|
Funciones.CopiarPropiedadesObjetos(mdl_KRO_Notificaciones_Destinos_AGrabar, mdl_KRO_Notificaciones_Destinos_Final, false, false);
|
||||||
|
|
||||||
|
#region Update
|
||||||
|
string str_SQL_Update = " UPDATE " + nameof(KRO_Notificaciones_Destinos) +
|
||||||
|
" SET " +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.idNotificacion) + "=@idNotificacion," +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.email) + "=@email," +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.emailOculto) + "=@emailOculto" +
|
||||||
|
" WHERE " +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.id) + "=@id";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Update = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idNotificacion", mdl_KRO_Notificaciones_Destinos_Final.idNotificacion),
|
||||||
|
mdl_KRO_Notificaciones_Destinos_Final.email != null
|
||||||
|
? new SqlParameter("@email", mdl_KRO_Notificaciones_Destinos_Final.email)
|
||||||
|
: new SqlParameter("@email", DBNull.Value),
|
||||||
|
mdl_KRO_Notificaciones_Destinos_Final.emailOculto != null
|
||||||
|
? new SqlParameter("@emailOculto", mdl_KRO_Notificaciones_Destinos_Final.emailOculto.Value)
|
||||||
|
: new SqlParameter("@emailOculto", DBNull.Value),
|
||||||
|
new SqlParameter("@id", mdl_KRO_Notificaciones_Destinos_Final.id)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Update
|
||||||
|
obj_Exferia_Entities.Database.ExecuteSqlCommand(str_SQL_Update, arr_Parametros_Update);
|
||||||
|
|
||||||
|
//Id de la tabla
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Id = mdl_KRO_Notificaciones_Destinos_Final.id;
|
||||||
|
}
|
||||||
|
//INSERT
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mdl_KRO_Notificaciones_Destinos_Final = new KRO_Notificaciones_Destinos();
|
||||||
|
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_INSERTAR;
|
||||||
|
|
||||||
|
// Cargar los Datos del Modelo
|
||||||
|
Funciones.CopiarPropiedadesObjetos(mdl_KRO_Notificaciones_Destinos_AGrabar, mdl_KRO_Notificaciones_Destinos_Final, false, false);
|
||||||
|
|
||||||
|
#region INSERT
|
||||||
|
string str_SQL_Insert = " INSERT INTO " + nameof(KRO_Notificaciones_Destinos) +
|
||||||
|
" (" +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.idNotificacion) + "," +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.email) + "," +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.emailOculto) +
|
||||||
|
" ) " +
|
||||||
|
" OUTPUT INSERTED." + nameof(KRO_Notificaciones_Destinos.id) +
|
||||||
|
" VALUES " +
|
||||||
|
" ( " +
|
||||||
|
"@idNotificacion," +
|
||||||
|
"@email," +
|
||||||
|
"@emailOculto" +
|
||||||
|
" ) ";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Insert = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idNotificacion", mdl_KRO_Notificaciones_Destinos_Final.idNotificacion),
|
||||||
|
mdl_KRO_Notificaciones_Destinos_Final.email != null
|
||||||
|
? new SqlParameter("@email", mdl_KRO_Notificaciones_Destinos_Final.email)
|
||||||
|
: new SqlParameter("@email", DBNull.Value),
|
||||||
|
mdl_KRO_Notificaciones_Destinos_Final.emailOculto != null
|
||||||
|
? new SqlParameter("@emailOculto", mdl_KRO_Notificaciones_Destinos_Final.emailOculto.Value)
|
||||||
|
: new SqlParameter("@emailOculto", DBNull.Value),
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Id de la tabla
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Id = obj_Exferia_Entities.Database.SqlQuery<long>(str_SQL_Insert, arr_Parametros_Insert).Single();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Grabar un registro de trazabilidad con los datos de la transacción realizada
|
||||||
|
Datos_Generales.USR_Trazabilidad_Grabar(typeof(KRO_Notificaciones_Destinos), mdl_KRO_Notificaciones_Destinos_DatosViejos, mdl_KRO_Notificaciones_Destinos_Final, mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion, obj_Exferia_Entities);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Destinos) + "/" + nameof(Grabar), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
// Finalizar transaccion
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_INTERNO_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Borrar
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Borrar(long _lng_id)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_ELIMINAR;
|
||||||
|
|
||||||
|
using (TransactionScope transaccion_SQL = new TransactionScope(TransactionScopeOption.Required))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
// Ver si existe ######################################################################
|
||||||
|
KRO_Notificaciones_Destinos mdl_KRO_Notificaciones_Destinos_Final = Obtener_Modelo_Por_Id(_lng_id);
|
||||||
|
//######################################################################################
|
||||||
|
|
||||||
|
if (mdl_KRO_Notificaciones_Destinos_Final != null)
|
||||||
|
{
|
||||||
|
#region Delete
|
||||||
|
string str_SQL_Delete = " DELETE FROM " + nameof(KRO_Notificaciones_Destinos) +
|
||||||
|
" WHERE " +
|
||||||
|
nameof(KRO_Notificaciones_Destinos.id) + "=@id";
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Delete = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@id", _lng_id)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Delete
|
||||||
|
obj_Exferia_Entities.Database.ExecuteSqlCommand(str_SQL_Delete, arr_Parametros_Delete);
|
||||||
|
|
||||||
|
//Grabar un registro de trazabailidad con los datos de la transaccion realizada.
|
||||||
|
Datos_Generales.USR_Trazabilidad_Grabar(typeof(KRO_Notificaciones_Destinos), null, mdl_KRO_Notificaciones_Destinos_Final, G_ENUM_TIPOACCION.INT_ELIMINAR, obj_Exferia_Entities);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Devolver también el Objeto
|
||||||
|
mdl_ValorDevuelto_Modelo.Id = _lng_id;
|
||||||
|
|
||||||
|
// Se termina la Transaccion Correctamente
|
||||||
|
transaccion_SQL.Complete();
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_Notificaciones_Destinos_Datos) + "/" + nameof(Borrar), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
|
||||||
|
// Finalizar transaccion
|
||||||
|
transaccion_SQL.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return mdl_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Borrar(long _lng_id, long _lng_idAuxiliar)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Borrar(object _mdl_obj)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,623 @@
|
||||||
|
using Exferia_Aplicacion.Herencia.Capas;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using static Exferia_Aplicacion.General.Enumerados;
|
||||||
|
using Exferia_General;
|
||||||
|
using System.Transactions;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._2_Datos
|
||||||
|
{
|
||||||
|
public class KRO_TareasProgramadas_Asociadas_Datos : ABS_Datos
|
||||||
|
{
|
||||||
|
#region Listado
|
||||||
|
public override List<dynamic> Obtener_Listado(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_RegistroListado(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo, long _lng_id, List<long> _lst_id)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
protected override void ConsultaRellenar_Listado(Exferia_Entities _obj_Exferia_Entities, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<long> _lst_idEmpresasRelacionas, List<string> _lst_CamposConRelacionABuscar, long _lng_id, List<long> _lst_id, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{ }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Listado Secundario
|
||||||
|
public override List<dynamic> Obtener_Listado_Secundario(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_RegistroListado_Secundario(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo, long _lng_id, List<long> _lst_ids)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
protected override void ConsultaRellenar_Listado_Secundario(Exferia_Entities _obj_Exferia_Entities, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<long> _lst_idEmpresasRelacionadas, List<string> _lst_CamposConRelacionABuscar, long _lng_id, List<long> _lst_ids, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region F3
|
||||||
|
public override dynamic Obtener_F3(string _str_filtro, string _str_CampoBusqueda, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_F3_PorId(long _lng_id, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
protected override void ConsultaRellenar_F3(Exferia_Entities _obj_Exferia_Entities, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<long> _lst_idEmpresasRelacionadas, string _str_CampoBusqueda, string _str_Filtro, long _lng_id, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{ }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Obtener
|
||||||
|
public override dynamic Obtener(long _lng_id)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_Registro_PorCampo(string _str_Filtro, string _str_CampoBusqueda, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region MODELOS
|
||||||
|
|
||||||
|
#region Modelo Simple
|
||||||
|
private KRO_TareasProgramadas_Asociadas g_mdl_KRO_TareasProgramadas_Asociadas = null;
|
||||||
|
|
||||||
|
public KRO_TareasProgramadas_Asociadas Obtener_Modelo_Por_Id(long _lng_id)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + nameof(KRO_TareasProgramadas_Asociadas) + "." + nameof(KRO_TareasProgramadas_Asociadas.id) + "=@id";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@id", _lng_id)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el modelo
|
||||||
|
Ejecutar_Consulta_Modelo(str_SQL,
|
||||||
|
arr_Parametros);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Asociadas_Datos) + "/" + nameof(Obtener_Modelo_Por_Id), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_mdl_KRO_TareasProgramadas_Asociadas;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Ejecutar_Consulta_Modelo(string _str_SQL,
|
||||||
|
object[] _arr_Parametros)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Conexion
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
//Rellenar el Modelo
|
||||||
|
g_mdl_KRO_TareasProgramadas_Asociadas = obj_Exferia_Entities.Database.SqlQuery<KRO_TareasProgramadas_Asociadas>(_str_SQL, _arr_Parametros).FirstOrDefault();
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Asociadas_Datos) + "/" + nameof(Ejecutar_Consulta_Modelo), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Modelo Listado
|
||||||
|
private List<KRO_TareasProgramadas_Asociadas> g_lst_KRO_TareasProgramadas_Asociadas = null;
|
||||||
|
|
||||||
|
public List<KRO_TareasProgramadas_Asociadas> Obtener_ModeloListado_Por_IdTareaProgramanada(long _lng_idTareaProgramada,
|
||||||
|
bool _bol_Cargar_TareaProgramada)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Consulta
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + nameof(KRO_TareasProgramadas_Asociadas) + "." + nameof(KRO_TareasProgramadas_Asociadas.idTareaProgramada) + "=@idTareaProgramada ";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idTareaProgramada", _lng_idTareaProgramada)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el listado
|
||||||
|
Ejecutar_Consulta_Modelo_Listado(str_SQL,
|
||||||
|
arr_Parametros,
|
||||||
|
_bol_Cargar_TareaProgramada);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Asociadas_Datos) + "/" + nameof(Obtener_ModeloListado_Por_IdTareaProgramanada), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_lst_KRO_TareasProgramadas_Asociadas;
|
||||||
|
}
|
||||||
|
public List<KRO_TareasProgramadas_Asociadas> Obtener_ModeloListado_Por_IdTareaProgramanadaAsociada(long _lng_idTareaProgramada,
|
||||||
|
bool _bol_Cargar_TareaProgramada)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Consulta
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + nameof(KRO_TareasProgramadas_Asociadas) + "." + nameof(KRO_TareasProgramadas_Asociadas.idTareaProgramada_Asociada) + "=@idTareaProgramada_Asociada ";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idTareaProgramada_Asociada", _lng_idTareaProgramada)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el listado
|
||||||
|
Ejecutar_Consulta_Modelo_Listado(str_SQL,
|
||||||
|
arr_Parametros,
|
||||||
|
_bol_Cargar_TareaProgramada);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Asociadas_Datos) + "/" + nameof(Obtener_ModeloListado_Por_IdTareaProgramanadaAsociada), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_lst_KRO_TareasProgramadas_Asociadas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<KRO_TareasProgramadas_Asociadas> Obtener_ModeloListado_Por_IdsTareaProgramanadas(List<long> _lst_IdsTareaProgramada,
|
||||||
|
bool _bol_Cargar_TareaProgramada)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (_lst_IdsTareaProgramada != null && _lst_IdsTareaProgramada.Count > 0)
|
||||||
|
{
|
||||||
|
string str_Filtro_IDS = Funciones.Formar_ContenidoIN_ParaConsultaWhere(nameof(KRO_TareasProgramadas_Asociadas),
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.idTareaProgramada),
|
||||||
|
G_ENUM_FORMARCONTENIDOIN_CONDICIONANTES.NADA,
|
||||||
|
_lst_IdsTareaProgramada);
|
||||||
|
|
||||||
|
//Consulta
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + str_Filtro_IDS;
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el listado
|
||||||
|
Ejecutar_Consulta_Modelo_Listado(str_SQL,
|
||||||
|
new object[] { },
|
||||||
|
_bol_Cargar_TareaProgramada);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Asociadas_Datos) + "/" + nameof(Obtener_ModeloListado_Por_IdsTareaProgramanadas), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_lst_KRO_TareasProgramadas_Asociadas;
|
||||||
|
}
|
||||||
|
public List<KRO_TareasProgramadas_Asociadas> Obtener_ModeloListado_Por_IdsTareaProgramanadas_Vinculadas(List<long> _lst_IdsTareaProgramada,
|
||||||
|
bool _bol_Cargar_TareaProgramada)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (_lst_IdsTareaProgramada != null && _lst_IdsTareaProgramada.Count > 0)
|
||||||
|
{
|
||||||
|
string str_Filtro_IDS = Funciones.Formar_ContenidoIN_ParaConsultaWhere(nameof(KRO_TareasProgramadas_Asociadas),
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.idTareaProgramada_Asociada),
|
||||||
|
G_ENUM_FORMARCONTENIDOIN_CONDICIONANTES.NADA,
|
||||||
|
_lst_IdsTareaProgramada);
|
||||||
|
|
||||||
|
//Consulta
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + str_Filtro_IDS;
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el listado
|
||||||
|
Ejecutar_Consulta_Modelo_Listado(str_SQL,
|
||||||
|
new object[] { },
|
||||||
|
_bol_Cargar_TareaProgramada);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Asociadas_Datos) + "/" + nameof(Obtener_ModeloListado_Por_IdsTareaProgramanadas_Vinculadas), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_lst_KRO_TareasProgramadas_Asociadas;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Ejecutar Consulta
|
||||||
|
//Listado de modelos Relacionados
|
||||||
|
private List<KRO_TareasProgramadas> g_lst_KRO_TareasProgramadas = null;
|
||||||
|
|
||||||
|
//Hilos
|
||||||
|
private static int g_int_TotalHilos_Modelo_Listado = 1;
|
||||||
|
private bool[] g_bol_Hilos_Terminados_Modelo_Listado = new bool[g_int_TotalHilos_Modelo_Listado];
|
||||||
|
|
||||||
|
private void Ejecutar_Consulta_Modelo_Listado(string _str_SQL,
|
||||||
|
object[] _arr_Parametros,
|
||||||
|
bool _bol_Cargar_TareaProgramada)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Conexion
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
|
||||||
|
//Rellenar el modelo
|
||||||
|
g_lst_KRO_TareasProgramadas_Asociadas = obj_Exferia_Entities.Database.SqlQuery<KRO_TareasProgramadas_Asociadas>(_str_SQL, _arr_Parametros).ToList();
|
||||||
|
|
||||||
|
#region Rellenar tablas Relacionadas
|
||||||
|
if (g_lst_KRO_TareasProgramadas_Asociadas != null && g_lst_KRO_TareasProgramadas_Asociadas.Count > 0)
|
||||||
|
{
|
||||||
|
//Si tiene que buscar alguna tabla relacionada
|
||||||
|
if (_bol_Cargar_TareaProgramada)
|
||||||
|
{
|
||||||
|
#region PRIMERO BUSCO LOS DATOS DE LAS TABLAS RELACIONADAS
|
||||||
|
//reiniciar Valores de los hilos
|
||||||
|
for (int int_Contador = 0; int_Contador < g_int_TotalHilos_Modelo_Listado; int_Contador++)
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Modelo_Listado[int_Contador] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//KRO_TareaProgramada #############################################
|
||||||
|
if (_bol_Cargar_TareaProgramada)
|
||||||
|
{
|
||||||
|
ThreadStart obj_ThreadStart_TAREAPROGRAMADA = new ThreadStart(Obtener_TareaProgramada_Modelo_Listado);
|
||||||
|
Thread obj_Thread_TAREAPROGRAMADA = new Thread(obj_ThreadStart_TAREAPROGRAMADA);
|
||||||
|
obj_Thread_TAREAPROGRAMADA.Start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Modelo_Listado[0] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Esperando a que terminen todos los hilos .........................................
|
||||||
|
bool bol_Termino = false;
|
||||||
|
while (bol_Termino == false)
|
||||||
|
{
|
||||||
|
bol_Termino = true;
|
||||||
|
foreach (bool bol_Termino_Hilo in g_bol_Hilos_Terminados_Modelo_Listado)
|
||||||
|
{
|
||||||
|
if (bol_Termino_Hilo == false)
|
||||||
|
{
|
||||||
|
bol_Termino = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Thread.Sleep(10);
|
||||||
|
}
|
||||||
|
//.................................................................................
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region DESPUES SE LO VOY ASIGNANDO A LOS REGISTRO UNO A UNO
|
||||||
|
foreach (KRO_TareasProgramadas_Asociadas mdl_KRO_TareasProgramadas_Asociadas in g_lst_KRO_TareasProgramadas_Asociadas)
|
||||||
|
{
|
||||||
|
//KRO_TareasProgramadas #############################################
|
||||||
|
if (_bol_Cargar_TareaProgramada &&
|
||||||
|
g_lst_KRO_TareasProgramadas != null &&
|
||||||
|
g_lst_KRO_TareasProgramadas.Count > 0)
|
||||||
|
{
|
||||||
|
mdl_KRO_TareasProgramadas_Asociadas.KRO_TareasProgramadas = g_lst_KRO_TareasProgramadas.Where(m => m.id == mdl_KRO_TareasProgramadas_Asociadas.idTareaProgramada).FirstOrDefault();
|
||||||
|
mdl_KRO_TareasProgramadas_Asociadas.KRO_TareasProgramadas1 = g_lst_KRO_TareasProgramadas.Where(m => m.id == mdl_KRO_TareasProgramadas_Asociadas.idTareaProgramada_Asociada).FirstOrDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Asociadas_Datos) + "/" + nameof(Ejecutar_Consulta_Modelo_Listado), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Tablas Relacionadas
|
||||||
|
private void Obtener_TareaProgramada_Modelo_Listado()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
List<long> lst_idsTareasProgramadas = new List<long>();
|
||||||
|
if (g_lst_KRO_TareasProgramadas_Asociadas!=null && g_lst_KRO_TareasProgramadas_Asociadas.Count>0)
|
||||||
|
{
|
||||||
|
lst_idsTareasProgramadas.AddRange(g_lst_KRO_TareasProgramadas_Asociadas.Select(x => x.idTareaProgramada_Asociada).ToList());
|
||||||
|
lst_idsTareasProgramadas.AddRange(g_lst_KRO_TareasProgramadas_Asociadas.Select(x => x.idTareaProgramada).ToList());
|
||||||
|
}
|
||||||
|
|
||||||
|
KRO_TareasProgramadas_Datos obj_KRO_TareasProgramadas_Datos = new KRO_TareasProgramadas_Datos();
|
||||||
|
g_lst_KRO_TareasProgramadas = obj_KRO_TareasProgramadas_Datos.Obtener_ModeloListado_Por_Ids(lst_idsTareasProgramadas.Distinct().ToList());
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Modelo_Listado[0] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private string Obtener_Consulta_Modelo()
|
||||||
|
{
|
||||||
|
return
|
||||||
|
" SELECT " +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.id) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.idTareaProgramada) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.idTareaProgramada_Asociada) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.tipoEjecucionAntesDespues) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.ejecutar) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.orden) +
|
||||||
|
" FROM " + nameof(KRO_TareasProgramadas_Asociadas);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Grabar
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Grabar(object _mdl_obj)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_INTERNO_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
KRO_TareasProgramadas_Asociadas mdl_KRO_TareasProgramadas_Asociadas_AGrabar = (KRO_TareasProgramadas_Asociadas)_mdl_obj;
|
||||||
|
KRO_TareasProgramadas_Asociadas mdl_KRO_TareasProgramadas_Asociadas_DatosViejos = new KRO_TareasProgramadas_Asociadas();
|
||||||
|
|
||||||
|
// Ver si existe ######################################################################
|
||||||
|
KRO_TareasProgramadas_Asociadas mdl_KRO_TareasProgramadas_Asociadas_Final = Obtener_Modelo_Por_Id(mdl_KRO_TareasProgramadas_Asociadas_AGrabar.id);
|
||||||
|
//######################################################################################
|
||||||
|
|
||||||
|
//UPDATE
|
||||||
|
if (mdl_KRO_TareasProgramadas_Asociadas_Final != null)
|
||||||
|
{
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_MODIFICAR;
|
||||||
|
|
||||||
|
//Datos viejos para la trazabilidad
|
||||||
|
Funciones.CopiarPropiedadesObjetos(mdl_KRO_TareasProgramadas_Asociadas_Final, mdl_KRO_TareasProgramadas_Asociadas_DatosViejos, false, false);
|
||||||
|
|
||||||
|
// Cargar los Datos Nuevos del Modelo
|
||||||
|
Funciones.CopiarPropiedadesObjetos(mdl_KRO_TareasProgramadas_Asociadas_AGrabar, mdl_KRO_TareasProgramadas_Asociadas_Final, false, false);
|
||||||
|
|
||||||
|
#region Update
|
||||||
|
string str_SQL_Update = " UPDATE " + nameof(KRO_TareasProgramadas_Asociadas) +
|
||||||
|
" SET " +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.idTareaProgramada) + "=@idTareaProgramada," +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.idTareaProgramada_Asociada) + "=@idTareaProgramada_Asociada," +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.tipoEjecucionAntesDespues) + "=@tipoEjecucionAntesDespues," +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.ejecutar) + "=@ejecutar," +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.orden) + "=@orden" +
|
||||||
|
" WHERE " +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.id) + "=@id";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Update = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idTareaProgramada", mdl_KRO_TareasProgramadas_Asociadas_Final.idTareaProgramada),
|
||||||
|
new SqlParameter("@idTareaProgramada_Asociada", mdl_KRO_TareasProgramadas_Asociadas_Final.idTareaProgramada_Asociada),
|
||||||
|
new SqlParameter("@tipoEjecucionAntesDespues", mdl_KRO_TareasProgramadas_Asociadas_Final.tipoEjecucionAntesDespues),
|
||||||
|
new SqlParameter("@ejecutar", mdl_KRO_TareasProgramadas_Asociadas_Final.ejecutar),
|
||||||
|
mdl_KRO_TareasProgramadas_Asociadas_Final.orden != null
|
||||||
|
? new SqlParameter("@orden", mdl_KRO_TareasProgramadas_Asociadas_Final.orden.Value)
|
||||||
|
: new SqlParameter("@orden", DBNull.Value),
|
||||||
|
new SqlParameter("@id", mdl_KRO_TareasProgramadas_Asociadas_Final.id)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Update
|
||||||
|
obj_Exferia_Entities.Database.ExecuteSqlCommand(str_SQL_Update, arr_Parametros_Update);
|
||||||
|
|
||||||
|
//Id de la tabla
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Id = mdl_KRO_TareasProgramadas_Asociadas_Final.id;
|
||||||
|
|
||||||
|
}
|
||||||
|
//INSERT
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mdl_KRO_TareasProgramadas_Asociadas_Final = new KRO_TareasProgramadas_Asociadas();
|
||||||
|
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_INSERTAR;
|
||||||
|
|
||||||
|
// Cargar los Datos del Modelo
|
||||||
|
Funciones.CopiarPropiedadesObjetos(mdl_KRO_TareasProgramadas_Asociadas_AGrabar, mdl_KRO_TareasProgramadas_Asociadas_Final, false, false);
|
||||||
|
|
||||||
|
#region INSERT
|
||||||
|
string str_SQL_Insert = " INSERT INTO " + nameof(KRO_TareasProgramadas_Asociadas) +
|
||||||
|
" (" +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.idTareaProgramada) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.idTareaProgramada_Asociada) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.tipoEjecucionAntesDespues) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.ejecutar) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.orden) +
|
||||||
|
" ) " +
|
||||||
|
" OUTPUT INSERTED." + nameof(KRO_TareasProgramadas_Asociadas.id) +
|
||||||
|
" VALUES " +
|
||||||
|
" ( " +
|
||||||
|
"@idTareaProgramada," +
|
||||||
|
"@idTareaProgramada_Asociada," +
|
||||||
|
"@tipoEjecucionAntesDespues," +
|
||||||
|
"@ejecutar," +
|
||||||
|
"@orden" +
|
||||||
|
" ) ";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Insert = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idTareaProgramada", mdl_KRO_TareasProgramadas_Asociadas_Final.idTareaProgramada),
|
||||||
|
new SqlParameter("@idTareaProgramada_Asociada", mdl_KRO_TareasProgramadas_Asociadas_Final.idTareaProgramada_Asociada),
|
||||||
|
new SqlParameter("@tipoEjecucionAntesDespues", mdl_KRO_TareasProgramadas_Asociadas_Final.tipoEjecucionAntesDespues),
|
||||||
|
new SqlParameter("@ejecutar", mdl_KRO_TareasProgramadas_Asociadas_Final.ejecutar),
|
||||||
|
mdl_KRO_TareasProgramadas_Asociadas_Final.orden != null
|
||||||
|
? new SqlParameter("@orden", mdl_KRO_TareasProgramadas_Asociadas_Final.orden.Value)
|
||||||
|
: new SqlParameter("@orden", DBNull.Value)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Id de la tabla
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Id = obj_Exferia_Entities.Database.SqlQuery<long>(str_SQL_Insert, arr_Parametros_Insert).Single();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Grabar un registro de trazabilidad con los datos de la transacción realizada
|
||||||
|
Datos_Generales.USR_Trazabilidad_Grabar(typeof(KRO_TareasProgramadas_Asociadas), mdl_KRO_TareasProgramadas_Asociadas_DatosViejos, mdl_KRO_TareasProgramadas_Asociadas_Final, mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion, obj_Exferia_Entities);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Asociadas_Datos) + "/" + nameof(Grabar), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
// Finalizar transaccion
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_INTERNO_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Borrar
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Borrar(long _lng_id)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_ELIMINAR;
|
||||||
|
|
||||||
|
using (TransactionScope transaccion_SQL = new TransactionScope(TransactionScopeOption.Required))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
// Ver si existe ######################################################################
|
||||||
|
KRO_TareasProgramadas_Asociadas mdl_KRO_TareasProgramadas_Asociadas_Final = Obtener_Modelo_Por_Id(_lng_id);
|
||||||
|
//######################################################################################
|
||||||
|
|
||||||
|
if (mdl_KRO_TareasProgramadas_Asociadas_Final != null)
|
||||||
|
{
|
||||||
|
#region Delete
|
||||||
|
string str_SQL_Delete = " DELETE FROM " + nameof(KRO_TareasProgramadas_Asociadas) +
|
||||||
|
" WHERE " +
|
||||||
|
nameof(KRO_TareasProgramadas_Asociadas.id) + "=@id";
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Delete = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@id", _lng_id)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Delete
|
||||||
|
obj_Exferia_Entities.Database.ExecuteSqlCommand(str_SQL_Delete, arr_Parametros_Delete);
|
||||||
|
|
||||||
|
//Grabar un registro de trazabailidad con los datos de la transaccion realizada.
|
||||||
|
Datos_Generales.USR_Trazabilidad_Grabar(typeof(KRO_TareasProgramadas_Asociadas), null, mdl_KRO_TareasProgramadas_Asociadas_Final, G_ENUM_TIPOACCION.INT_ELIMINAR, obj_Exferia_Entities);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Devolver también el Objeto
|
||||||
|
mdl_ValorDevuelto_Modelo.Id = mdl_KRO_TareasProgramadas_Asociadas_Final.id;
|
||||||
|
|
||||||
|
// Se termina la Transaccion Correctamente
|
||||||
|
transaccion_SQL.Complete();
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Asociadas_Datos) + "/" + nameof(Borrar), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
|
||||||
|
// Finalizar transaccion
|
||||||
|
transaccion_SQL.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return mdl_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Borrar(long _lng_id, long _lng_idAuxiliar)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Borrar(object _mdl_obj)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,796 @@
|
||||||
|
using Exferia_Aplicacion.Herencia.Capas;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using Exferia_General;
|
||||||
|
using Exferia_Kronos._1_Modelos;
|
||||||
|
using static Exferia_Aplicacion.General.Enumerados;
|
||||||
|
using System.Transactions;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._2_Datos
|
||||||
|
{
|
||||||
|
public class KRO_TareasProgramadas_Historico_Datos : ABS_Datos
|
||||||
|
{
|
||||||
|
#region Listado
|
||||||
|
private List<INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo> g_lst_INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo = null;
|
||||||
|
|
||||||
|
public override List<dynamic> Obtener_Listado(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
List<dynamic> lst_KRO = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
// Consulta .....................................................
|
||||||
|
ConsultaRellenar_Listado(obj_Exferia_Entities, _lng_idEmpresaSeleccionada, _lng_idEjercicioActual, Datos_Generales.GEN_Empresas_Devolver_EmpresasCompartidas_SegunFichero(_lng_idEmpresaSeleccionada, typeof(KRO_TareasProgramadas_Historico).Name), _lst_CamposConRelacionABuscar, -1, null, _lst_INTERNO_Filtro_OpcionPadre_Modelo, _lst_INTERNO_Filtro_Modelo);
|
||||||
|
// ..............................................................
|
||||||
|
|
||||||
|
if((g_lst_INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo != null) && (g_lst_INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.Count() > 0))
|
||||||
|
{
|
||||||
|
lst_KRO = g_lst_INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.Cast<dynamic>().ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Historico_Datos) + "/" + nameof(Obtener_Listado), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
return lst_KRO;
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_RegistroListado(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo, long _lng_id, List<long> _lst_ids)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
dynamic dnm_KRO = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
// Consulta .....................................................
|
||||||
|
ConsultaRellenar_Listado(obj_Exferia_Entities, _lng_idEmpresaSeleccionada, _lng_idEjercicioActual, Datos_Generales.GEN_Empresas_Devolver_EmpresasCompartidas_SegunFichero(_lng_idEmpresaSeleccionada, typeof(KRO_TareasProgramadas_Historico).Name), _lst_CamposConRelacionABuscar, _lng_id, _lst_ids, _lst_INTERNO_Filtro_OpcionPadre_Modelo, _lst_INTERNO_Filtro_Modelo);
|
||||||
|
// ..............................................................
|
||||||
|
|
||||||
|
if((g_lst_INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo != null) && (g_lst_INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.Count() > 0))
|
||||||
|
{
|
||||||
|
dnm_KRO = g_lst_INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.Cast<dynamic>().ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Historico_Datos) + "/" + nameof(Obtener_RegistroListado), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
return dnm_KRO;
|
||||||
|
}
|
||||||
|
protected override void ConsultaRellenar_Listado(Exferia_Entities _obj_Exferia_Entities, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<long> _lst_idEmpresasRelacionas, List<string> _lst_CamposConRelacionABuscar, long _lng_id, List<long> _lst_id, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string str_SQL =
|
||||||
|
" SELECT " +
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.id) + " = " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.id) + "," +
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.fechaHoraInicio) + " = " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.id) + "," +
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.fechaHoraFin) + " = " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.id) + "," +
|
||||||
|
//ids
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.idTareaProgramada) + " = " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.id) + "," +
|
||||||
|
//TareaProgramada
|
||||||
|
(
|
||||||
|
(_lst_CamposConRelacionABuscar.Contains(nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.TareaProgramada)))
|
||||||
|
?
|
||||||
|
(
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.TareaProgramada_Codigo) + " = " + nameof(KRO_TareasProgramadas) + "." + nameof(KRO_TareasProgramadas.codigo) + "," +
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.TareaProgramada_Descripcion) + " = " + nameof(KRO_TareasProgramadas) + "." + nameof(KRO_TareasProgramadas.descripcion) + "," +
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.TareaProgramada_FechaBorrado) + " = " + nameof(KRO_TareasProgramadas) + "." + nameof(KRO_TareasProgramadas.fechaBorrado)
|
||||||
|
)
|
||||||
|
:
|
||||||
|
(
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.TareaProgramada_Codigo) + " = ''," +
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.TareaProgramada_Descripcion) + " = ''," +
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.TareaProgramada_FechaBorrado) + " = NULL "
|
||||||
|
)
|
||||||
|
) +
|
||||||
|
" FROM " + nameof(KRO_TareasProgramadas_Historico) +
|
||||||
|
//MayorCuentaContable
|
||||||
|
(
|
||||||
|
(_lst_CamposConRelacionABuscar.Contains(nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.TareaProgramada)))
|
||||||
|
?
|
||||||
|
(
|
||||||
|
" LEFT JOIN " + nameof(KRO_TareasProgramadas) + " ON " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.idTareaProgramada) + " = " + nameof(KRO_TareasProgramadas) + "." + nameof(KRO_TareasProgramadas.id)
|
||||||
|
)
|
||||||
|
: ("")
|
||||||
|
) +
|
||||||
|
" WHERE " + (_lng_id > -1 ? nameof(KRO_TareasProgramadas_Historico) + "." + (nameof(KRO_TareasProgramadas_Historico.id) + "=@id") : "1 = 1");
|
||||||
|
|
||||||
|
object[] arr_Parametros = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@id", _lng_id)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Rellenar el Modelo
|
||||||
|
g_lst_INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo = _obj_Exferia_Entities.Database.SqlQuery<INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo>(str_SQL, arr_Parametros).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Historico_Datos) + "/" + nameof(ConsultaRellenar_Listado), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public List<INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo> Obtener_Listado_ParaPantalla(long _lng_id)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
List<INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo> lst_INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
string str_SQL =
|
||||||
|
" SELECT " +
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.id) + " = " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.id) + "," +
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.fechaHoraInicio) + " = " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.fechaHoraInicio) + "," +
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.fechaHoraFin) + " = " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.fechaHoraFin) + "," +
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.resultado) + " = " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.resultado) + "," +
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.fechaHoraTareaProgramada) + " = " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.fechaHoraTareaProgramada) + "," +
|
||||||
|
//ids
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.idTareaProgramada) + " = " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.idTareaProgramada) + "," +
|
||||||
|
//TareaProgramada
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.TareaProgramada_Codigo) + " = " + nameof(KRO_TareasProgramadas) + "." + nameof(KRO_TareasProgramadas.codigo) + "," +
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.TareaProgramada_Descripcion) + " = " + nameof(KRO_TareasProgramadas) + "." + nameof(KRO_TareasProgramadas.descripcion) + "," +
|
||||||
|
nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.TareaProgramada_FechaBorrado) + " = " + nameof(KRO_TareasProgramadas) + "." + nameof(KRO_TareasProgramadas.fechaBorrado) +
|
||||||
|
" FROM " + nameof(KRO_TareasProgramadas_Historico) +
|
||||||
|
" LEFT JOIN " + nameof(KRO_TareasProgramadas) + " ON " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.idTareaProgramada) + " = " + nameof(KRO_TareasProgramadas) + "." + nameof(KRO_TareasProgramadas.id) +
|
||||||
|
" WHERE " + (_lng_id > -1 ? nameof(KRO_TareasProgramadas_Historico) + "." + (nameof(KRO_TareasProgramadas_Historico.idTareaProgramada) + "=@idTareaProgramada") : "1 = 1");
|
||||||
|
|
||||||
|
object[] arr_Parametros = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idTareaProgramada", _lng_id)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Rellenar el Modelo
|
||||||
|
lst_INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo = obj_Exferia_Entities.Database.SqlQuery<INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo>(str_SQL, arr_Parametros).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Historico_Datos) + "/" + nameof(Obtener_Listado), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
return lst_INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Listado Secundario
|
||||||
|
public override List<dynamic> Obtener_Listado_Secundario(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_RegistroListado_Secundario(long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<string> _lst_CamposConRelacionABuscar, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo, long _lng_id, List<long> _lst_ids)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
protected override void ConsultaRellenar_Listado_Secundario(Exferia_Entities _obj_Exferia_Entities, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<long> _lst_idEmpresasRelacionadas, List<string> _lst_CamposConRelacionABuscar, long _lng_id, List<long> _lst_ids, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{ }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region F3
|
||||||
|
public override dynamic Obtener_F3(string _str_filtro, string _str_CampoBusqueda, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
public override dynamic Obtener_F3_PorId(long _lng_id, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
protected override void ConsultaRellenar_F3(Exferia_Entities _obj_Exferia_Entities, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual, List<long> _lst_idEmpresasRelacionadas, string _str_CampoBusqueda, string _str_Filtro, long _lng_id, List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo, List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{ }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Obtener
|
||||||
|
private dynamic g_dnm_Modelo_Obtener = null;
|
||||||
|
|
||||||
|
private static int g_int_TotalHilos_Obtener = 1;
|
||||||
|
private bool[] g_bol_Hilos_Terminados_Obtener = new bool[g_int_TotalHilos_Obtener];
|
||||||
|
|
||||||
|
public override dynamic Obtener(long _lng_id)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
string str_SQL =
|
||||||
|
" SELECT " +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.id) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.idTareaProgramada) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.fechaHoraInicio) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.fechaHoraFin) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.resultado) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.fechaHoraTareaProgramada) +
|
||||||
|
" FROM " + nameof(KRO_TareasProgramadas_Historico) +
|
||||||
|
" WHERE " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.id) + "=@id ";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@id", _lng_id)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Rellenar el Modelo
|
||||||
|
g_dnm_Modelo_Obtener = obj_Exferia_Entities.Database.SqlQuery<KRO_TareasProgramadas_Historico>(str_SQL, arr_Parametros).FirstOrDefault();
|
||||||
|
|
||||||
|
#region Rellenar Tablas Relacionadas
|
||||||
|
if (g_dnm_Modelo_Obtener != null)
|
||||||
|
{
|
||||||
|
//reiniciar Valores de los hilos
|
||||||
|
for (int int_Contador = 0; int_Contador < g_int_TotalHilos_Obtener; int_Contador++)
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Obtener[int_Contador] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//KRO_TareasProgramadas ##########################################################################################
|
||||||
|
if (g_dnm_Modelo_Obtener.idTareaProgramada != null)
|
||||||
|
{
|
||||||
|
ThreadStart obj_ThreadStart_TAREAPROGRAMADA = new ThreadStart(Obtener_TareaProgramada_Modelo_Obtener);
|
||||||
|
Thread obj_Thread_TAREAPROGRAMADA = new Thread(obj_ThreadStart_TAREAPROGRAMADA);
|
||||||
|
obj_Thread_TAREAPROGRAMADA.Start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Obtener[0] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Esperando a que terminen todos los hilos .........................................
|
||||||
|
bool bol_Termino = false;
|
||||||
|
while (bol_Termino == false)
|
||||||
|
{
|
||||||
|
bol_Termino = true;
|
||||||
|
foreach (bool bol_Termino_Hilo in g_bol_Hilos_Terminados_Obtener)
|
||||||
|
{
|
||||||
|
if (bol_Termino_Hilo == false)
|
||||||
|
{
|
||||||
|
bol_Termino = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Thread.Sleep(10);
|
||||||
|
}
|
||||||
|
//.................................................................................
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Historico_Datos) + "/" + nameof(Obtener), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
return g_dnm_Modelo_Obtener;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Tablas Relacionadas
|
||||||
|
private void Obtener_TareaProgramada_Modelo_Obtener()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
KRO_TareasProgramadas_Datos obj_KRO_TareasProgramadas_Datos = new KRO_TareasProgramadas_Datos();
|
||||||
|
g_dnm_Modelo_Obtener.KRO_TareasProgramadas = obj_KRO_TareasProgramadas_Datos.Obtener_Modelo_Por_Id(g_dnm_Modelo_Obtener.idTareaProgramada);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
g_bol_Hilos_Terminados_Obtener[0] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public override dynamic Obtener_Registro_PorCampo(string _str_Filtro, string _str_CampoBusqueda, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region MODELOS
|
||||||
|
|
||||||
|
#region Modelo Simple
|
||||||
|
private KRO_TareasProgramadas_Historico g_mdl_KRO_TareasProgramadas_Historico = null;
|
||||||
|
|
||||||
|
public KRO_TareasProgramadas_Historico Obtener_Modelo_Por_Id(long _lng_id)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.id) + "=@id";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@id", _lng_id)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el modelo
|
||||||
|
Ejecutar_Consulta_Modelo(str_SQL,
|
||||||
|
arr_Parametros);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Historico_Datos) + "/" + nameof(Obtener_Modelo_Por_Id), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_mdl_KRO_TareasProgramadas_Historico;
|
||||||
|
}
|
||||||
|
|
||||||
|
public KRO_TareasProgramadas_Historico Obtener_Modelo_Por_IdTareaPRogramada(long _lng_idTareaProgramada)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.idTareaProgramada) + "=@idTareaProgramada";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idTareaProgramada", _lng_idTareaProgramada)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el modelo
|
||||||
|
Ejecutar_Consulta_Modelo(str_SQL,
|
||||||
|
arr_Parametros);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Historico_Datos) + "/" + nameof(Obtener_Modelo_Por_Id), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_mdl_KRO_TareasProgramadas_Historico;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Ejecutar_Consulta_Modelo(string _str_SQL,
|
||||||
|
object[] _arr_Parametros)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Conexion
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
//Rellenar el Modelo
|
||||||
|
g_mdl_KRO_TareasProgramadas_Historico = obj_Exferia_Entities.Database.SqlQuery<KRO_TareasProgramadas_Historico>(_str_SQL, _arr_Parametros).FirstOrDefault();
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Historico_Datos) + "/" + nameof(Ejecutar_Consulta_Modelo), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Modelo Listado
|
||||||
|
private List<KRO_TareasProgramadas_Historico> g_lst_KRO_TareasProgramadas_Historico = null;
|
||||||
|
|
||||||
|
public List<KRO_TareasProgramadas_Historico> Obtener_ModeloListado_Por_IdTareaProgramanada(long _lng_idTareaProgramada)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Consulta
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + nameof(KRO_TareasProgramadas_Historico) + "." + nameof(KRO_TareasProgramadas_Historico.idTareaProgramada) + "=@idTareaProgramada ";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idTareaProgramada", _lng_idTareaProgramada)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el listado
|
||||||
|
Ejecutar_Consulta_Modelo_Listado(str_SQL,
|
||||||
|
arr_Parametros);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Historico_Datos) + "/" + nameof(Obtener_ModeloListado_Por_IdTareaProgramanada), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_lst_KRO_TareasProgramadas_Historico;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Ejecutar_Consulta_Modelo_Listado(string _str_SQL,
|
||||||
|
object[] _arr_Parametros)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Conexion
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
|
||||||
|
//Rellenar el modelo
|
||||||
|
g_lst_KRO_TareasProgramadas_Historico = obj_Exferia_Entities.Database.SqlQuery<KRO_TareasProgramadas_Historico>(_str_SQL, _arr_Parametros).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Historico_Datos) + "/" + nameof(Ejecutar_Consulta_Modelo_Listado), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private string Obtener_Consulta_Modelo()
|
||||||
|
{
|
||||||
|
return
|
||||||
|
" SELECT " +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.id) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.idTareaProgramada) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.fechaHoraInicio) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.fechaHoraFin) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.resultado) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.fechaHoraTareaProgramada) +
|
||||||
|
" FROM " + nameof(KRO_TareasProgramadas_Historico);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Grabar
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Grabar(object _mdl_obj)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_INTERNO_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
KRO_TareasProgramadas_Historico mdl_KRO_TareasProgramadas_Historico_AGrabar = (KRO_TareasProgramadas_Historico)_mdl_obj;
|
||||||
|
KRO_TareasProgramadas_Historico mdl_KRO_TareasProgramadas_Historico_DatosViejos = new KRO_TareasProgramadas_Historico();
|
||||||
|
|
||||||
|
// Ver si existe ######################################################################
|
||||||
|
KRO_TareasProgramadas_Historico mdl_KRO_TareasProgramadas_Historico_Final = Obtener_Modelo_Por_Id(mdl_KRO_TareasProgramadas_Historico_AGrabar.id);
|
||||||
|
//######################################################################################
|
||||||
|
|
||||||
|
if (mdl_KRO_TareasProgramadas_Historico_Final != null)
|
||||||
|
{
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_MODIFICAR;
|
||||||
|
|
||||||
|
//Datos viejos para la trazabilidad
|
||||||
|
Funciones.CopiarPropiedadesObjetos(mdl_KRO_TareasProgramadas_Historico_Final, mdl_KRO_TareasProgramadas_Historico_DatosViejos, false, false);
|
||||||
|
|
||||||
|
//Cargar los Datos Nuevos del Modelo
|
||||||
|
Funciones.CopiarPropiedadesObjetos(mdl_KRO_TareasProgramadas_Historico_AGrabar, mdl_KRO_TareasProgramadas_Historico_Final, false, false);
|
||||||
|
|
||||||
|
#region Update
|
||||||
|
string str_SQL_Update = " UPDATE " + nameof(KRO_TareasProgramadas_Historico) +
|
||||||
|
" SET " +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.idTareaProgramada) + "=@idTareaProgramada," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.fechaHoraInicio) + "=@fechaHoraInicio," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.fechaHoraFin) + "=@fechaHoraFin," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.resultado) + "=@resultado," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.fechaHoraTareaProgramada) + "=@fechaHoraTareaProgramada" +
|
||||||
|
" WHERE " +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.id) + "=@id";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Update = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idTareaProgramada", mdl_KRO_TareasProgramadas_Historico_Final.idTareaProgramada),
|
||||||
|
new SqlParameter("@fechaHoraInicio", mdl_KRO_TareasProgramadas_Historico_Final.fechaHoraInicio),
|
||||||
|
new SqlParameter("@fechaHoraFin", mdl_KRO_TareasProgramadas_Historico_Final.fechaHoraFin),
|
||||||
|
new SqlParameter("@resultado", mdl_KRO_TareasProgramadas_Historico_Final.resultado),
|
||||||
|
new SqlParameter("@fechaHoraTareaProgramada", mdl_KRO_TareasProgramadas_Historico_Final.fechaHoraTareaProgramada),
|
||||||
|
new SqlParameter("@id", mdl_KRO_TareasProgramadas_Historico_Final.id)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Update
|
||||||
|
obj_Exferia_Entities.Database.ExecuteSqlCommand(str_SQL_Update, arr_Parametros_Update);
|
||||||
|
|
||||||
|
//Id de la tabla
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Id = mdl_KRO_TareasProgramadas_Historico_Final.id;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mdl_KRO_TareasProgramadas_Historico_Final = new KRO_TareasProgramadas_Historico();
|
||||||
|
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_INSERTAR;
|
||||||
|
|
||||||
|
//Cargar los Datos del Modelo
|
||||||
|
Funciones.CopiarPropiedadesObjetos(mdl_KRO_TareasProgramadas_Historico_AGrabar, mdl_KRO_TareasProgramadas_Historico_Final, false, false);
|
||||||
|
|
||||||
|
#region INSERT
|
||||||
|
string str_SQL_Insert = " INSERT INTO " + nameof(KRO_TareasProgramadas_Historico) +
|
||||||
|
" (" +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.idTareaProgramada) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.fechaHoraInicio) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.fechaHoraFin) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.resultado) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.fechaHoraTareaProgramada) +
|
||||||
|
" ) " +
|
||||||
|
" OUTPUT INSERTED." + nameof(KRO_TareasProgramadas_Historico.id) +
|
||||||
|
" VALUES " +
|
||||||
|
" ( " +
|
||||||
|
"@idTareaProgramada," +
|
||||||
|
"@fechaHoraInicio," +
|
||||||
|
"@fechaHoraFin," +
|
||||||
|
"@resultado," +
|
||||||
|
"@fechaHoraTareaProgramada" +
|
||||||
|
" ) ";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Insert = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idTareaProgramada", mdl_KRO_TareasProgramadas_Historico_Final.idTareaProgramada),
|
||||||
|
new SqlParameter("@fechaHoraInicio", mdl_KRO_TareasProgramadas_Historico_Final.fechaHoraInicio),
|
||||||
|
new SqlParameter("@fechaHoraFin", mdl_KRO_TareasProgramadas_Historico_Final.fechaHoraFin),
|
||||||
|
new SqlParameter("@resultado", mdl_KRO_TareasProgramadas_Historico_Final.resultado),
|
||||||
|
new SqlParameter("@fechaHoraTareaProgramada", mdl_KRO_TareasProgramadas_Historico_Final.fechaHoraTareaProgramada)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Id de la tabla
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Id = obj_Exferia_Entities.Database.SqlQuery<long>(str_SQL_Insert, arr_Parametros_Insert).Single();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Grabar un registro de trazailidad con los datos de la transaccion realizada
|
||||||
|
Datos_Generales.USR_Trazabilidad_Grabar(typeof(KRO_TareasProgramadas_Historico), mdl_KRO_TareasProgramadas_Historico_DatosViejos, mdl_KRO_TareasProgramadas_Historico_DatosViejos, mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion, obj_Exferia_Entities);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Historico_Datos) + "/" + nameof(Grabar), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_INTERNO_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
public INTERNO_ValorDevuelto_Modelo Insertar(KRO_TareasProgramadas_Historico _mdl_KRO_TareasProgramadas_Historico)
|
||||||
|
{
|
||||||
|
Exferia_Entities Obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_INTERNO_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
Obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
KRO_TareasProgramadas_Historico mdl_KRO_TareasProgramadas_Historico_AGrabar = _mdl_KRO_TareasProgramadas_Historico;
|
||||||
|
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_INSERTAR;
|
||||||
|
|
||||||
|
#region INSERT
|
||||||
|
string str_SQL_Insert = " INSERT INTO " + nameof(KRO_TareasProgramadas_Historico) +
|
||||||
|
" (" +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.idTareaProgramada) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.fechaHoraInicio) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.fechaHoraFin) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.resultado) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.fechaHoraTareaProgramada) +
|
||||||
|
" ) " +
|
||||||
|
" OUTPUT INSERTED." + nameof(KRO_TareasProgramadas_Historico.id) +
|
||||||
|
" VALUES " +
|
||||||
|
" ( " +
|
||||||
|
"@idTareaProgramada," +
|
||||||
|
"@fechaHoraInicio," +
|
||||||
|
"@fechaHoraFin," +
|
||||||
|
"@resultado," +
|
||||||
|
"@fechaHoraTareaProgramada" +
|
||||||
|
" ) ";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Insert = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@idTareaProgramada", mdl_KRO_TareasProgramadas_Historico_AGrabar.idTareaProgramada),
|
||||||
|
new SqlParameter("@fechaHoraInicio", mdl_KRO_TareasProgramadas_Historico_AGrabar.fechaHoraInicio),
|
||||||
|
new SqlParameter("@fechaHoraFin", mdl_KRO_TareasProgramadas_Historico_AGrabar.fechaHoraFin),
|
||||||
|
new SqlParameter("@resultado", mdl_KRO_TareasProgramadas_Historico_AGrabar.resultado),
|
||||||
|
new SqlParameter("@fechaHoraTareaProgramada", mdl_KRO_TareasProgramadas_Historico_AGrabar.fechaHoraTareaProgramada)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Id de la tabla
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Id = Obj_Exferia_Entities.Database.SqlQuery<long>(str_SQL_Insert, arr_Parametros_Insert).Single();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Historico_Datos) + "/" + nameof(Insertar), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
|
||||||
|
Obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
Obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_INTERNO_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Borrar
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Borrar(long _lng_id)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_ELIMINAR;
|
||||||
|
|
||||||
|
//Se utiliza la transaccion por la llamada al procedimiento de almacenado
|
||||||
|
using (TransactionScope transaccion_SQL = new TransactionScope(TransactionScopeOption.Required))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
// Ver si existe ######################################################################
|
||||||
|
KRO_TareasProgramadas_Historico mdl_KRO_TareasProgramadas_Historico_Final = Obtener_Modelo_Por_Id(_lng_id);
|
||||||
|
//######################################################################################
|
||||||
|
|
||||||
|
if (mdl_KRO_TareasProgramadas_Historico_Final != null)
|
||||||
|
{
|
||||||
|
#region Delete
|
||||||
|
string str_SQL_Delete = " DELETE FROM " + nameof(KRO_TareasProgramadas_Historico) +
|
||||||
|
" WHERE " +
|
||||||
|
nameof(KRO_TareasProgramadas_Historico.id) + "=@id";
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Delete = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@id", _lng_id)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Delete
|
||||||
|
obj_Exferia_Entities.Database.ExecuteSqlCommand(str_SQL_Delete, arr_Parametros_Delete);
|
||||||
|
|
||||||
|
//Grabar un registro de trazabailidad con los datos de la transaccion realizada.
|
||||||
|
Datos_Generales.USR_Trazabilidad_Grabar(typeof(KRO_TareasProgramadas_Historico), null, mdl_KRO_TareasProgramadas_Historico_Final, G_ENUM_TIPOACCION.INT_ELIMINAR, obj_Exferia_Entities);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//Devolver también el Objeto
|
||||||
|
mdl_ValorDevuelto_Modelo.Id = _lng_id;
|
||||||
|
|
||||||
|
//Se termina la TRansaccion Correctamente
|
||||||
|
transaccion_SQL.Complete();
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Historico_Datos) + "/" + nameof(Borrar), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
|
||||||
|
//Finalizar transaccion
|
||||||
|
transaccion_SQL.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return mdl_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Borrar(long _lng_id, long _lng_idAuxiliar)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
public override INTERNO_ValorDevuelto_Modelo Borrar(object _mdl_obj)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,264 @@
|
||||||
|
using Exferia_Aplicacion.Herencia.Capas;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using static Exferia_Aplicacion.General.Enumerados;
|
||||||
|
using Exferia_General;
|
||||||
|
using System.Transactions;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._2_Datos
|
||||||
|
{
|
||||||
|
public class KRO_TareasProgramadas_Modificadas_Datos
|
||||||
|
{
|
||||||
|
|
||||||
|
#region MODELOS
|
||||||
|
|
||||||
|
#region Modelo Simple
|
||||||
|
private KRO_TareasProgramadas_Modificadas g_mdl_KRO_TareasProgramadas_Modificadas = null;
|
||||||
|
|
||||||
|
public KRO_TareasProgramadas_Modificadas Obtener_Modelo_Por_Id(long _lng_id)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + nameof(KRO_TareasProgramadas_Modificadas) + "." + nameof(KRO_TareasProgramadas_Modificadas.id) + "=@id";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@id", _lng_id)
|
||||||
|
};
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el modelo
|
||||||
|
Ejecutar_Consulta_Modelo(str_SQL,
|
||||||
|
arr_Parametros);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Modificadas_Datos) + "/" + nameof(Obtener_Modelo_Por_Id), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_mdl_KRO_TareasProgramadas_Modificadas;
|
||||||
|
}
|
||||||
|
private void Ejecutar_Consulta_Modelo(string _str_SQL,
|
||||||
|
object[] _arr_Parametros)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Conexion
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
//Rellenar el Modelo
|
||||||
|
g_mdl_KRO_TareasProgramadas_Modificadas = obj_Exferia_Entities.Database.SqlQuery<KRO_TareasProgramadas_Modificadas>(_str_SQL, _arr_Parametros).FirstOrDefault();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Modificadas_Datos) + "/" + nameof(Ejecutar_Consulta_Modelo), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Modelo Listado
|
||||||
|
private List<KRO_TareasProgramadas_Modificadas> g_lst_KRO_TareasProgramadas_Modificadas = null;
|
||||||
|
|
||||||
|
public List<KRO_TareasProgramadas_Modificadas> Obtener_ModeloListado_para_Servicio()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Consulta
|
||||||
|
string str_SQL = Obtener_Consulta_Modelo() +
|
||||||
|
//WHERE
|
||||||
|
" WHERE " + nameof(KRO_TareasProgramadas_Modificadas.servicioWindowsActualizado) + " is null ";
|
||||||
|
|
||||||
|
//Ejecutar y rellenar el listado
|
||||||
|
Ejecutar_Consulta_Modelo_Listado(str_SQL,
|
||||||
|
new object[] { });
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Modificadas_Datos) + "/" + nameof(Obtener_ModeloListado_para_Servicio), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_lst_KRO_TareasProgramadas_Modificadas;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Ejecutar_Consulta_Modelo_Listado(string _str_SQL,
|
||||||
|
object[] _arr_Parametros)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Conexion
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
|
||||||
|
//Rellenar el modelo
|
||||||
|
g_lst_KRO_TareasProgramadas_Modificadas = obj_Exferia_Entities.Database.SqlQuery<KRO_TareasProgramadas_Modificadas>(_str_SQL, _arr_Parametros).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Modificadas_Datos) + "/" + nameof(Ejecutar_Consulta_Modelo_Listado), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private string Obtener_Consulta_Modelo()
|
||||||
|
{
|
||||||
|
return
|
||||||
|
" SELECT " +
|
||||||
|
nameof(KRO_TareasProgramadas_Modificadas.id) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Modificadas.modificada) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Modificadas.servicioWindowsActualizado) +
|
||||||
|
" FROM " + nameof(KRO_TareasProgramadas_Modificadas);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Grabar
|
||||||
|
public INTERNO_ValorDevuelto_Modelo Insertar(DateTime _dtt_Fecha)
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_INTERNO_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_INSERTAR;
|
||||||
|
|
||||||
|
#region INSERT
|
||||||
|
string str_SQL_Insert = " INSERT INTO " + nameof(KRO_TareasProgramadas_Modificadas) +
|
||||||
|
" (" +
|
||||||
|
nameof(KRO_TareasProgramadas_Modificadas.modificada) + "," +
|
||||||
|
nameof(KRO_TareasProgramadas_Modificadas.servicioWindowsActualizado) +
|
||||||
|
" ) " +
|
||||||
|
" VALUES " +
|
||||||
|
" ( " +
|
||||||
|
"@modificada," +
|
||||||
|
"@servicioWindowsActualizado" +
|
||||||
|
" ) ";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Insert = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@modificada", _dtt_Fecha),
|
||||||
|
new SqlParameter("@servicioWindowsActualizado", DBNull.Value),
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
obj_Exferia_Entities.Database.ExecuteSqlCommand(str_SQL_Insert, arr_Parametros_Insert);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Modificadas_Datos) + "/" + nameof(Insertar), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_INTERNO_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public INTERNO_ValorDevuelto_Modelo Actualizar_Desde_ServicioWindos()
|
||||||
|
{
|
||||||
|
Exferia_Entities obj_Exferia_Entities = null;
|
||||||
|
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
obj_Exferia_Entities = new Exferia_Entities();
|
||||||
|
obj_Exferia_Entities.Configuration.LazyLoadingEnabled = false;
|
||||||
|
|
||||||
|
//Tipo de Accion que se va a realizar
|
||||||
|
mdl_ValorDevuelto_Modelo.TipoAccion = G_ENUM_TIPOACCION.INT_MODIFICAR;
|
||||||
|
|
||||||
|
#region Update
|
||||||
|
string str_SQL_Update = " UPDATE " + nameof(KRO_TareasProgramadas_Modificadas) +
|
||||||
|
" SET " +
|
||||||
|
nameof(KRO_TareasProgramadas_Modificadas.servicioWindowsActualizado) + "=@servicioWindowsActualizado";
|
||||||
|
|
||||||
|
//Parametros
|
||||||
|
object[] arr_Parametros_Update = new object[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@servicioWindowsActualizado", true)
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Update
|
||||||
|
obj_Exferia_Entities.Database.ExecuteSqlCommand(str_SQL_Update, arr_Parametros_Update);
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Control_Errores("", ex, nameof(KRO_TareasProgramadas_Modificadas_Datos) + "/" + nameof(Actualizar_Desde_ServicioWindos), true);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
|
||||||
|
obj_Exferia_Entities.Database.Connection.Close();
|
||||||
|
obj_Exferia_Entities.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,199 @@
|
||||||
|
namespace Exferia_Kronos._4_Vistas.ControlesPersonalizados_DentroPaneles
|
||||||
|
{
|
||||||
|
partial class CTU_P_TareaProgramada_Asociada
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Variable del diseñador necesaria.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Limpiar los recursos que se estén usando.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true si los recursos administrados se deben desechar; false en caso contrario.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Código generado por el Diseñador de componentes
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Método necesario para admitir el Diseñador. No se puede modificar
|
||||||
|
/// el contenido de este método con el editor de código.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.ex_usc_F3_Asociada = new Exferia_Controles.Exferia_F3();
|
||||||
|
this.ex_btn_Borrar = new Exferia_Controles.Exferia_Button();
|
||||||
|
this.ex_cbo_AntesDespues = new Exferia_Controles.Exferia_ComboBox();
|
||||||
|
this.ex_lbl_AntesDespues = new Exferia_Controles.Exferia_Label();
|
||||||
|
this.ex_chk_DetenerSiFalla = new Exferia_Controles.Exferia_CheckBox();
|
||||||
|
this.ex_txt_Orden = new Exferia_Controles.Exferia_TextBox();
|
||||||
|
this.exferia_Label1 = new Exferia_Controles.Exferia_Label();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// ex_usc_F3_Asociada
|
||||||
|
//
|
||||||
|
this.ex_usc_F3_Asociada.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.ex_usc_F3_Asociada.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_Ancho_Codigo = Exferia_Aplicacion.General.Enumerados.G_ENUM_F3_CODIGO.Normal;
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_Ancho_Titulo = Exferia_Aplicacion.General.Enumerados.G_ENUM_F3_TITULO.Normal;
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_Bloqueable = true;
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_Bloquear_F3_Descripcion = false;
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_Codigo = "";
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_DatosAuxiliares_1 = null;
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_DatosAuxiliares_2 = null;
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_DatosAuxiliares_3 = null;
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_Descripcion = "";
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_FechaBorrado = null;
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_Id = ((long)(-1));
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_IdEjercicio_Baja = null;
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_Objeto_ParaEnviarAMantenimiento = null;
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_PRINCIPAL_Obligatorio = true;
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_PRINCIPAL_Opcion_BuscarDatos = "";
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_PRINCIPAL_PermitirAdd = true;
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_RELACIONADOS_Objetos_Hijos = null;
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_RELACIONAL_TipoRelacion = Exferia_Controles.Exferia_F3.Exferia_F3_TipoRelacion.Ninguna;
|
||||||
|
this.ex_usc_F3_Asociada.Exferia_F3_Titulo = "Tarea Programada";
|
||||||
|
this.ex_usc_F3_Asociada.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.ex_usc_F3_Asociada.Name = "ex_usc_F3_Asociada";
|
||||||
|
this.ex_usc_F3_Asociada.Size = new System.Drawing.Size(774, 21);
|
||||||
|
this.ex_usc_F3_Asociada.TabIndex = 0;
|
||||||
|
this.ex_usc_F3_Asociada.Tag = "";
|
||||||
|
//
|
||||||
|
// ex_btn_Borrar
|
||||||
|
//
|
||||||
|
this.ex_btn_Borrar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.ex_btn_Borrar.BackColor = System.Drawing.Color.Maroon;
|
||||||
|
this.ex_btn_Borrar.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
|
this.ex_btn_Borrar.Exferia_Button_Bloqueable = true;
|
||||||
|
this.ex_btn_Borrar.Exferia_Button_Imagen = Exferia_Aplicacion.General.Imagenes.G_ENUM_IMAGENES.G_IMG_BORRAR;
|
||||||
|
this.ex_btn_Borrar.Exferia_Button_Permitir_CambioFuenteAutomatico = true;
|
||||||
|
this.ex_btn_Borrar.Exferia_Button_ReadOnly = false;
|
||||||
|
this.ex_btn_Borrar.Exferia_Button_TabStop = false;
|
||||||
|
this.ex_btn_Borrar.Exferia_Button_ToolTip = "";
|
||||||
|
this.ex_btn_Borrar.FlatAppearance.BorderSize = 0;
|
||||||
|
this.ex_btn_Borrar.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.ex_btn_Borrar.Location = new System.Drawing.Point(796, 3);
|
||||||
|
this.ex_btn_Borrar.Name = "ex_btn_Borrar";
|
||||||
|
this.ex_btn_Borrar.Size = new System.Drawing.Size(21, 21);
|
||||||
|
this.ex_btn_Borrar.TabIndex = 2;
|
||||||
|
this.ex_btn_Borrar.TabStop = false;
|
||||||
|
this.ex_btn_Borrar.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||||
|
this.ex_btn_Borrar.UseVisualStyleBackColor = false;
|
||||||
|
this.ex_btn_Borrar.Click += new System.EventHandler(this.ex_btn_P_TareProgramada_Asociada_Borrar_click);
|
||||||
|
//
|
||||||
|
// ex_cbo_AntesDespues
|
||||||
|
//
|
||||||
|
this.ex_cbo_AntesDespues.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(237)))), ((int)(((byte)(175)))));
|
||||||
|
this.ex_cbo_AntesDespues.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
|
||||||
|
this.ex_cbo_AntesDespues.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.ex_cbo_AntesDespues.Exferia_ComboBox_Bloqueable = true;
|
||||||
|
this.ex_cbo_AntesDespues.Exferia_ComboBox_BorderColor = System.Drawing.Color.Black;
|
||||||
|
this.ex_cbo_AntesDespues.Exferia_ComboBox_BorderStyle = System.Windows.Forms.ButtonBorderStyle.Solid;
|
||||||
|
this.ex_cbo_AntesDespues.Exferia_ComboBox_Obligatorio = true;
|
||||||
|
this.ex_cbo_AntesDespues.FormattingEnabled = true;
|
||||||
|
this.ex_cbo_AntesDespues.Location = new System.Drawing.Point(109, 27);
|
||||||
|
this.ex_cbo_AntesDespues.Name = "ex_cbo_AntesDespues";
|
||||||
|
this.ex_cbo_AntesDespues.Size = new System.Drawing.Size(124, 21);
|
||||||
|
this.ex_cbo_AntesDespues.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// ex_lbl_AntesDespues
|
||||||
|
//
|
||||||
|
this.ex_lbl_AntesDespues.AutoSize = true;
|
||||||
|
this.ex_lbl_AntesDespues.Location = new System.Drawing.Point(3, 31);
|
||||||
|
this.ex_lbl_AntesDespues.Name = "ex_lbl_AntesDespues";
|
||||||
|
this.ex_lbl_AntesDespues.Size = new System.Drawing.Size(40, 13);
|
||||||
|
this.ex_lbl_AntesDespues.TabIndex = 4;
|
||||||
|
this.ex_lbl_AntesDespues.Text = "Accion";
|
||||||
|
//
|
||||||
|
// ex_chk_DetenerSiFalla
|
||||||
|
//
|
||||||
|
this.ex_chk_DetenerSiFalla.AutoSize = true;
|
||||||
|
this.ex_chk_DetenerSiFalla.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.ex_chk_DetenerSiFalla.Exferia_CheckBox_Bloqueable = true;
|
||||||
|
this.ex_chk_DetenerSiFalla.Exferia_CheckBox_Obligatorio = false;
|
||||||
|
this.ex_chk_DetenerSiFalla.Exferia_CheckBox_ToolTip = "";
|
||||||
|
this.ex_chk_DetenerSiFalla.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
|
this.ex_chk_DetenerSiFalla.Location = new System.Drawing.Point(239, 29);
|
||||||
|
this.ex_chk_DetenerSiFalla.Name = "ex_chk_DetenerSiFalla";
|
||||||
|
this.ex_chk_DetenerSiFalla.Size = new System.Drawing.Size(96, 17);
|
||||||
|
this.ex_chk_DetenerSiFalla.TabIndex = 5;
|
||||||
|
this.ex_chk_DetenerSiFalla.Text = "Detener si falla";
|
||||||
|
this.ex_chk_DetenerSiFalla.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// ex_txt_Orden
|
||||||
|
//
|
||||||
|
this.ex_txt_Orden.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_Bloqueable = true;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_BordeColor_Foco = System.Drawing.Color.Red;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_BordeColor_Normal = System.Drawing.Color.Black;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_Fondo = System.Drawing.SystemColors.Window;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_MaxLength = 32767;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_Multiline = false;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_NoBloquear = true;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_Obligatorio = false;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_PasswordChar = '\0';
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_Permitir_CambioFuenteAutomatico = true;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_ReadOnly = false;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_SelectionLength = 0;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_SelectionStart = 0;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_TabStop_Txt = true;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_Texto_Inicial = "";
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_Tipo_Decimal_Decimales = 2;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_Tipo_Decimal_Enteros = 9;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_Tipos = Exferia_Aplicacion.General.Enumerados.G_ENUM_TEXTBOX_TIPODATO.Textos;
|
||||||
|
this.ex_txt_Orden.Exferia_TextBox_UseSystemPasswordChar = false;
|
||||||
|
this.ex_txt_Orden.Location = new System.Drawing.Point(684, 27);
|
||||||
|
this.ex_txt_Orden.Name = "ex_txt_Orden";
|
||||||
|
this.ex_txt_Orden.Padding = new System.Windows.Forms.Padding(2);
|
||||||
|
this.ex_txt_Orden.Size = new System.Drawing.Size(83, 22);
|
||||||
|
this.ex_txt_Orden.TabIndex = 6;
|
||||||
|
//
|
||||||
|
// exferia_Label1
|
||||||
|
//
|
||||||
|
this.exferia_Label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.exferia_Label1.AutoSize = true;
|
||||||
|
this.exferia_Label1.Location = new System.Drawing.Point(638, 32);
|
||||||
|
this.exferia_Label1.Name = "exferia_Label1";
|
||||||
|
this.exferia_Label1.Size = new System.Drawing.Size(36, 13);
|
||||||
|
this.exferia_Label1.TabIndex = 7;
|
||||||
|
this.exferia_Label1.Text = "Orden";
|
||||||
|
//
|
||||||
|
// CTU_P_TareaProgramada_Asociada
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.exferia_Label1);
|
||||||
|
this.Controls.Add(this.ex_txt_Orden);
|
||||||
|
this.Controls.Add(this.ex_chk_DetenerSiFalla);
|
||||||
|
this.Controls.Add(this.ex_lbl_AntesDespues);
|
||||||
|
this.Controls.Add(this.ex_cbo_AntesDespues);
|
||||||
|
this.Controls.Add(this.ex_btn_Borrar);
|
||||||
|
this.Controls.Add(this.ex_usc_F3_Asociada);
|
||||||
|
this.Name = "CTU_P_TareaProgramada_Asociada";
|
||||||
|
this.Size = new System.Drawing.Size(820, 52);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private Exferia_Controles.Exferia_F3 ex_usc_F3_Asociada;
|
||||||
|
private Exferia_Controles.Exferia_Button ex_btn_Borrar;
|
||||||
|
private Exferia_Controles.Exferia_ComboBox ex_cbo_AntesDespues;
|
||||||
|
private Exferia_Controles.Exferia_Label ex_lbl_AntesDespues;
|
||||||
|
private Exferia_Controles.Exferia_CheckBox ex_chk_DetenerSiFalla;
|
||||||
|
private Exferia_Controles.Exferia_TextBox ex_txt_Orden;
|
||||||
|
private Exferia_Controles.Exferia_Label exferia_Label1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,205 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using Exferia_Controles;
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_Aplicacion.Visualizacion;
|
||||||
|
using Exferia_Formularios;
|
||||||
|
using Exferia_Kronos.General;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._4_Vistas.ControlesPersonalizados_DentroPaneles
|
||||||
|
{
|
||||||
|
public partial class CTU_P_TareaProgramada_Asociada : UserControl
|
||||||
|
{
|
||||||
|
#region Propiedades privadas
|
||||||
|
private P_Base g_frm_DeDondeHereda;
|
||||||
|
private KRO_TareasProgramadas_Asociadas g_mdl_KRO_TareasProgramadas_Asociadas;
|
||||||
|
private int g_int_NumerObjeto;
|
||||||
|
private List<INTERNO_ComboBox_Modelo> g_lst_AntesDespues_INTERNO_ComboBox_Modelo = new List<INTERNO_ComboBox_Modelo>();
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Eventos publicos
|
||||||
|
public event EventHandler<INTERNO_EventArgs> Boton_CTU_P_TareaProgramada_Asociada_Delete_Click;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructor
|
||||||
|
public CTU_P_TareaProgramada_Asociada(P_Base _frm_DeDondeHereda,
|
||||||
|
int _int_NumerObjeto,
|
||||||
|
KRO_TareasProgramadas_Asociadas _mdl_KRO_TareasProgramadas_Asociadas,
|
||||||
|
List<INTERNO_ComboBox_Modelo> _lst_AntesDespues_INTERNO_ComboBox_Modelo,
|
||||||
|
long _lng_idTareaAsociada_Principal)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Repintar.Empezar(this);
|
||||||
|
|
||||||
|
g_frm_DeDondeHereda = _frm_DeDondeHereda;
|
||||||
|
g_mdl_KRO_TareasProgramadas_Asociadas = _mdl_KRO_TareasProgramadas_Asociadas;
|
||||||
|
g_int_NumerObjeto = _int_NumerObjeto;
|
||||||
|
g_lst_AntesDespues_INTERNO_ComboBox_Modelo = _lst_AntesDespues_INTERNO_ComboBox_Modelo;
|
||||||
|
|
||||||
|
//Rellenar el ComboBox
|
||||||
|
if (g_lst_AntesDespues_INTERNO_ComboBox_Modelo != null && g_lst_AntesDespues_INTERNO_ComboBox_Modelo.Count > 0)
|
||||||
|
{
|
||||||
|
ex_cbo_AntesDespues.Items.Clear();
|
||||||
|
ex_cbo_AntesDespues.DataSource = g_lst_AntesDespues_INTERNO_ComboBox_Modelo;
|
||||||
|
ex_cbo_AntesDespues.SelectedIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Rellenar para los F3 ..........................................................
|
||||||
|
ex_usc_F3_Asociada.Exferia_F3_PantallaContenedora = _frm_DeDondeHereda;
|
||||||
|
ex_usc_F3_Asociada.Exferia_F3_PRINCIPAL_Opcion_BuscarDatos = Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA;
|
||||||
|
if(_lng_idTareaAsociada_Principal>-1)
|
||||||
|
{
|
||||||
|
List<INTERNO_Filtro_OpcionPadre_Modelo> lst_INTERNO_Filtro_OpcionPadre_Modelo_FILTRO = new List<INTERNO_Filtro_OpcionPadre_Modelo>();
|
||||||
|
lst_INTERNO_Filtro_OpcionPadre_Modelo_FILTRO.Add(new INTERNO_Filtro_OpcionPadre_Modelo(nameof(KRO_TareasProgramadas.id), _lng_idTareaAsociada_Principal));
|
||||||
|
ex_usc_F3_Asociada.Exferia_F3_RELACIONADOS = lst_INTERNO_Filtro_OpcionPadre_Modelo_FILTRO;
|
||||||
|
}
|
||||||
|
|
||||||
|
Cargar_Datos();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_Asociada) + "/" + nameof(CTU_P_TareaProgramada_Asociada));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Cargar
|
||||||
|
private void Cargar_Datos()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Cargar Datos si los tuviera
|
||||||
|
if (g_mdl_KRO_TareasProgramadas_Asociadas != null)
|
||||||
|
{
|
||||||
|
//AntesDespues
|
||||||
|
ex_cbo_AntesDespues.SelectedItem = g_lst_AntesDespues_INTERNO_ComboBox_Modelo.Where(m => m.Identificador.Equals(g_mdl_KRO_TareasProgramadas_Asociadas.tipoEjecucionAntesDespues.ToString())).FirstOrDefault();
|
||||||
|
|
||||||
|
//Detener si falla
|
||||||
|
ex_chk_DetenerSiFalla.Checked = g_mdl_KRO_TareasProgramadas_Asociadas.ejecutar == 1 ? true : false;
|
||||||
|
|
||||||
|
//Tarea programada asociada
|
||||||
|
if (g_mdl_KRO_TareasProgramadas_Asociadas.KRO_TareasProgramadas1 != null)
|
||||||
|
{
|
||||||
|
//Si hay datos no puede estar vacio
|
||||||
|
ex_usc_F3_Asociada.Exferia_F3_Id = g_mdl_KRO_TareasProgramadas_Asociadas.KRO_TareasProgramadas1.id;
|
||||||
|
ex_usc_F3_Asociada.Exferia_F3_Codigo = g_mdl_KRO_TareasProgramadas_Asociadas.KRO_TareasProgramadas1.codigo;
|
||||||
|
ex_usc_F3_Asociada.Exferia_F3_Descripcion = g_mdl_KRO_TareasProgramadas_Asociadas.KRO_TareasProgramadas1.descripcion;
|
||||||
|
ex_usc_F3_Asociada.Exferia_F3_FechaBorrado = g_mdl_KRO_TareasProgramadas_Asociadas.KRO_TareasProgramadas1.fechaBorrado;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ex_usc_F3_Asociada.Exferia_F3_Id = -1;
|
||||||
|
ex_usc_F3_Asociada.Exferia_F3_Codigo = string.Empty;
|
||||||
|
ex_usc_F3_Asociada.Exferia_F3_Descripcion = string.Empty;
|
||||||
|
ex_usc_F3_Asociada.Exferia_F3_FechaBorrado = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_Asociada) + "/" + nameof(Cargar_Datos));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Validacion
|
||||||
|
public INTERNO_ValorDevuelto_Modelo ValidarDatos()
|
||||||
|
{
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_INTERNO_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Tarea Asociada no puede estar Vacio (Obligatorio)
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_usc_F3_Asociada.Exferia_F3_Codigo.Trim().Length == 0 &&
|
||||||
|
ex_usc_F3_Asociada.Exferia_F3_Descripcion.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_VACIO(ex_usc_F3_Asociada.Exferia_F3_Titulo);
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_usc_F3_Asociada.Exferia_F3_PRINCIPAL_TextBox_Codigo;
|
||||||
|
}
|
||||||
|
// Si hay Tarea Asociada validar que es Correcta
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && (ex_usc_F3_Asociada.Exferia_F3_Codigo.Trim().Length != 0 ||
|
||||||
|
ex_usc_F3_Asociada.Exferia_F3_Descripcion.Trim().Length != 0) && ex_usc_F3_Asociada.Exferia_F3_Id == -1)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_F3_INCORRECTO(ex_usc_F3_Asociada.Exferia_F3_Titulo);
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_usc_F3_Asociada.Exferia_F3_PRINCIPAL_TextBox_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_MENSAJES_GENERAL_ERROR_VALIDARDATOSPANTALLA();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_Asociada) + "/" + nameof(ValidarDatos));
|
||||||
|
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_MENSAJES_GENERAL_ERROR_VALIDARDATOSPANTALLA();
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_INTERNO_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Grabar
|
||||||
|
public KRO_TareasProgramadas_Asociadas Obtener_Para_Grabar(long _lng_idTareaProgramada)
|
||||||
|
{
|
||||||
|
KRO_TareasProgramadas_Asociadas mdl_KRO_TareasProgramadas_Asociadas = new KRO_TareasProgramadas_Asociadas();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//id
|
||||||
|
mdl_KRO_TareasProgramadas_Asociadas.id = g_mdl_KRO_TareasProgramadas_Asociadas!=null ? g_mdl_KRO_TareasProgramadas_Asociadas.id : -1;
|
||||||
|
|
||||||
|
//idTareaProgramada
|
||||||
|
mdl_KRO_TareasProgramadas_Asociadas.idTareaProgramada = _lng_idTareaProgramada;
|
||||||
|
|
||||||
|
//idTareaProgramada_Asociada
|
||||||
|
mdl_KRO_TareasProgramadas_Asociadas.idTareaProgramada_Asociada = ex_usc_F3_Asociada.Exferia_F3_Id;
|
||||||
|
|
||||||
|
//tipoEjecucionAntesDespues
|
||||||
|
mdl_KRO_TareasProgramadas_Asociadas.tipoEjecucionAntesDespues = int.Parse(((INTERNO_ComboBox_Modelo)ex_cbo_AntesDespues.SelectedItem).Identificador);
|
||||||
|
|
||||||
|
//orden
|
||||||
|
mdl_KRO_TareasProgramadas_Asociadas.orden = ex_txt_Orden.Text.Trim().Length>0 ? int.Parse(ex_txt_Orden.Text.Trim()) : 0;
|
||||||
|
|
||||||
|
//ejecutar
|
||||||
|
mdl_KRO_TareasProgramadas_Asociadas.ejecutar = ex_chk_DetenerSiFalla.Checked ? Variables.G_INT_KRONOS_TAREASPROGRAMADAS_ASOCIADAS_EJECUTAR_NO : Variables.G_INT_KRONOS_TAREASPROGRAMADAS_ASOCIADAS_EJECUTAR_SI;
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_Asociada) + "/" + nameof(Obtener_Para_Grabar));
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_KRO_TareasProgramadas_Asociadas;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Borrar
|
||||||
|
private void ex_btn_P_TareProgramada_Asociada_Borrar_click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//Para que salte el evento en el otro lado
|
||||||
|
Boton_CTU_P_TareaProgramada_Asociada_Delete_Click?.Invoke(sender, new INTERNO_EventArgs(g_int_NumerObjeto));
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,875 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Exferia_Formularios;
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_Aplicacion.Visualizacion;
|
||||||
|
using Exferia_Aplicacion.Modelos_Kronos;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using Exferia_Kronos._1_Modelos;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._4_Vistas.ControlesPersonalizados_DentroPaneles
|
||||||
|
{
|
||||||
|
public partial class CTU_P_TareaProgramada_CopiaSeguridad : UserControl
|
||||||
|
{
|
||||||
|
#region Propiedades privadas
|
||||||
|
private P_Base g_frm_DeDondeHereda;
|
||||||
|
private INTERNO_KRO_Procesos_Modelo g_mdl_INTERNO_KRO_Procesos_Modelo = null;
|
||||||
|
private KRO_TareasProgramadas g_mdl_KRO_TareasProgramadas =null;
|
||||||
|
private int g_int_NumerObjeto;
|
||||||
|
|
||||||
|
private List<INTERNO_ComboBox_Modelo> g_lst_INTERNO_ComboBox_Modelo_BASEDATOS = new List<INTERNO_ComboBox_Modelo>();
|
||||||
|
|
||||||
|
private bool g_bol_CargandoDatos = false;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructor
|
||||||
|
public CTU_P_TareaProgramada_CopiaSeguridad(P_Base _frm_DeDondeHereda,
|
||||||
|
int _int_NumerObjeto,
|
||||||
|
INTERNO_KRO_Procesos_Modelo _mdl_INTERNO_KRO_Procesos_Modelo,
|
||||||
|
KRO_TareasProgramadas _mdl_KRO_TareasProgramadas)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Repintar.Empezar(this);
|
||||||
|
|
||||||
|
g_frm_DeDondeHereda = _frm_DeDondeHereda;
|
||||||
|
g_mdl_INTERNO_KRO_Procesos_Modelo = _mdl_INTERNO_KRO_Procesos_Modelo;
|
||||||
|
g_mdl_KRO_TareasProgramadas = _mdl_KRO_TareasProgramadas;
|
||||||
|
g_int_NumerObjeto = _int_NumerObjeto;
|
||||||
|
|
||||||
|
Cargar_Datos();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_CopiaSeguridad) + "/" + nameof(CTU_P_TareaProgramada_CopiaSeguridad));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Cargar
|
||||||
|
private void Cargar_Datos()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
g_bol_CargandoDatos = true;
|
||||||
|
|
||||||
|
//Cargar Datos si los tuviera
|
||||||
|
if (g_mdl_KRO_TareasProgramadas != null)
|
||||||
|
{
|
||||||
|
if (g_mdl_KRO_TareasProgramadas.tareaParametros!=null && g_mdl_KRO_TareasProgramadas.tareaParametros.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
string[] arr_Parametros = g_mdl_KRO_TareasProgramadas.tareaParametros.Split('~');
|
||||||
|
if (arr_Parametros != null && arr_Parametros.Count() > 0)
|
||||||
|
{
|
||||||
|
foreach (string str_Parametro in arr_Parametros)
|
||||||
|
{
|
||||||
|
string[] arr_ValoresParametro = str_Parametro.Split('|');
|
||||||
|
|
||||||
|
if (arr_ValoresParametro != null && arr_ValoresParametro.Count() == 2)
|
||||||
|
{
|
||||||
|
//Servidor
|
||||||
|
if (arr_ValoresParametro[0] == Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_CONEXION_SERVIDOR.Codigo)
|
||||||
|
{
|
||||||
|
ex_txt_Servidor.Text = arr_ValoresParametro[1];
|
||||||
|
}
|
||||||
|
//Usuario/Clave
|
||||||
|
else if (arr_ValoresParametro[0] == Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_CONEXION_USUARIOCLAVE.Codigo)
|
||||||
|
{
|
||||||
|
//Tiene usuario y Clave
|
||||||
|
if (arr_ValoresParametro[1].Trim().Length > 0)
|
||||||
|
{
|
||||||
|
ex_rdb_ConClave.Checked = true;
|
||||||
|
ex_txt_Usuario.Exferia_TextBox_NoBloquear = true;
|
||||||
|
ex_txt_Clave.Exferia_TextBox_NoBloquear = true;
|
||||||
|
|
||||||
|
string[] arr_UsuarioClave = arr_ValoresParametro[1].Trim().Split('§');
|
||||||
|
if (arr_UsuarioClave != null && arr_UsuarioClave.Count() == 2)
|
||||||
|
{
|
||||||
|
ex_txt_Usuario.Text = arr_UsuarioClave[0];
|
||||||
|
ex_txt_Clave.Text = arr_UsuarioClave[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//No tiene usuario y clave
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ex_rdb_SinClave.Checked = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Base de datos
|
||||||
|
else if (arr_ValoresParametro[0] == Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_CONEXION_BASEDATOS.Codigo)
|
||||||
|
{
|
||||||
|
Rellenar_BasesDatos();
|
||||||
|
|
||||||
|
if (g_lst_INTERNO_ComboBox_Modelo_BASEDATOS.Count > 0)
|
||||||
|
{
|
||||||
|
ex_cbo_BaseDatos.SelectedItem = g_lst_INTERNO_ComboBox_Modelo_BASEDATOS.Where(m => m.Identificador.Equals(arr_ValoresParametro[1])).FirstOrDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Destino-Ruta
|
||||||
|
else if (arr_ValoresParametro[0] == Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_DESTINO_RUTA.Codigo)
|
||||||
|
{
|
||||||
|
ex_usc_Destino_Ruta.Exferia_FicheroSeleccion_NombreFichero = arr_ValoresParametro[1];
|
||||||
|
}
|
||||||
|
//Destino-Fichero
|
||||||
|
else if (arr_ValoresParametro[0] == Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_DESTINO_NOMBREFICHERO.Codigo)
|
||||||
|
{
|
||||||
|
ex_txt_Destino_Nombre.Text = arr_ValoresParametro[1];
|
||||||
|
}
|
||||||
|
//Destino-NombreEquipo
|
||||||
|
else if (arr_ValoresParametro[0] == Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_DESTINO_NOMBREEQUIPO.Codigo)
|
||||||
|
{
|
||||||
|
ex_txt_Destino_NombreEquipo.Text = arr_ValoresParametro[1];
|
||||||
|
}
|
||||||
|
//Destino-Dominio
|
||||||
|
else if (arr_ValoresParametro[0] == Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_DESTINO_DOMINIO.Codigo)
|
||||||
|
{
|
||||||
|
ex_txt_Destino_Dominio.Text = arr_ValoresParametro[1];
|
||||||
|
}
|
||||||
|
//Destino-usuario-Clave
|
||||||
|
else if (arr_ValoresParametro[0] == Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_DESTINO_USUARIOCLAVE.Codigo)
|
||||||
|
{
|
||||||
|
//Tiene usuario y Clave
|
||||||
|
if (arr_ValoresParametro[1].Trim().Length > 0)
|
||||||
|
{
|
||||||
|
string[] arr_UsuarioClave = arr_ValoresParametro[1].Trim().Split('§');
|
||||||
|
if (arr_UsuarioClave != null && arr_UsuarioClave.Count() == 2)
|
||||||
|
{
|
||||||
|
ex_txt_Destino_Usuario.Text = arr_UsuarioClave[0];
|
||||||
|
ex_txt_Destino_Clave.Text = arr_UsuarioClave[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Destino-Comprimir
|
||||||
|
else if (arr_ValoresParametro[0] == Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_DESTINO_COMPRIMIR.Codigo)
|
||||||
|
{
|
||||||
|
ex_chk_Destino_Comprimido.Checked = arr_ValoresParametro[1] == "1" ? true : false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//retenciones_GuardarTodasLasVersiones_Dias
|
||||||
|
if (g_mdl_KRO_TareasProgramadas.retenciones_GuardarTodasLasVersiones_Dias != null)
|
||||||
|
{
|
||||||
|
ex_chk_Retencion_GuardarTodasLasVersiones.Checked = true;
|
||||||
|
ex_txt_Retencion_GuardarTodasLasVersiones_Dias.Text = g_mdl_KRO_TareasProgramadas.retenciones_GuardarTodasLasVersiones_Dias.Value.ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ex_chk_Retencion_GuardarTodasLasVersiones.Checked = false;
|
||||||
|
ex_txt_Retencion_GuardarTodasLasVersiones_Dias.Text = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
//retenciones_MantenerUltimaVersionDia_Dias
|
||||||
|
if (g_mdl_KRO_TareasProgramadas.retenciones_MantenerUltimaVersionDia_Dias != null)
|
||||||
|
{
|
||||||
|
ex_chk_Retencion_MantenerUltimaVersionDia.Checked = true;
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionDia_Dias.Text = g_mdl_KRO_TareasProgramadas.retenciones_MantenerUltimaVersionDia_Dias.Value.ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ex_chk_Retencion_MantenerUltimaVersionDia.Checked = false;
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionDia_Dias.Text = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
//retenciones_MantenerUltimaVersionSemana_Semanas
|
||||||
|
if (g_mdl_KRO_TareasProgramadas.retenciones_MantenerUltimaVersionSemana_Semanas != null)
|
||||||
|
{
|
||||||
|
ex_chk_Retencion_MantenerUltimaVersionSemana.Checked = true;
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionSemana_Semanas.Text = g_mdl_KRO_TareasProgramadas.retenciones_MantenerUltimaVersionSemana_Semanas.Value.ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ex_chk_Retencion_MantenerUltimaVersionSemana.Checked = false;
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionSemana_Semanas.Text = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
//retenciones_MantenerUltimaVersionMes_Meses
|
||||||
|
if (g_mdl_KRO_TareasProgramadas.retenciones_MantenerUltimaVersionMes_Meses != null)
|
||||||
|
{
|
||||||
|
ex_chk_Retencion_MantenerUltimaVersionMes.Checked = true;
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionMes_Meses.Text = g_mdl_KRO_TareasProgramadas.retenciones_MantenerUltimaVersionMes_Meses.Value.ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ex_chk_Retencion_MantenerUltimaVersionMes.Checked = false;
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionMes_Meses.Text = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
//retenciones_MantenerUltimaVersionAnyo_Anyos
|
||||||
|
if (g_mdl_KRO_TareasProgramadas.retenciones_MantenerUltimaVersionAnyo_Anyos != null)
|
||||||
|
{
|
||||||
|
ex_chk_Retencion_MantenerUltimaVersionAnyo.Checked = true;
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionAnyo_Anyos.Text = g_mdl_KRO_TareasProgramadas.retenciones_MantenerUltimaVersionAnyo_Anyos.Value.ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ex_chk_Retencion_MantenerUltimaVersionAnyo.Checked = false;
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionAnyo_Anyos.Text = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
//retenciones_UltimasVersionConservadas
|
||||||
|
if (g_mdl_KRO_TareasProgramadas.retenciones_UltimasVersionConservadas != null)
|
||||||
|
{
|
||||||
|
ex_txt_Retencion_UltimasVersionConservadas.Text = g_mdl_KRO_TareasProgramadas.retenciones_UltimasVersionConservadas.Value.ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ex_txt_Retencion_UltimasVersionConservadas.Text = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_CopiaSeguridad) + "/" + nameof(Cargar_Datos));
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
g_bol_CargandoDatos = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Validacion
|
||||||
|
public INTERNO_ValorDevuelto_Modelo ValidarDatos()
|
||||||
|
{
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_INTERNO_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Servidor no puede estar vacio
|
||||||
|
if (ex_txt_Servidor.Text.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_VACIO(ex_lbl_Servidor.Text);
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Servidor;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Usuario y Contraseña
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto &&
|
||||||
|
ex_rdb_ConClave.Checked)
|
||||||
|
{
|
||||||
|
//Usuario no puede estar vacio
|
||||||
|
if (ex_txt_Usuario.Text.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_VACIO(ex_lbl_Usuario.Text);
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Usuario;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Clave no puede estar vacio
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_txt_Clave.Text.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_VACIO(ex_lbl_Clave.Text);
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Clave;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Base de datos
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto &&
|
||||||
|
g_lst_INTERNO_ComboBox_Modelo_BASEDATOS.Count==0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_PREMESACABECERA_VALIDACION_NOTIENE_SELECCIONADOS(ex_lbl_BaseDatos.Text);
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_cbo_BaseDatos;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Ruta no puede estar vacio
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_usc_Destino_Ruta.Exferia_FicheroSeleccion_NombreFichero.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_VACIO(ex_usc_Destino_Ruta.Exferia_FicheroSeleccion_Descripcion);
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Servidor;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Nombre no puede estar vacio
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_txt_Destino_Nombre.Text.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_VACIO(ex_lbl_Destino_Nombre.Text);
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Destino_Nombre;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Nombre del equipo no puede estar vacio
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_txt_Destino_NombreEquipo.Text.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_VACIO(ex_lbl_Destino_NombreEquipo.Text);
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Destino_Nombre;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Retenciones
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto)
|
||||||
|
{
|
||||||
|
//retenciones_GuardarTodasLasVersiones_Dias
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_chk_Retencion_GuardarTodasLasVersiones.Checked)
|
||||||
|
{
|
||||||
|
//No puede estar vacio
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_txt_Retencion_GuardarTodasLasVersiones_Dias.Text.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_VACIO("'" + ex_chk_Retencion_GuardarTodasLasVersiones.Text + "'");
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Retencion_GuardarTodasLasVersiones_Dias;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Debe ser mayor que 0
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && int.Parse(ex_txt_Retencion_GuardarTodasLasVersiones_Dias.Text.Trim())==0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_CERO("'" + ex_chk_Retencion_GuardarTodasLasVersiones.Text + "'");
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Retencion_GuardarTodasLasVersiones_Dias;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//retenciones_MantenerUltimaVersionDia_Dias
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_chk_Retencion_MantenerUltimaVersionDia.Checked)
|
||||||
|
{
|
||||||
|
//No puede estar vacio
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_txt_Retencion_MantenerUltimaVersionDia_Dias.Text.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_VACIO("'" + ex_chk_Retencion_MantenerUltimaVersionDia.Text + "'");
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Retencion_MantenerUltimaVersionDia_Dias;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Debe ser mayor que 0
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && int.Parse(ex_txt_Retencion_MantenerUltimaVersionDia_Dias.Text.Trim()) == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_CERO("'" + ex_chk_Retencion_MantenerUltimaVersionDia.Text + "'");
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Retencion_MantenerUltimaVersionDia_Dias;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//retenciones_MantenerUltimaVersionSemana_Semanas
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_chk_Retencion_MantenerUltimaVersionSemana.Checked)
|
||||||
|
{
|
||||||
|
//No puede estar vacio
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_txt_Retencion_MantenerUltimaVersionSemana_Semanas.Text.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_VACIO("'" + ex_chk_Retencion_MantenerUltimaVersionSemana.Text + "'");
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Retencion_MantenerUltimaVersionSemana_Semanas;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Debe ser mayor que 0
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && int.Parse(ex_txt_Retencion_MantenerUltimaVersionSemana_Semanas.Text.Trim()) == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_CERO("'" + ex_chk_Retencion_MantenerUltimaVersionSemana.Text + "'");
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Retencion_MantenerUltimaVersionSemana_Semanas;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//retenciones_MantenerUltimaVersionMes_Meses
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_chk_Retencion_MantenerUltimaVersionMes.Checked)
|
||||||
|
{
|
||||||
|
//No puede estar vacio
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_txt_Retencion_MantenerUltimaVersionMes_Meses.Text.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_VACIO("'" + ex_chk_Retencion_MantenerUltimaVersionMes.Text + "'");
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Retencion_MantenerUltimaVersionMes_Meses;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Debe ser mayor que 0
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && int.Parse(ex_txt_Retencion_MantenerUltimaVersionMes_Meses.Text.Trim()) == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_CERO("'" + ex_chk_Retencion_MantenerUltimaVersionMes.Text + "'");
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Retencion_MantenerUltimaVersionMes_Meses;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//retenciones_MantenerUltimaVersionAnyo_Anyos
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_chk_Retencion_MantenerUltimaVersionAnyo.Checked)
|
||||||
|
{
|
||||||
|
//No puede estar vacio
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_txt_Retencion_MantenerUltimaVersionAnyo_Anyos.Text.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_VACIO("'" + ex_chk_Retencion_MantenerUltimaVersionAnyo.Text + "'");
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Retencion_MantenerUltimaVersionAnyo_Anyos;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Debe ser mayor que 0
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && int.Parse(ex_txt_Retencion_MantenerUltimaVersionAnyo_Anyos.Text.Trim())== 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_CERO("'" + ex_chk_Retencion_MantenerUltimaVersionAnyo.Text + "'");
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_txt_Retencion_MantenerUltimaVersionAnyo_Anyos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_MENSAJES_GENERAL_ERROR_VALIDARDATOSPANTALLA();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_CopiaSeguridad) + "/" + nameof(ValidarDatos));
|
||||||
|
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_MENSAJES_GENERAL_ERROR_VALIDARDATOSPANTALLA();
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_INTERNO_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Grabar
|
||||||
|
public string Obtener_Parametros_Para_Grabar()
|
||||||
|
{
|
||||||
|
string str_Parametros = "";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Servidor
|
||||||
|
str_Parametros += (Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_CONEXION_SERVIDOR.Codigo + "|" + ex_txt_Servidor.Text);
|
||||||
|
|
||||||
|
//SEPARADOR
|
||||||
|
str_Parametros += "~";
|
||||||
|
|
||||||
|
//Usuario/Clave
|
||||||
|
if (ex_rdb_ConClave.Checked)
|
||||||
|
{
|
||||||
|
string str_UsuarioClave = ex_txt_Usuario.Text + "§" + ex_txt_Clave.Text;
|
||||||
|
|
||||||
|
str_Parametros += Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_CONEXION_USUARIOCLAVE.Codigo + "|" + str_UsuarioClave;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
str_Parametros += Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_CONEXION_USUARIOCLAVE.Codigo + "|";
|
||||||
|
}
|
||||||
|
|
||||||
|
//SEPARADOR
|
||||||
|
str_Parametros += "~";
|
||||||
|
|
||||||
|
//Base de datos
|
||||||
|
str_Parametros += (Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_CONEXION_BASEDATOS.Codigo + "|" + ((INTERNO_ComboBox_Modelo)ex_cbo_BaseDatos.SelectedItem).Identificador);
|
||||||
|
|
||||||
|
//SEPARADOR
|
||||||
|
str_Parametros += "~";
|
||||||
|
|
||||||
|
//Destino-Ruta
|
||||||
|
str_Parametros += (Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_DESTINO_RUTA.Codigo + "|" + ex_usc_Destino_Ruta.Exferia_FicheroSeleccion_NombreFichero);
|
||||||
|
|
||||||
|
//SEPARADOR
|
||||||
|
str_Parametros += "~";
|
||||||
|
|
||||||
|
//Destino-Fichero
|
||||||
|
str_Parametros += (Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_DESTINO_NOMBREFICHERO.Codigo + "|" + ex_txt_Destino_Nombre.Text);
|
||||||
|
|
||||||
|
//SEPARADOR
|
||||||
|
str_Parametros += "~";
|
||||||
|
|
||||||
|
//Destino-NombreEquipo
|
||||||
|
str_Parametros += (Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_DESTINO_NOMBREEQUIPO.Codigo + "|" + ex_txt_Destino_NombreEquipo.Text);
|
||||||
|
|
||||||
|
//SEPARADOR
|
||||||
|
str_Parametros += "~";
|
||||||
|
|
||||||
|
//Destino-Dominio
|
||||||
|
str_Parametros += (Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_DESTINO_DOMINIO.Codigo + "|" + ex_txt_Destino_Dominio.Text);
|
||||||
|
|
||||||
|
//SEPARADOR
|
||||||
|
str_Parametros += "~";
|
||||||
|
|
||||||
|
//Destino-usuario-Clave
|
||||||
|
string str_Destino_UsuarioClave = "";
|
||||||
|
if (ex_txt_Destino_Usuario.Text.Trim().Length>0 &&
|
||||||
|
ex_txt_Destino_Clave.Text.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Destino_UsuarioClave = ex_txt_Destino_Usuario.Text + "§" + ex_txt_Destino_Clave.Text;
|
||||||
|
}
|
||||||
|
str_Parametros += (Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_DESTINO_USUARIOCLAVE.Codigo + "|" + str_Destino_UsuarioClave);
|
||||||
|
|
||||||
|
//SEPARADOR
|
||||||
|
str_Parametros += "~";
|
||||||
|
|
||||||
|
//Destino-Comprimir
|
||||||
|
str_Parametros += (Variables.G_MDL_KRONOS_TIPOTAREA_COPIASEGURIDAD_PARAMETROS_DESTINO_COMPRIMIR.Codigo + "|" + (ex_chk_Destino_Comprimido.Checked ? "1" : "0"));
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_CopiaSeguridad) + "/" + nameof(Obtener_Parametros_Para_Grabar));
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Parametros;
|
||||||
|
}
|
||||||
|
|
||||||
|
public INTERNO_Retenciones_Modelo Obtener_Retenciones_Para_Grabar()
|
||||||
|
{
|
||||||
|
INTERNO_Retenciones_Modelo mdl_INTERNO_Retenciones_Modelo = new INTERNO_Retenciones_Modelo();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//retenciones_GuardarTodasLasVersiones_Dias
|
||||||
|
if (ex_chk_Retencion_GuardarTodasLasVersiones.Checked)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_Retenciones_Modelo.retenciones_GuardarTodasLasVersiones_Dias = int.Parse(ex_txt_Retencion_GuardarTodasLasVersiones_Dias.Text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mdl_INTERNO_Retenciones_Modelo.retenciones_GuardarTodasLasVersiones_Dias = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
//retenciones_MantenerUltimaVersionDia_Dias
|
||||||
|
if (ex_chk_Retencion_MantenerUltimaVersionDia.Checked)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_Retenciones_Modelo.retenciones_MantenerUltimaVersionDia_Dias = int.Parse(ex_txt_Retencion_MantenerUltimaVersionDia_Dias.Text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mdl_INTERNO_Retenciones_Modelo.retenciones_MantenerUltimaVersionDia_Dias = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
//retenciones_MantenerUltimaVersionSemana_Semanas
|
||||||
|
if (ex_chk_Retencion_MantenerUltimaVersionSemana.Checked)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_Retenciones_Modelo.retenciones_MantenerUltimaVersionSemana_Semanas = int.Parse(ex_txt_Retencion_MantenerUltimaVersionSemana_Semanas.Text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mdl_INTERNO_Retenciones_Modelo.retenciones_MantenerUltimaVersionSemana_Semanas = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
//retenciones_MantenerUltimaVersionMes_Meses
|
||||||
|
if (ex_chk_Retencion_MantenerUltimaVersionMes.Checked)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_Retenciones_Modelo.retenciones_MantenerUltimaVersionMes_Meses = int.Parse(ex_txt_Retencion_MantenerUltimaVersionMes_Meses.Text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mdl_INTERNO_Retenciones_Modelo.retenciones_MantenerUltimaVersionMes_Meses = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
//retenciones_MantenerUltimaVersionAnyo_Anyos
|
||||||
|
if (ex_chk_Retencion_MantenerUltimaVersionAnyo.Checked)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_Retenciones_Modelo.retenciones_MantenerUltimaVersionAnyo_Anyos = int.Parse(ex_txt_Retencion_MantenerUltimaVersionAnyo_Anyos.Text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mdl_INTERNO_Retenciones_Modelo.retenciones_MantenerUltimaVersionAnyo_Anyos = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
//retenciones_UltimasVersionConservadas
|
||||||
|
if (ex_txt_Retencion_UltimasVersionConservadas.Text.Trim().Length>0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_Retenciones_Modelo.retenciones_UltimasVersionConservadas = int.Parse(ex_txt_Retencion_UltimasVersionConservadas.Text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mdl_INTERNO_Retenciones_Modelo.retenciones_UltimasVersionConservadas = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_CopiaSeguridad) + "/" + nameof(Obtener_Retenciones_Para_Grabar));
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_INTERNO_Retenciones_Modelo;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Controles
|
||||||
|
|
||||||
|
private void ex_rdb_SinClave_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (g_bol_CargandoDatos == false)
|
||||||
|
{
|
||||||
|
if (ex_rdb_SinClave.Checked)
|
||||||
|
{
|
||||||
|
ex_txt_Usuario.Text = "";
|
||||||
|
ex_txt_Usuario.Exferia_TextBox_NoBloquear = false;
|
||||||
|
|
||||||
|
ex_txt_Clave.Text = "";
|
||||||
|
ex_txt_Clave.Exferia_TextBox_NoBloquear = false;
|
||||||
|
|
||||||
|
Rellenar_BasesDatos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void ex_rdb_ConClave_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (g_bol_CargandoDatos == false)
|
||||||
|
{
|
||||||
|
if (ex_rdb_ConClave.Checked)
|
||||||
|
{
|
||||||
|
ex_txt_Usuario.Text = "";
|
||||||
|
ex_txt_Usuario.Exferia_TextBox_NoBloquear = true;
|
||||||
|
|
||||||
|
ex_txt_Clave.Text = "";
|
||||||
|
ex_txt_Clave.Exferia_TextBox_NoBloquear = true;
|
||||||
|
|
||||||
|
Vaciar_BasesDatos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Servidor
|
||||||
|
private string g_str_Servidor_GotFocus = "";
|
||||||
|
private void ex_txt_Servidor_Exferia_TextBox_Evento_GotFocus(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
g_str_Servidor_GotFocus = ex_txt_Servidor.Text;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ex_txt_Servidor_Exferia_TextBox_Evento_LostFocus(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (g_bol_CargandoDatos == false)
|
||||||
|
{
|
||||||
|
string str_Servidor_LostFocus = ex_txt_Servidor.Text;
|
||||||
|
if (g_str_Servidor_GotFocus != str_Servidor_LostFocus &&
|
||||||
|
(
|
||||||
|
ex_rdb_ConClave.Checked ||
|
||||||
|
ex_rdb_SinClave.Checked
|
||||||
|
))
|
||||||
|
{
|
||||||
|
Rellenar_BasesDatos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Usuario
|
||||||
|
private string g_str_Usuario_GotFocus = "";
|
||||||
|
private void ex_txt_Usuario_Exferia_TextBox_Evento_GotFocus(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
g_str_Usuario_GotFocus = ex_txt_Usuario.Text;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ex_txt_Usuario_Exferia_TextBox_Evento_LostFocus(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (g_bol_CargandoDatos == false)
|
||||||
|
{
|
||||||
|
string str_Usuario_LostFocus = ex_txt_Usuario.Text;
|
||||||
|
|
||||||
|
if (g_str_Usuario_GotFocus != str_Usuario_LostFocus &&
|
||||||
|
ex_txt_Clave.Text.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
Rellenar_BasesDatos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Clave
|
||||||
|
private string g_str_Clave_GotFocus = "";
|
||||||
|
private void ex_txt_Clave_Exferia_TextBox_Evento_GotFocus(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
g_str_Clave_GotFocus = ex_txt_Clave.Text;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ex_txt_Clave_Exferia_TextBox_Evento_LostFocus(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (g_bol_CargandoDatos == false)
|
||||||
|
{
|
||||||
|
string str_Clave_LostFocus = ex_txt_Clave.Text;
|
||||||
|
|
||||||
|
if (g_str_Clave_GotFocus != str_Clave_LostFocus &&
|
||||||
|
ex_txt_Usuario.Text.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
Rellenar_BasesDatos();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Base de datos
|
||||||
|
private void ex_btn_Actualizar_BD_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Rellenar_BasesDatos();
|
||||||
|
}
|
||||||
|
private void Vaciar_BasesDatos()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Vaciar el Combo
|
||||||
|
g_lst_INTERNO_ComboBox_Modelo_BASEDATOS.Clear();
|
||||||
|
ex_cbo_BaseDatos.DataSource = null;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Mensajes.MostrarMensaje(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void Rellenar_BasesDatos()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Vaciar el Combo
|
||||||
|
g_lst_INTERNO_ComboBox_Modelo_BASEDATOS.Clear();
|
||||||
|
ex_cbo_BaseDatos.DataSource = null;
|
||||||
|
|
||||||
|
//Conexion
|
||||||
|
if (ex_txt_Servidor.Text.Trim().Length>0)
|
||||||
|
{
|
||||||
|
string str_Conexion = "Data Source=" + ex_txt_Servidor.Text + "; ";
|
||||||
|
string str_UsuarioClave = "Integrated Security=True;";
|
||||||
|
if (ex_rdb_ConClave.Checked)
|
||||||
|
{
|
||||||
|
str_UsuarioClave = "User Id =" + ex_txt_Usuario.Text + "; Password =" + ex_txt_Clave.Text + ";";
|
||||||
|
}
|
||||||
|
str_Conexion += str_UsuarioClave;
|
||||||
|
|
||||||
|
//Rellenar Listado
|
||||||
|
using (SqlConnection con = new SqlConnection(str_Conexion))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
using (SqlCommand obj_SqlCommand = new SqlCommand("SELECT name from sys.databases", con))
|
||||||
|
{
|
||||||
|
using (SqlDataReader dr = obj_SqlCommand.ExecuteReader())
|
||||||
|
{
|
||||||
|
while (dr.Read())
|
||||||
|
{
|
||||||
|
g_lst_INTERNO_ComboBox_Modelo_BASEDATOS.Add(new INTERNO_ComboBox_Modelo(dr[0].ToString(), dr[0].ToString(), null));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//rellenar el Modelo
|
||||||
|
ex_cbo_BaseDatos.DataSource = g_lst_INTERNO_ComboBox_Modelo_BASEDATOS;
|
||||||
|
if (g_lst_INTERNO_ComboBox_Modelo_BASEDATOS.Count>0)
|
||||||
|
{
|
||||||
|
ex_cbo_BaseDatos.SelectedIndex = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Mensajes.MostrarMensaje(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Retenciones
|
||||||
|
private void ex_chk_Retencion_GuardarTodasLasVersiones_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (ex_chk_Retencion_GuardarTodasLasVersiones.Checked)
|
||||||
|
{
|
||||||
|
ex_txt_Retencion_GuardarTodasLasVersiones_Dias.Enabled = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ex_txt_Retencion_GuardarTodasLasVersiones_Dias.Enabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void ex_chk_Retencion_MantenerUltimaVersionDia_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (ex_chk_Retencion_MantenerUltimaVersionDia.Checked)
|
||||||
|
{
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionDia_Dias.Enabled = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionDia_Dias.Enabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ex_chk_Retencion_MantenerUltimaVersionSemana_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (ex_chk_Retencion_MantenerUltimaVersionSemana.Checked)
|
||||||
|
{
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionSemana_Semanas.Enabled = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionSemana_Semanas.Enabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ex_chk_Retencion_MantenerUltimaVersionMes_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (ex_chk_Retencion_MantenerUltimaVersionMes.Checked)
|
||||||
|
{
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionMes_Meses.Enabled = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionMes_Meses.Enabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ex_chk_Retencion_MantenerUltimaVersionAnyo_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (ex_chk_Retencion_MantenerUltimaVersionAnyo.Checked)
|
||||||
|
{
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionAnyo_Anyos.Enabled = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ex_txt_Retencion_MantenerUltimaVersionAnyo_Anyos.Enabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Comprobar Conexion con carperta Compartida
|
||||||
|
private void ex_btn_P_TareaProgramada_ComprobarAcceso_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Ruta no puede estar vacio
|
||||||
|
if (ex_usc_Destino_Ruta.Exferia_FicheroSeleccion_NombreFichero.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
Mensajes.MostrarMensaje(Mensajes.G_STR_GENERAL_VALIDACIONES_VACIO(ex_usc_Destino_Ruta.Exferia_FicheroSeleccion_Descripcion));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Nombre de Equipo no puede estar vacio
|
||||||
|
if (ex_txt_Destino_NombreEquipo.Text.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
Mensajes.MostrarMensaje(Mensajes.G_STR_GENERAL_VALIDACIONES_VACIO(ex_lbl_Destino_NombreEquipo.Text));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Comprobar si puedo acceder a la carpeta
|
||||||
|
using (AccesoCarpetasCompartidas.Access(ex_txt_Destino_NombreEquipo.Text, ex_txt_Destino_Dominio.Text, ex_txt_Destino_Usuario.Text, ex_txt_Destino_Clave.Text))
|
||||||
|
{
|
||||||
|
Mensajes.MostrarMensaje(Mensajes.G_STR_KRONOS_MENSAJES_TAREAPROGRAMADA_DESTINO_CONEXIONREALIZADACONEXITO());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Win32Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
|
|
@ -0,0 +1,165 @@
|
||||||
|
namespace Exferia_Kronos._4_Vistas.ControlesPersonalizados_DentroPaneles
|
||||||
|
{
|
||||||
|
partial class CTU_P_TareaProgramada_Notificaciones
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Variable del diseñador necesaria.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Limpiar los recursos que se estén usando.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true si los recursos administrados se deben desechar; false en caso contrario.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Código generado por el Diseñador de componentes
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Método necesario para admitir el Diseñador. No se puede modificar
|
||||||
|
/// el contenido de este método con el editor de código.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail = new Exferia_Controles.Exferia_F3();
|
||||||
|
this.ex_chk_NotificarSiError = new Exferia_Controles.Exferia_CheckBox();
|
||||||
|
this.ex_pnl_Destinos = new Exferia_Controles.Exferia_Panel_Degradado();
|
||||||
|
this.ex_btn_Delete = new Exferia_Controles.Exferia_Button();
|
||||||
|
this.ex_btn_Add = new Exferia_Controles.Exferia_Button();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// ex_usc_F3_ConfiguracionEmail
|
||||||
|
//
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_Ancho_Codigo = Exferia_Aplicacion.General.Enumerados.G_ENUM_F3_CODIGO.Normal;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_Ancho_Titulo = Exferia_Aplicacion.General.Enumerados.G_ENUM_F3_TITULO.Normal;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_Bloqueable = true;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_Bloquear_F3_Descripcion = false;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_Codigo = "";
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_DatosAuxiliares_1 = null;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_DatosAuxiliares_2 = null;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_DatosAuxiliares_3 = null;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_Descripcion = "";
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_FechaBorrado = null;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_Id = ((long)(-1));
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_IdEjercicio_Baja = null;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_Objeto_ParaEnviarAMantenimiento = null;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_PRINCIPAL_Obligatorio = true;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_PRINCIPAL_Opcion_BuscarDatos = "";
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_PRINCIPAL_PermitirAdd = true;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_RELACIONADOS_Objetos_Hijos = null;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_RELACIONAL_TipoRelacion = Exferia_Controles.Exferia_F3.Exferia_F3_TipoRelacion.Ninguna;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Exferia_F3_Titulo = "Configuracion Email";
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Location = new System.Drawing.Point(-1, 4);
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Name = "ex_usc_F3_ConfiguracionEmail";
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Size = new System.Drawing.Size(611, 22);
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.TabIndex = 15;
|
||||||
|
this.ex_usc_F3_ConfiguracionEmail.Tag = "";
|
||||||
|
//
|
||||||
|
// ex_chk_NotificarSiError
|
||||||
|
//
|
||||||
|
this.ex_chk_NotificarSiError.AutoSize = true;
|
||||||
|
this.ex_chk_NotificarSiError.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.ex_chk_NotificarSiError.Exferia_CheckBox_Bloqueable = true;
|
||||||
|
this.ex_chk_NotificarSiError.Exferia_CheckBox_Obligatorio = false;
|
||||||
|
this.ex_chk_NotificarSiError.Exferia_CheckBox_ToolTip = "";
|
||||||
|
this.ex_chk_NotificarSiError.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
|
this.ex_chk_NotificarSiError.Location = new System.Drawing.Point(106, 28);
|
||||||
|
this.ex_chk_NotificarSiError.Name = "ex_chk_NotificarSiError";
|
||||||
|
this.ex_chk_NotificarSiError.Size = new System.Drawing.Size(112, 17);
|
||||||
|
this.ex_chk_NotificarSiError.TabIndex = 18;
|
||||||
|
this.ex_chk_NotificarSiError.Text = "Solo si hay errores";
|
||||||
|
this.ex_chk_NotificarSiError.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// ex_pnl_Destinos
|
||||||
|
//
|
||||||
|
this.ex_pnl_Destinos.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.ex_pnl_Destinos.AutoScroll = true;
|
||||||
|
this.ex_pnl_Destinos.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
this.ex_pnl_Destinos.Exferia_Panel_Degradado_Color_Borde = System.Drawing.Color.White;
|
||||||
|
this.ex_pnl_Destinos.Exferia_Panel_Degradado_Color_Desde = System.Drawing.Color.White;
|
||||||
|
this.ex_pnl_Destinos.Exferia_Panel_Degradado_Color_Hasta = System.Drawing.Color.White;
|
||||||
|
this.ex_pnl_Destinos.Exferia_Panel_Degradado_TipoDegradado = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
|
||||||
|
this.ex_pnl_Destinos.Location = new System.Drawing.Point(4, 74);
|
||||||
|
this.ex_pnl_Destinos.Name = "ex_pnl_Destinos";
|
||||||
|
this.ex_pnl_Destinos.Size = new System.Drawing.Size(622, 159);
|
||||||
|
this.ex_pnl_Destinos.TabIndex = 19;
|
||||||
|
//
|
||||||
|
// ex_btn_Delete
|
||||||
|
//
|
||||||
|
this.ex_btn_Delete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.ex_btn_Delete.BackColor = System.Drawing.Color.Maroon;
|
||||||
|
this.ex_btn_Delete.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
|
this.ex_btn_Delete.Exferia_Button_Bloqueable = true;
|
||||||
|
this.ex_btn_Delete.Exferia_Button_Imagen = Exferia_Aplicacion.General.Imagenes.G_ENUM_IMAGENES.G_IMG_BORRAR;
|
||||||
|
this.ex_btn_Delete.Exferia_Button_Permitir_CambioFuenteAutomatico = true;
|
||||||
|
this.ex_btn_Delete.Exferia_Button_ReadOnly = false;
|
||||||
|
this.ex_btn_Delete.Exferia_Button_TabStop = false;
|
||||||
|
this.ex_btn_Delete.Exferia_Button_ToolTip = "";
|
||||||
|
this.ex_btn_Delete.FlatAppearance.BorderSize = 0;
|
||||||
|
this.ex_btn_Delete.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.ex_btn_Delete.Location = new System.Drawing.Point(615, 3);
|
||||||
|
this.ex_btn_Delete.Name = "ex_btn_Delete";
|
||||||
|
this.ex_btn_Delete.Size = new System.Drawing.Size(21, 21);
|
||||||
|
this.ex_btn_Delete.TabIndex = 20;
|
||||||
|
this.ex_btn_Delete.TabStop = false;
|
||||||
|
this.ex_btn_Delete.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||||
|
this.ex_btn_Delete.UseVisualStyleBackColor = false;
|
||||||
|
this.ex_btn_Delete.Click += new System.EventHandler(this.btn_Delete_Click);
|
||||||
|
//
|
||||||
|
// ex_btn_Add
|
||||||
|
//
|
||||||
|
this.ex_btn_Add.BackColor = System.Drawing.Color.Maroon;
|
||||||
|
this.ex_btn_Add.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
|
this.ex_btn_Add.Exferia_Button_Bloqueable = true;
|
||||||
|
this.ex_btn_Add.Exferia_Button_Imagen = Exferia_Aplicacion.General.Imagenes.G_ENUM_IMAGENES.G_IMG_ADD;
|
||||||
|
this.ex_btn_Add.Exferia_Button_Permitir_CambioFuenteAutomatico = true;
|
||||||
|
this.ex_btn_Add.Exferia_Button_ReadOnly = false;
|
||||||
|
this.ex_btn_Add.Exferia_Button_TabStop = false;
|
||||||
|
this.ex_btn_Add.Exferia_Button_ToolTip = "Añadir ";
|
||||||
|
this.ex_btn_Add.FlatAppearance.BorderSize = 0;
|
||||||
|
this.ex_btn_Add.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.ex_btn_Add.Location = new System.Drawing.Point(5, 47);
|
||||||
|
this.ex_btn_Add.Name = "ex_btn_Add";
|
||||||
|
this.ex_btn_Add.Size = new System.Drawing.Size(21, 21);
|
||||||
|
this.ex_btn_Add.TabIndex = 21;
|
||||||
|
this.ex_btn_Add.TabStop = false;
|
||||||
|
this.ex_btn_Add.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||||
|
this.ex_btn_Add.UseVisualStyleBackColor = false;
|
||||||
|
this.ex_btn_Add.Click += new System.EventHandler(this.ex_btn_Add_Click);
|
||||||
|
//
|
||||||
|
// CTU_P_TareaProgramada_Notificaciones
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.ex_btn_Add);
|
||||||
|
this.Controls.Add(this.ex_btn_Delete);
|
||||||
|
this.Controls.Add(this.ex_pnl_Destinos);
|
||||||
|
this.Controls.Add(this.ex_chk_NotificarSiError);
|
||||||
|
this.Controls.Add(this.ex_usc_F3_ConfiguracionEmail);
|
||||||
|
this.Name = "CTU_P_TareaProgramada_Notificaciones";
|
||||||
|
this.Size = new System.Drawing.Size(639, 247);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
private Exferia_Controles.Exferia_F3 ex_usc_F3_ConfiguracionEmail;
|
||||||
|
private Exferia_Controles.Exferia_CheckBox ex_chk_NotificarSiError;
|
||||||
|
private Exferia_Controles.Exferia_Panel_Degradado ex_pnl_Destinos;
|
||||||
|
private Exferia_Controles.Exferia_Button ex_btn_Delete;
|
||||||
|
private Exferia_Controles.Exferia_Button ex_btn_Add;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,318 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_Formularios;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using Exferia_Controles;
|
||||||
|
using Exferia_Aplicacion.Visualizacion;
|
||||||
|
using Exferia_Kronos.General;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._4_Vistas.ControlesPersonalizados_DentroPaneles
|
||||||
|
{
|
||||||
|
public partial class CTU_P_TareaProgramada_Notificaciones : UserControl
|
||||||
|
{
|
||||||
|
#region Propiedasdes Privadas
|
||||||
|
private P_Base g_frm_DeDondeHereda = null;
|
||||||
|
private KRO_Notificaciones g_mdl_KRO_Notificaciones = null;
|
||||||
|
private int g_intNumerObjeto;
|
||||||
|
|
||||||
|
//Variables para la Creacion de los destinos
|
||||||
|
private int g_int_PosicionY = 5;
|
||||||
|
private int g_int_numeriLineas = 0;
|
||||||
|
private List<int> g_Array_ListadoDestinos = new List<int>();
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Eventos Publicos
|
||||||
|
public event EventHandler<INTERNO_EventArgs> CTU_P_TareaProgramada_Notificacion_Boton_Delete_Click;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Contructor
|
||||||
|
public CTU_P_TareaProgramada_Notificaciones(P_Base _frm_DeDondeHereda,
|
||||||
|
int _int_NumerObjeto,
|
||||||
|
KRO_Notificaciones _mdl_KRO_Notificaciones)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Repintar.Empezar(this);
|
||||||
|
|
||||||
|
g_frm_DeDondeHereda = _frm_DeDondeHereda;
|
||||||
|
g_mdl_KRO_Notificaciones = _mdl_KRO_Notificaciones;
|
||||||
|
g_intNumerObjeto = _int_NumerObjeto;
|
||||||
|
|
||||||
|
//Rellenar F3
|
||||||
|
ex_usc_F3_ConfiguracionEmail.Exferia_F3_PantallaContenedora = g_frm_DeDondeHereda;
|
||||||
|
ex_usc_F3_ConfiguracionEmail.Exferia_F3_PRINCIPAL_Opcion_BuscarDatos = Variables.G_STR_OPCION_GEN_CONFIGURACIONEMAIL;
|
||||||
|
|
||||||
|
Cargar_Datos();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_Notificaciones) + "/" + nameof(CTU_P_TareaProgramada_Notificaciones));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Cargar Datos
|
||||||
|
private void Cargar_Datos()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//CargarDatos si los tuviera
|
||||||
|
if (g_mdl_KRO_Notificaciones != null)
|
||||||
|
{
|
||||||
|
//notificarSiError
|
||||||
|
ex_chk_NotificarSiError.Checked = g_mdl_KRO_Notificaciones.notificarSiError != null ? g_mdl_KRO_Notificaciones.notificarSiError.Value : false;
|
||||||
|
|
||||||
|
//ConfiguracionesEmails
|
||||||
|
if (g_mdl_KRO_Notificaciones.GEN_ConfiguracionesEmails != null)
|
||||||
|
{
|
||||||
|
//Si hay datos no puede estar vacio
|
||||||
|
ex_usc_F3_ConfiguracionEmail.Exferia_F3_Id = g_mdl_KRO_Notificaciones.GEN_ConfiguracionesEmails.id;
|
||||||
|
ex_usc_F3_ConfiguracionEmail.Exferia_F3_Codigo = g_mdl_KRO_Notificaciones.GEN_ConfiguracionesEmails.codigo;
|
||||||
|
ex_usc_F3_ConfiguracionEmail.Exferia_F3_Descripcion = g_mdl_KRO_Notificaciones.GEN_ConfiguracionesEmails.email;
|
||||||
|
ex_usc_F3_ConfiguracionEmail.Exferia_F3_FechaBorrado = g_mdl_KRO_Notificaciones.GEN_ConfiguracionesEmails.fechaBorrado;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ex_usc_F3_ConfiguracionEmail.Exferia_F3_Id = -1;
|
||||||
|
ex_usc_F3_ConfiguracionEmail.Exferia_F3_Codigo = string.Empty;
|
||||||
|
ex_usc_F3_ConfiguracionEmail.Exferia_F3_Descripcion = string.Empty;
|
||||||
|
ex_usc_F3_ConfiguracionEmail.Exferia_F3_FechaBorrado = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Emails
|
||||||
|
if (g_mdl_KRO_Notificaciones.KRO_Notificaciones_Destinos != null)
|
||||||
|
{
|
||||||
|
foreach (KRO_Notificaciones_Destinos mdl_KRO_Notificaciones_Destinos in g_mdl_KRO_Notificaciones.KRO_Notificaciones_Destinos)
|
||||||
|
{
|
||||||
|
if (g_mdl_KRO_Notificaciones.tipo == Variables.G_INT_KRONOS_NOTIFICACIONES_TIPO_EMAIL)
|
||||||
|
{
|
||||||
|
//Crear Componentes De Emails
|
||||||
|
Crear_CTU_P_TareaProgramada_Notificaciones_Destinos_Email(mdl_KRO_Notificaciones_Destinos);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_Notificaciones) + "/" + nameof(Cargar_Datos));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Añadir registro de fichero o de Email
|
||||||
|
private void ex_btn_Add_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Crear_CTU_P_TareaProgramada_Notificaciones_Destinos_Email(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Destinos Email
|
||||||
|
private void Crear_CTU_P_TareaProgramada_Notificaciones_Destinos_Email(KRO_Notificaciones_Destinos _mdl_KRO_Notificaciones_Destinos)
|
||||||
|
{
|
||||||
|
//Añadir control crearo en subproceso en el hilo principal ................................
|
||||||
|
if (g_frm_DeDondeHereda.InvokeRequired)//Line #1
|
||||||
|
{
|
||||||
|
g_frm_DeDondeHereda.Invoke((MethodInvoker)delegate
|
||||||
|
{
|
||||||
|
Crear_CTU_P_TareaProgramada_Notificaciones_Destinos_Email(_mdl_KRO_Notificaciones_Destinos);
|
||||||
|
});
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//..........................................................................................
|
||||||
|
|
||||||
|
g_int_numeriLineas++;
|
||||||
|
|
||||||
|
//Calcular tamaño del panel ####################################
|
||||||
|
int int_AnchoPanelPrincipal = (624 * ex_pnl_Destinos.Width) / 634;
|
||||||
|
if(ex_pnl_Destinos.Controls.Count > 0 && g_Array_ListadoDestinos.Count > 0)
|
||||||
|
{
|
||||||
|
int_AnchoPanelPrincipal = ex_pnl_Destinos.Controls.Find("controlusuarios_CTU_P_TareaProgramada_Notificaciones_Destinos_Email" + g_Array_ListadoDestinos[0], false).FirstOrDefault().Width;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Objeto Personalizado
|
||||||
|
int int_PosicionRelativa = g_int_PosicionY + (ex_pnl_Destinos.DisplayRectangle.Y + 5);
|
||||||
|
CTU_P_TareaProgramada_Notificaciones_Destinos_Email controlusuarios_CTU_P_TareaProgramada_Notificaciones_Destinos_Email = new CTU_P_TareaProgramada_Notificaciones_Destinos_Email(g_frm_DeDondeHereda,g_int_numeriLineas,_mdl_KRO_Notificaciones_Destinos);
|
||||||
|
controlusuarios_CTU_P_TareaProgramada_Notificaciones_Destinos_Email.Name = "controlusuarios_CTU_P_TareaProgramada_Notificaciones_Destinos_Email" + g_int_numeriLineas;
|
||||||
|
controlusuarios_CTU_P_TareaProgramada_Notificaciones_Destinos_Email.Size = new Size(int_AnchoPanelPrincipal, 21);
|
||||||
|
controlusuarios_CTU_P_TareaProgramada_Notificaciones_Destinos_Email.Location = new Point(5, int_PosicionRelativa);
|
||||||
|
controlusuarios_CTU_P_TareaProgramada_Notificaciones_Destinos_Email.Anchor = (AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Left);
|
||||||
|
//Eventos
|
||||||
|
controlusuarios_CTU_P_TareaProgramada_Notificaciones_Destinos_Email.CTU_P_TareaProgramada_Notificaciones_Destinos_Email_Boton_Delete_Click += new EventHandler<INTERNO_EventArgs>(CTU_P_TareaProgramada_Notificaciones_Boton_Destinos_Email_Delete_Click);
|
||||||
|
|
||||||
|
//Añadir al Panel
|
||||||
|
ex_pnl_Destinos.Controls.Add(controlusuarios_CTU_P_TareaProgramada_Notificaciones_Destinos_Email);
|
||||||
|
//Añadir el alto
|
||||||
|
g_int_PosicionY += (21 + 5);
|
||||||
|
//Añadir al listado de respuesta
|
||||||
|
g_Array_ListadoDestinos.Add(g_int_numeriLineas);
|
||||||
|
}
|
||||||
|
private void CTU_P_TareaProgramada_Notificaciones_Boton_Destinos_Email_Delete_Click(object sender, INTERNO_EventArgs e)
|
||||||
|
{
|
||||||
|
g_frm_DeDondeHereda.P_Base_SeModificoDatosPantalla = true;
|
||||||
|
|
||||||
|
//Borrar la Linea de la Respuesta
|
||||||
|
ex_pnl_Destinos.Controls.Find("controlusuarios_CTU_P_TareaProgramada_Notificaciones_Destinos_Email" + e.NumeroObjeto, false).FirstOrDefault().Dispose();
|
||||||
|
|
||||||
|
g_Array_ListadoDestinos.Remove(e.NumeroObjeto);
|
||||||
|
g_int_PosicionY -= (21 + 5);
|
||||||
|
|
||||||
|
CTU_P_TareaProgramada_Notificaciones_Destinos_Email pnl_aCambiar;
|
||||||
|
foreach(int int_ValoresModificarposicion in g_Array_ListadoDestinos.Where(m => m > e.NumeroObjeto).ToList())
|
||||||
|
{
|
||||||
|
pnl_aCambiar = (CTU_P_TareaProgramada_Notificaciones_Destinos_Email)ex_pnl_Destinos.Controls.Find("controlusuarios_CTU_P_TareaProgramada_Notificaciones_Destinos_Email" + int_ValoresModificarposicion, false).FirstOrDefault();
|
||||||
|
pnl_aCambiar.Location = new Point(pnl_aCambiar.Location.X, pnl_aCambiar.Location.Y - (21+5));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Validacion
|
||||||
|
public INTERNO_ValorDevuelto_Modelo ValidarDatos()
|
||||||
|
{
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_INTERNO_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
//Configuracion no puede estar Vacio (Obligatorio)
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && ex_usc_F3_ConfiguracionEmail.Exferia_F3_Codigo.Trim().Length == 0 &&
|
||||||
|
ex_usc_F3_ConfiguracionEmail.Exferia_F3_Descripcion.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_VACIO(ex_usc_F3_ConfiguracionEmail.Exferia_F3_Titulo);
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_usc_F3_ConfiguracionEmail.Exferia_F3_PRINCIPAL_TextBox_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Si hay Configuracion validar que es Correcta
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto && (ex_usc_F3_ConfiguracionEmail.Exferia_F3_Codigo.Trim().Length != 0 ||
|
||||||
|
ex_usc_F3_ConfiguracionEmail.Exferia_F3_Descripcion.Trim().Length != 0) && ex_usc_F3_ConfiguracionEmail.Exferia_F3_Id == -1)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_F3_INCORRECTO(ex_usc_F3_ConfiguracionEmail.Exferia_F3_Titulo);
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_usc_F3_ConfiguracionEmail.Exferia_F3_PRINCIPAL_TextBox_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Validamos los emails
|
||||||
|
if (mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto)
|
||||||
|
{
|
||||||
|
if (g_Array_ListadoDestinos.Count>0)
|
||||||
|
{
|
||||||
|
CTU_P_TareaProgramada_Notificaciones_Destinos_Email obj_CTU_P_TareaProgramada_Notificaciones_Destinos_Email = null;
|
||||||
|
foreach (int int_ValorDestinos in g_Array_ListadoDestinos)
|
||||||
|
{
|
||||||
|
obj_CTU_P_TareaProgramada_Notificaciones_Destinos_Email = (CTU_P_TareaProgramada_Notificaciones_Destinos_Email)ex_pnl_Destinos.Controls.Find("controlusuarios_CTU_P_TareaProgramada_Notificaciones_Destinos_Email" + int_ValorDestinos, true).FirstOrDefault();
|
||||||
|
|
||||||
|
if (obj_CTU_P_TareaProgramada_Notificaciones_Destinos_Email != null)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo = obj_CTU_P_TareaProgramada_Notificaciones_Destinos_Email.ValidarDatos();
|
||||||
|
if (!mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Debe tener por lo menos 1
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_MENSAJES_VALIDACION_NADASELECCIONADO("email");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_MENSAJES_GENERAL_ERROR_VALIDARDATOSPANTALLA();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_Notificaciones) + "/" + nameof(ValidarDatos));
|
||||||
|
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_MENSAJES_GENERAL_ERROR_VALIDARDATOSPANTALLA();
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_INTERNO_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Grabar
|
||||||
|
public KRO_Notificaciones Obtener_Para_Grabar(long _lng_idTareaProgramada)
|
||||||
|
{
|
||||||
|
KRO_Notificaciones mdl_KRO_Notificaciones = new KRO_Notificaciones();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//id
|
||||||
|
mdl_KRO_Notificaciones.id = g_mdl_KRO_Notificaciones != null ? g_mdl_KRO_Notificaciones.id : -1;
|
||||||
|
|
||||||
|
//idTareaProgramada
|
||||||
|
mdl_KRO_Notificaciones.idTareaProgramada = _lng_idTareaProgramada;
|
||||||
|
|
||||||
|
//tipo
|
||||||
|
mdl_KRO_Notificaciones.tipo = Variables.G_INT_KRONOS_NOTIFICACIONES_TIPO_EMAIL;
|
||||||
|
|
||||||
|
//idConfiguracionEmail
|
||||||
|
mdl_KRO_Notificaciones.idConfiguracionEmail = ex_usc_F3_ConfiguracionEmail.Exferia_F3_Id;
|
||||||
|
|
||||||
|
//notificarSiError
|
||||||
|
mdl_KRO_Notificaciones.notificarSiError = ex_chk_NotificarSiError.Checked;
|
||||||
|
|
||||||
|
//Instanciar
|
||||||
|
mdl_KRO_Notificaciones.KRO_Notificaciones_Destinos = new List<KRO_Notificaciones_Destinos>();
|
||||||
|
|
||||||
|
CTU_P_TareaProgramada_Notificaciones_Destinos_Email obj_CTU_P_TareaProgramada_Notificaciones_Destinos_Email = null;
|
||||||
|
foreach (int int_ValorDestinos in g_Array_ListadoDestinos)
|
||||||
|
{
|
||||||
|
obj_CTU_P_TareaProgramada_Notificaciones_Destinos_Email = (CTU_P_TareaProgramada_Notificaciones_Destinos_Email)ex_pnl_Destinos.Controls.Find("controlusuarios_CTU_P_TareaProgramada_Notificaciones_Destinos_Email" + int_ValorDestinos, true).FirstOrDefault();
|
||||||
|
|
||||||
|
if (obj_CTU_P_TareaProgramada_Notificaciones_Destinos_Email != null)
|
||||||
|
{
|
||||||
|
KRO_Notificaciones_Destinos mdl_KRO_Notificaciones_Destinos = obj_CTU_P_TareaProgramada_Notificaciones_Destinos_Email.Obtener_Para_Grabar();
|
||||||
|
if (mdl_KRO_Notificaciones_Destinos!=null)
|
||||||
|
{
|
||||||
|
mdl_KRO_Notificaciones.KRO_Notificaciones_Destinos.Add(mdl_KRO_Notificaciones_Destinos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_Notificaciones) + "/" + nameof(Obtener_Para_Grabar));
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_KRO_Notificaciones;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Borrar
|
||||||
|
private void btn_Delete_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//Para que salte el evento en el otro lado
|
||||||
|
CTU_P_TareaProgramada_Notificacion_Boton_Delete_Click?.Invoke(sender, new INTERNO_EventArgs(g_intNumerObjeto));
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
namespace Exferia_Kronos._4_Vistas.ControlesPersonalizados_DentroPaneles
|
||||||
|
{
|
||||||
|
partial class CTU_P_TareaProgramada_Notificaciones_Destinos_Email
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Variable del diseñador necesaria.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Limpiar los recursos que se estén usando.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true si los recursos administrados se deben desechar; false en caso contrario.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Código generado por el Diseñador de componentes
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Método necesario para admitir el Diseñador. No se puede modificar
|
||||||
|
/// el contenido de este método con el editor de código.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.ex_usc_Destinos_Email = new Exferia_Controles.Exferia_TextBox_Email();
|
||||||
|
this.ex_chk_Destinos_Oculto = new Exferia_Controles.Exferia_CheckBox();
|
||||||
|
this.ex_btn_Email_Borrar = new Exferia_Controles.Exferia_Button();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// ex_usc_Destinos_Email
|
||||||
|
//
|
||||||
|
this.ex_usc_Destinos_Email.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.ex_usc_Destinos_Email.Exferia_TextBox_Email_MaxLength = 100;
|
||||||
|
this.ex_usc_Destinos_Email.Exferia_TextBox_Email_Obligatorio = true;
|
||||||
|
this.ex_usc_Destinos_Email.Exferia_TextBox_Email_Titulo = "Email";
|
||||||
|
this.ex_usc_Destinos_Email.Exferia_TextBox_Email_Valor = "";
|
||||||
|
this.ex_usc_Destinos_Email.Location = new System.Drawing.Point(3, 0);
|
||||||
|
this.ex_usc_Destinos_Email.Name = "ex_usc_Destinos_Email";
|
||||||
|
this.ex_usc_Destinos_Email.Size = new System.Drawing.Size(414, 21);
|
||||||
|
this.ex_usc_Destinos_Email.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// ex_chk_Destinos_Oculto
|
||||||
|
//
|
||||||
|
this.ex_chk_Destinos_Oculto.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.ex_chk_Destinos_Oculto.AutoSize = true;
|
||||||
|
this.ex_chk_Destinos_Oculto.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.ex_chk_Destinos_Oculto.Exferia_CheckBox_Bloqueable = true;
|
||||||
|
this.ex_chk_Destinos_Oculto.Exferia_CheckBox_Obligatorio = false;
|
||||||
|
this.ex_chk_Destinos_Oculto.Exferia_CheckBox_ToolTip = "";
|
||||||
|
this.ex_chk_Destinos_Oculto.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
|
this.ex_chk_Destinos_Oculto.Location = new System.Drawing.Point(421, 2);
|
||||||
|
this.ex_chk_Destinos_Oculto.Name = "ex_chk_Destinos_Oculto";
|
||||||
|
this.ex_chk_Destinos_Oculto.Size = new System.Drawing.Size(57, 17);
|
||||||
|
this.ex_chk_Destinos_Oculto.TabIndex = 1;
|
||||||
|
this.ex_chk_Destinos_Oculto.Text = "Oculto";
|
||||||
|
this.ex_chk_Destinos_Oculto.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// ex_btn_Email_Borrar
|
||||||
|
//
|
||||||
|
this.ex_btn_Email_Borrar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.ex_btn_Email_Borrar.BackColor = System.Drawing.Color.Maroon;
|
||||||
|
this.ex_btn_Email_Borrar.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
|
this.ex_btn_Email_Borrar.Exferia_Button_Bloqueable = true;
|
||||||
|
this.ex_btn_Email_Borrar.Exferia_Button_Imagen = Exferia_Aplicacion.General.Imagenes.G_ENUM_IMAGENES.G_IMG_BORRAR;
|
||||||
|
this.ex_btn_Email_Borrar.Exferia_Button_Permitir_CambioFuenteAutomatico = true;
|
||||||
|
this.ex_btn_Email_Borrar.Exferia_Button_ReadOnly = false;
|
||||||
|
this.ex_btn_Email_Borrar.Exferia_Button_TabStop = false;
|
||||||
|
this.ex_btn_Email_Borrar.Exferia_Button_ToolTip = "";
|
||||||
|
this.ex_btn_Email_Borrar.FlatAppearance.BorderSize = 0;
|
||||||
|
this.ex_btn_Email_Borrar.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.ex_btn_Email_Borrar.Location = new System.Drawing.Point(489, 0);
|
||||||
|
this.ex_btn_Email_Borrar.Name = "ex_btn_Email_Borrar";
|
||||||
|
this.ex_btn_Email_Borrar.Size = new System.Drawing.Size(21, 21);
|
||||||
|
this.ex_btn_Email_Borrar.TabIndex = 4;
|
||||||
|
this.ex_btn_Email_Borrar.TabStop = false;
|
||||||
|
this.ex_btn_Email_Borrar.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||||
|
this.ex_btn_Email_Borrar.UseVisualStyleBackColor = false;
|
||||||
|
this.ex_btn_Email_Borrar.Click += new System.EventHandler(this.ex_btn_Delete_Click);
|
||||||
|
//
|
||||||
|
// CTU_P_TareaProgramada_Notificaciones_Destinos_Email
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.ex_btn_Email_Borrar);
|
||||||
|
this.Controls.Add(this.ex_chk_Destinos_Oculto);
|
||||||
|
this.Controls.Add(this.ex_usc_Destinos_Email);
|
||||||
|
this.Name = "CTU_P_TareaProgramada_Notificaciones_Destinos_Email";
|
||||||
|
this.Size = new System.Drawing.Size(510, 21);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private Exferia_Controles.Exferia_TextBox_Email ex_usc_Destinos_Email;
|
||||||
|
private Exferia_Controles.Exferia_CheckBox ex_chk_Destinos_Oculto;
|
||||||
|
private Exferia_Controles.Exferia_Button ex_btn_Email_Borrar;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,149 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_Formularios;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using Exferia_Aplicacion.Visualizacion;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._4_Vistas.ControlesPersonalizados_DentroPaneles
|
||||||
|
{
|
||||||
|
public partial class CTU_P_TareaProgramada_Notificaciones_Destinos_Email : UserControl
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Propiedades Privadas
|
||||||
|
private P_Base g_frm_DeDondeHereda = null;
|
||||||
|
private KRO_Notificaciones_Destinos g_mdl_KRO_Notificaciones_Destinos;
|
||||||
|
private int g_intNumeroObjeto;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Eventos Públicos
|
||||||
|
public event EventHandler<INTERNO_EventArgs> CTU_P_TareaProgramada_Notificaciones_Destinos_Email_Boton_Delete_Click;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructor
|
||||||
|
public CTU_P_TareaProgramada_Notificaciones_Destinos_Email(P_Base _frm_DeDondeHereda,
|
||||||
|
int _int_NumerObjeto,
|
||||||
|
KRO_Notificaciones_Destinos _mdl_KRO_Notificaciones_Destinos)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Repintar.Empezar(this);
|
||||||
|
|
||||||
|
g_frm_DeDondeHereda = _frm_DeDondeHereda;
|
||||||
|
g_mdl_KRO_Notificaciones_Destinos = _mdl_KRO_Notificaciones_Destinos;
|
||||||
|
g_intNumeroObjeto = _int_NumerObjeto;
|
||||||
|
|
||||||
|
//Cargar
|
||||||
|
Cargar_Datos();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_Notificaciones_Destinos_Email) + "/" + nameof(CTU_P_TareaProgramada_Notificaciones_Destinos_Email));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#region Cargar Datos
|
||||||
|
private void Cargar_Datos()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (g_mdl_KRO_Notificaciones_Destinos != null)
|
||||||
|
{
|
||||||
|
ex_usc_Destinos_Email.Exferia_TextBox_Email_Valor = g_mdl_KRO_Notificaciones_Destinos.email;
|
||||||
|
ex_chk_Destinos_Oculto.Checked = g_mdl_KRO_Notificaciones_Destinos.emailOculto.Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_Notificaciones_Destinos_Email) + "/" + nameof(Cargar_Datos));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Validar
|
||||||
|
public INTERNO_ValorDevuelto_Modelo ValidarDatos()
|
||||||
|
{
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_INTERNO_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//El Email no puede estar vacio
|
||||||
|
if (ex_usc_Destinos_Email.Exferia_TextBox_Email_Valor.Trim().Length == 0)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_NOSELECCIONADO(ex_usc_Destinos_Email.Exferia_TextBox_Email_Titulo);
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Objeto = ex_usc_Destinos_Email;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_MENSAJES_GENERAL_ERROR_VALIDARDATOSPANTALLA();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_Notificaciones_Destinos_Email) + "/" + nameof(ValidarDatos));
|
||||||
|
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = false;
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_MENSAJES_GENERAL_ERROR_VALIDARDATOSPANTALLA();
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_INTERNO_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Grabar
|
||||||
|
public KRO_Notificaciones_Destinos Obtener_Para_Grabar()
|
||||||
|
{
|
||||||
|
KRO_Notificaciones_Destinos mdl_KRO_Notificaciones_Destinos = new KRO_Notificaciones_Destinos();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//id
|
||||||
|
mdl_KRO_Notificaciones_Destinos.id = g_mdl_KRO_Notificaciones_Destinos != null ? g_mdl_KRO_Notificaciones_Destinos.id : -1;
|
||||||
|
|
||||||
|
//idNotificacion
|
||||||
|
mdl_KRO_Notificaciones_Destinos.idNotificacion = g_mdl_KRO_Notificaciones_Destinos != null ? g_mdl_KRO_Notificaciones_Destinos.idNotificacion : -1;
|
||||||
|
|
||||||
|
//email
|
||||||
|
mdl_KRO_Notificaciones_Destinos.email = ex_usc_Destinos_Email.Exferia_TextBox_Email_Valor;
|
||||||
|
|
||||||
|
//emailOculto
|
||||||
|
mdl_KRO_Notificaciones_Destinos.emailOculto = ex_chk_Destinos_Oculto.Checked;
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Control_Errores.Errores_Log("", ex, nameof(CTU_P_TareaProgramada_Notificaciones_Destinos_Email) + "/" + nameof(Obtener_Para_Grabar));
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_KRO_Notificaciones_Destinos;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Borrar
|
||||||
|
private void ex_btn_Delete_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//Para que salte el evento en el otro lado
|
||||||
|
CTU_P_TareaProgramada_Notificaciones_Destinos_Email_Boton_Delete_Click?.Invoke(sender, new INTERNO_EventArgs(g_intNumeroObjeto));
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_Kronos._1_Modelos;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._4_Vistas.F3
|
||||||
|
{
|
||||||
|
public class ABS_F3_KRO_TareasProgramadas : ABS_F3
|
||||||
|
{
|
||||||
|
public override string NOMBRE_CAMPO_CODIGO()
|
||||||
|
{
|
||||||
|
return nameof(INTERNO_KRO_TareasProgramadas_Listado_Modelo.codigo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string NOMBRE_CAMPO_DESCRIPCION()
|
||||||
|
{
|
||||||
|
return nameof(INTERNO_KRO_TareasProgramadas_Listado_Modelo.descripcion);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string NOMBRE_CAMPO_FECHABORRADO()
|
||||||
|
{
|
||||||
|
return nameof(INTERNO_KRO_TareasProgramadas_Listado_Modelo.fechaBorrado);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string NOMBRE_CAMPO_ID()
|
||||||
|
{
|
||||||
|
return nameof(INTERNO_KRO_TareasProgramadas_Listado_Modelo.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string NOMBRE_CAMPO_IDEJERCICIO_BAJA()
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string NOMBRE_CAMPO_DATOSAUXILIARES_1()
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string NOMBRE_CAMPO_DATOSAUXILIARES_2()
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string NOMBRE_CAMPO_DATOSAUXILIARES_3()
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,125 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Exferia_Aplicacion.Modelos_Listado_Filtros;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using Exferia_General;
|
||||||
|
using Exferia_Kronos.General;
|
||||||
|
using Exferia_Kronos._1_Modelos;
|
||||||
|
using static Exferia_Aplicacion.General.Enumerados;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._4_Vistas.Listados
|
||||||
|
{
|
||||||
|
public class ABS_Listado_KRO_TareasProgramadas : ABS_Listado
|
||||||
|
{
|
||||||
|
//Variables privadas
|
||||||
|
private Dictionary<string, INTERNO_ABS_Listado_ColumnasDatos_Modelo> g_dct_INTERNO_ABS_Listado_ColumnasDatos_Modelo = new Dictionary<string, INTERNO_ABS_Listado_ColumnasDatos_Modelo>();
|
||||||
|
|
||||||
|
//Constructor
|
||||||
|
public ABS_Listado_KRO_TareasProgramadas()
|
||||||
|
{
|
||||||
|
Rellenar_Columnas();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Rellenar_Columnas()
|
||||||
|
{
|
||||||
|
//id
|
||||||
|
g_dct_INTERNO_ABS_Listado_ColumnasDatos_Modelo.Add(nameof(INTERNO_KRO_TareasProgramadas_Listado_Modelo.id), new INTERNO_ABS_Listado_ColumnasDatos_Modelo(true, nameof(INTERNO_KRO_TareasProgramadas_Listado_Modelo.id), "id", G_ENUM_TIPOSDATOS.LONG, true, 0, false, false, true, false, "", null));
|
||||||
|
|
||||||
|
//codigo
|
||||||
|
g_dct_INTERNO_ABS_Listado_ColumnasDatos_Modelo.Add(nameof(INTERNO_KRO_TareasProgramadas_Listado_Modelo.codigo), new INTERNO_ABS_Listado_ColumnasDatos_Modelo(false, nameof(INTERNO_KRO_TareasProgramadas_Listado_Modelo.codigo), "Código", G_ENUM_TIPOSDATOS.LONG_TEXT, false, 100, true, true, true, false, "", null));
|
||||||
|
|
||||||
|
//descripcion
|
||||||
|
g_dct_INTERNO_ABS_Listado_ColumnasDatos_Modelo.Add(nameof(INTERNO_KRO_TareasProgramadas_Listado_Modelo.descripcion), new INTERNO_ABS_Listado_ColumnasDatos_Modelo(false, nameof(INTERNO_KRO_TareasProgramadas_Listado_Modelo.descripcion), "Descripción", G_ENUM_TIPOSDATOS.TEXT, false, 200, true, true, true, false, "", null));
|
||||||
|
|
||||||
|
//tipoTarea
|
||||||
|
g_dct_INTERNO_ABS_Listado_ColumnasDatos_Modelo.Add(nameof(INTERNO_KRO_TareasProgramadas_Listado_Modelo.tipoTarea), new INTERNO_ABS_Listado_ColumnasDatos_Modelo(false, nameof(INTERNO_KRO_TareasProgramadas_Listado_Modelo.tipoTarea), "Tipo de Tarea", Enumerados.G_ENUM_TIPOSDATOS.INT, false, 150, true, false, false, false, "", null));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override List<dynamic> LISTADO()
|
||||||
|
{
|
||||||
|
return Registros;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_OpcionesDetalle_Modelo DATOS_OPCION()
|
||||||
|
{
|
||||||
|
return Datos_Generales.PRV_Opciones_Buscar_Detalles(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string NOMBRELISTADO_ALMACENARCONFIGURACION()
|
||||||
|
{
|
||||||
|
return Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Dictionary<string, INTERNO_ABS_Listado_ColumnasDatos_Modelo> LISTADO_COLUMNAS()
|
||||||
|
{
|
||||||
|
return g_dct_INTERNO_ABS_Listado_ColumnasDatos_Modelo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ORDENACION_NOMBRECOLUMNA_PORDEFECTO()
|
||||||
|
{
|
||||||
|
return nameof(INTERNO_KRO_TareasProgramadas_Listado_Modelo.codigo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ORDENACION_TIPO_PORDEFECTO()
|
||||||
|
{
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_Listado_BotonesAuxiliares_Modelo BOTONAUXILIAR_1()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_Listado_BotonesAuxiliares_Modelo BOTONAUXILIAR_2()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_Listado_BotonesAuxiliares_Modelo BOTONAUXILIAR_3()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_Listado_BotonesAuxiliares_Modelo BOTONAUXILIAR_4()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_Listado_BotonesAuxiliares_Modelo BOTONAUXILIAR_5()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_Listado_BotonesAuxiliares_Modelo BOTONAUXILIAR_6()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_Listado_BotonesAuxiliares_Modelo BOTONAUXILIAR_7()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override List<INTERNO_ArbolSecundarioSeleccion_Modelo> LISTADO_ARBOLSECUNDARIOSELECCION()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override List<INTERNO_Listado_Paginado_Filtro_Modelo> FILTRADO_PARAPAGINADO()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override List<string> LISTADOCAMPOS_ENVIAR_A_MANTENIMIENTO()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,129 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Exferia_Aplicacion.Modelos_Listado_Filtros;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using Exferia_General;
|
||||||
|
using Exferia_Kronos.General;
|
||||||
|
using Exferia_Kronos._1_Modelos;
|
||||||
|
using static Exferia_Aplicacion.General.Enumerados;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos._4_Vistas.Listados
|
||||||
|
{
|
||||||
|
public class ABS_Listado_KRO_TareasProgramadas_Historico : ABS_Listado
|
||||||
|
{
|
||||||
|
//Variables privadas
|
||||||
|
private Dictionary<string, INTERNO_ABS_Listado_ColumnasDatos_Modelo> g_dct_INTERNO_ABS_Listado_ColumnasDatos_Modelo = new Dictionary<string, INTERNO_ABS_Listado_ColumnasDatos_Modelo>();
|
||||||
|
private INTERNO_ValoresGenerales_Modelo g_mdl_INTERNO_ValoresGenerales_Modelo;
|
||||||
|
|
||||||
|
//Constructor
|
||||||
|
public ABS_Listado_KRO_TareasProgramadas_Historico(INTERNO_ValoresGenerales_Modelo _mdl_INTERNO_ValoresGenerales_Modelo)
|
||||||
|
{
|
||||||
|
g_mdl_INTERNO_ValoresGenerales_Modelo = _mdl_INTERNO_ValoresGenerales_Modelo;
|
||||||
|
|
||||||
|
Rellenar_Columnas();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Rellenar_Columnas()
|
||||||
|
{
|
||||||
|
//id
|
||||||
|
g_dct_INTERNO_ABS_Listado_ColumnasDatos_Modelo.Add(nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.id), new INTERNO_ABS_Listado_ColumnasDatos_Modelo(true, nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.id), "id", G_ENUM_TIPOSDATOS.LONG, true, 0, false, false, true, false, "", null));
|
||||||
|
|
||||||
|
//fechaHoraInicio
|
||||||
|
g_dct_INTERNO_ABS_Listado_ColumnasDatos_Modelo.Add(nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.fechaHoraInicio), new INTERNO_ABS_Listado_ColumnasDatos_Modelo(false, nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.fechaHoraInicio), "Fecha Inicio", G_ENUM_TIPOSDATOS.DATETIME, false, 100, true, true, true, false, "", null));
|
||||||
|
|
||||||
|
//fechaHoraFin
|
||||||
|
g_dct_INTERNO_ABS_Listado_ColumnasDatos_Modelo.Add(nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.fechaHoraFin), new INTERNO_ABS_Listado_ColumnasDatos_Modelo(false, nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.fechaHoraFin), "Fecha Fin", G_ENUM_TIPOSDATOS.DATETIME, false, 100, true, true, true, false, "", null));
|
||||||
|
|
||||||
|
//resultado
|
||||||
|
g_dct_INTERNO_ABS_Listado_ColumnasDatos_Modelo.Add(nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.resultado), new INTERNO_ABS_Listado_ColumnasDatos_Modelo(false,nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.resultado), "Resultado",G_ENUM_TIPOSDATOS.TEXT,false, 150, true,false,true,false,"",null));
|
||||||
|
|
||||||
|
//fechaHoraTareaProgramada
|
||||||
|
g_dct_INTERNO_ABS_Listado_ColumnasDatos_Modelo.Add(nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.fechaHoraTareaProgramada), new INTERNO_ABS_Listado_ColumnasDatos_Modelo(false, nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.fechaHoraTareaProgramada), "Fecha Tarea Programada", G_ENUM_TIPOSDATOS.DATETIME, false, 100, true, false, false, false, "", null));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override List<dynamic> LISTADO()
|
||||||
|
{
|
||||||
|
return Registros;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_OpcionesDetalle_Modelo DATOS_OPCION()
|
||||||
|
{
|
||||||
|
return Datos_Generales.PRV_Opciones_Buscar_Detalles(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA_HISTORICO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string NOMBRELISTADO_ALMACENARCONFIGURACION()
|
||||||
|
{
|
||||||
|
return Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA_HISTORICO;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Dictionary<string, INTERNO_ABS_Listado_ColumnasDatos_Modelo> LISTADO_COLUMNAS()
|
||||||
|
{
|
||||||
|
return g_dct_INTERNO_ABS_Listado_ColumnasDatos_Modelo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ORDENACION_NOMBRECOLUMNA_PORDEFECTO()
|
||||||
|
{
|
||||||
|
return nameof(INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.fechaHoraInicio);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ORDENACION_TIPO_PORDEFECTO()
|
||||||
|
{
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_Listado_BotonesAuxiliares_Modelo BOTONAUXILIAR_1()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_Listado_BotonesAuxiliares_Modelo BOTONAUXILIAR_2()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_Listado_BotonesAuxiliares_Modelo BOTONAUXILIAR_3()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_Listado_BotonesAuxiliares_Modelo BOTONAUXILIAR_4()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_Listado_BotonesAuxiliares_Modelo BOTONAUXILIAR_5()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_Listado_BotonesAuxiliares_Modelo BOTONAUXILIAR_6()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override INTERNO_Listado_BotonesAuxiliares_Modelo BOTONAUXILIAR_7()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override List<INTERNO_ArbolSecundarioSeleccion_Modelo> LISTADO_ARBOLSECUNDARIOSELECCION()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override List<INTERNO_Listado_Paginado_Filtro_Modelo> FILTRADO_PARAPAGINADO()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override List<string> LISTADOCAMPOS_ENVIAR_A_MANTENIMIENTO()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,126 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="Dias.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="Hora.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
||||||
|
|
@ -0,0 +1,168 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_Aplicacion.Modelos_Kronos;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using Exferia_Kronos._1_Modelos;
|
||||||
|
using Exferia_Kronos._2_Datos;
|
||||||
|
using Exferia_Kronos.General;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Management;
|
||||||
|
using System.Security.Permissions;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos
|
||||||
|
{
|
||||||
|
public class Datos_Kronos
|
||||||
|
{
|
||||||
|
#region KRO_TareasProgramadas
|
||||||
|
private List<INTERNO_KRO_TareasProgramadas_Modelo> KRO_TareasProgramadas_Obtener_EXTERNO()
|
||||||
|
{
|
||||||
|
List<INTERNO_KRO_TareasProgramadas_Modelo> lst_INTERNO_KRO_TareasProgramadas_Modelo = new List<INTERNO_KRO_TareasProgramadas_Modelo>();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
#region Datos de Conexion
|
||||||
|
Funciones_FicherosXML.CargarDatosXML_ConexionBD();
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
KRO_TareasProgramadas_Datos obj_KRO_TareasProgramadas_Datos = new KRO_TareasProgramadas_Datos();
|
||||||
|
lst_INTERNO_KRO_TareasProgramadas_Modelo= obj_KRO_TareasProgramadas_Datos.Obtener_ParaServicioWindows();
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
lst_INTERNO_KRO_TareasProgramadas_Modelo= null;
|
||||||
|
}
|
||||||
|
catch(Exception)
|
||||||
|
{
|
||||||
|
lst_INTERNO_KRO_TareasProgramadas_Modelo= null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return lst_INTERNO_KRO_TareasProgramadas_Modelo;
|
||||||
|
}
|
||||||
|
private INTERNO_ValorDevuelto_Modelo KRO_TareasProgramadas_Actualizar_FechaUltimaEjecucion_EXTERNO(DateTime _dtt_FechaUltimaEjecucion, long _lng_id)
|
||||||
|
{
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_INTERNO_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
#region Datos de Conexion
|
||||||
|
Funciones_FicherosXML.CargarDatosXML_ConexionBD();
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
KRO_TareasProgramadas_Datos obj_KRO_TareasProgramadas_Datos = new KRO_TareasProgramadas_Datos();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo= obj_KRO_TareasProgramadas_Datos.Actualizar_FechaUltimaEjecucion(_dtt_FechaUltimaEjecucion, _lng_id); ;
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo= null;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo= null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_INTERNO_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region KRO_TareasProgramadas_Historico
|
||||||
|
|
||||||
|
private INTERNO_ValorDevuelto_Modelo KRO_TareasProgramadas_InsertarHistorico_EXTERNO(dynamic _dnm_valor)
|
||||||
|
{
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_INTERNO_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
#region Datos de Conexion
|
||||||
|
Funciones_FicherosXML.CargarDatosXML_ConexionBD();
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
KRO_TareasProgramadas_Historico mdl_KRO_TareasProgramadas_Historico = new KRO_TareasProgramadas_Historico();
|
||||||
|
mdl_KRO_TareasProgramadas_Historico.id = _dnm_valor.id;
|
||||||
|
mdl_KRO_TareasProgramadas_Historico.idTareaProgramada = _dnm_valor.idTareaProgramada;
|
||||||
|
mdl_KRO_TareasProgramadas_Historico.fechaHoraInicio = _dnm_valor.fechaHoraInicio;
|
||||||
|
mdl_KRO_TareasProgramadas_Historico.fechaHoraFin = _dnm_valor.fechaHoraFin;
|
||||||
|
mdl_KRO_TareasProgramadas_Historico.resultado = _dnm_valor.resultado;
|
||||||
|
mdl_KRO_TareasProgramadas_Historico.fechaHoraTareaProgramada = _dnm_valor.fechaHoraTareaProgramada;
|
||||||
|
|
||||||
|
//GRABAR EN BASE DE DATOS
|
||||||
|
KRO_TareasProgramadas_Historico_Datos obj_KRO_TareasProgramadas_Historico_Datos = new KRO_TareasProgramadas_Historico_Datos();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo= obj_KRO_TareasProgramadas_Historico_Datos.Insertar(mdl_KRO_TareasProgramadas_Historico);
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo= null;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo= null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_INTERNO_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region KRO_TareasProgramadas_Modificadas
|
||||||
|
private bool KRO_TareasProgramadas_Modificadas_EXTERNO()
|
||||||
|
{
|
||||||
|
bool bol_Modificada = false;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
#region Datos de Conexion
|
||||||
|
Funciones_FicherosXML.CargarDatosXML_ConexionBD();
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
KRO_TareasProgramadas_Modificadas_Datos obj_KRO_TareasProgramadas_Modificadas_Datos = new KRO_TareasProgramadas_Modificadas_Datos();
|
||||||
|
List<KRO_TareasProgramadas_Modificadas> lst_KRO_TareasProgramadas_Modificadas = obj_KRO_TareasProgramadas_Modificadas_Datos.Obtener_ModeloListado_para_Servicio();
|
||||||
|
|
||||||
|
if (lst_KRO_TareasProgramadas_Modificadas!=null && lst_KRO_TareasProgramadas_Modificadas.Count>0)
|
||||||
|
{
|
||||||
|
bol_Modificada = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
bol_Modificada = false;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
bol_Modificada = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bol_Modificada;
|
||||||
|
}
|
||||||
|
private INTERNO_ValorDevuelto_Modelo KRO_TareasProgramadas_Modificadas_Actualizar_EXTERNO()
|
||||||
|
{
|
||||||
|
INTERNO_ValorDevuelto_Modelo mdl_INTERNO_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo.TodoCorrecto = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
#region Datos de Conexion
|
||||||
|
Funciones_FicherosXML.CargarDatosXML_ConexionBD();
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
KRO_TareasProgramadas_Modificadas_Datos obj_KRO_TareasProgramadas_Modificadas_Datos = new KRO_TareasProgramadas_Modificadas_Datos();
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo = obj_KRO_TareasProgramadas_Modificadas_Datos.Actualizar_Desde_ServicioWindos();
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo = null;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValorDevuelto_Modelo = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return mdl_INTERNO_ValorDevuelto_Modelo;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,155 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{79DC322B-22F1-47FA-95EF-BEF62106F9F8}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>Exferia_Kronos</RootNamespace>
|
||||||
|
<AssemblyName>Exferia_Kronos</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="ClosedXML">
|
||||||
|
<HintPath>..\..\..\DLL\ClosedXML.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\..\DLL\EntityFramework.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Exferia_Aplicacion">
|
||||||
|
<HintPath>..\..\..\DLL\Exferia_Aplicacion.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Exferia_Controles, Version=1.0.0.7, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\..\DLL\Exferia_Controles.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Exferia_EntityFramework, Version=1.0.0.7, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\..\DLL\Exferia_EntityFramework.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Exferia_Formularios">
|
||||||
|
<HintPath>..\..\..\DLL\Exferia_Formularios.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Exferia_General, Version=1.0.0.7, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\..\DLL\Exferia_General.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="MonthCalendarControl">
|
||||||
|
<HintPath>..\..\..\DLL\MonthCalendarControl.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Management" />
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="1_Modelos\INTERNO_Retenciones_Modelo.cs" />
|
||||||
|
<Compile Include="1_Modelos\INTERNO_KRO_TareasProgramadas_Historico_Listado_Modelo.cs" />
|
||||||
|
<Compile Include="1_Modelos\INTERNO_KRO_TareasProgramadas_Listado_Modelo.cs" />
|
||||||
|
<Compile Include="2_Datos\KRO_Notificaciones_Datos.cs" />
|
||||||
|
<Compile Include="2_Datos\KRO_TareasProgramadas_Modificadas_Datos.cs" />
|
||||||
|
<Compile Include="2_Datos\KRO_Notificaciones_Destinos_Datos.cs" />
|
||||||
|
<Compile Include="2_Datos\KRO_TareasProgramadas_Asociadas_Datos.cs" />
|
||||||
|
<Compile Include="2_Datos\KRO_TareasProgramadas_Datos.cs" />
|
||||||
|
<Compile Include="2_Datos\KRO_TareasProgramadas_Historico_Datos.cs" />
|
||||||
|
<Compile Include="4_Vistas\Controladoras\P_TareaProgramada_Controladora.cs" />
|
||||||
|
<Compile Include="4_Vistas\ControlesPersonalizados_DentroPaneles\CTU_P_TareaProgramada_Asociada.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="4_Vistas\ControlesPersonalizados_DentroPaneles\CTU_P_TareaProgramada_Asociada.Designer.cs">
|
||||||
|
<DependentUpon>CTU_P_TareaProgramada_Asociada.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="4_Vistas\ControlesPersonalizados_DentroPaneles\CTU_P_TareaProgramada_CopiaSeguridad.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="4_Vistas\ControlesPersonalizados_DentroPaneles\CTU_P_TareaProgramada_CopiaSeguridad.Designer.cs">
|
||||||
|
<DependentUpon>CTU_P_TareaProgramada_CopiaSeguridad.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="4_Vistas\ControlesPersonalizados_DentroPaneles\CTU_P_TareaProgramada_Notificaciones.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="4_Vistas\ControlesPersonalizados_DentroPaneles\CTU_P_TareaProgramada_Notificaciones.Designer.cs">
|
||||||
|
<DependentUpon>CTU_P_TareaProgramada_Notificaciones.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="4_Vistas\ControlesPersonalizados_DentroPaneles\CTU_P_TareaProgramada_Notificaciones_Destinos_Email.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="4_Vistas\ControlesPersonalizados_DentroPaneles\CTU_P_TareaProgramada_Notificaciones_Destinos_Email.Designer.cs">
|
||||||
|
<DependentUpon>CTU_P_TareaProgramada_Notificaciones_Destinos_Email.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="4_Vistas\F3\ABS_F3_KRO_TareasProgramadas.cs" />
|
||||||
|
<Compile Include="4_Vistas\Listados\ABS_Listado_KRO_TareasProgramadas.cs" />
|
||||||
|
<Compile Include="4_Vistas\Listados\ABS_Listado_KRO_TareasProgramadas_Historico.cs" />
|
||||||
|
<Compile Include="4_Vistas\P_TareaProgramada.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="4_Vistas\P_TareaProgramada.Designer.cs">
|
||||||
|
<DependentUpon>P_TareaProgramada.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Datos_Kronos.cs" />
|
||||||
|
<Compile Include="General\Funciones_Kronos.cs" />
|
||||||
|
<Compile Include="General\ListadosEstaticos_Kronos.cs" />
|
||||||
|
<Compile Include="General\Variables_Kronos.cs" />
|
||||||
|
<Compile Include="Opciones.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="4_Vistas\ListadoSeleccion\" />
|
||||||
|
<Folder Include="4_Vistas\MantenimientoSimple\" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="4_Vistas\ControlesPersonalizados_DentroPaneles\CTU_P_TareaProgramada_Asociada.resx">
|
||||||
|
<DependentUpon>CTU_P_TareaProgramada_Asociada.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="4_Vistas\ControlesPersonalizados_DentroPaneles\CTU_P_TareaProgramada_CopiaSeguridad.resx">
|
||||||
|
<DependentUpon>CTU_P_TareaProgramada_CopiaSeguridad.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="4_Vistas\ControlesPersonalizados_DentroPaneles\CTU_P_TareaProgramada_Notificaciones.resx">
|
||||||
|
<DependentUpon>CTU_P_TareaProgramada_Notificaciones.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="4_Vistas\ControlesPersonalizados_DentroPaneles\CTU_P_TareaProgramada_Notificaciones_Destinos_Email.resx">
|
||||||
|
<DependentUpon>CTU_P_TareaProgramada_Notificaciones_Destinos_Email.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="4_Vistas\P_TareaProgramada.resx">
|
||||||
|
<DependentUpon>P_TareaProgramada.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_Kronos._1_Modelos;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using static Exferia_Kronos.General.Variables_Kronos;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos.General
|
||||||
|
{
|
||||||
|
public class Funciones_Kronos
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,104 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_Aplicacion.Modelos_Kronos;
|
||||||
|
using Exferia_Kronos._1_Modelos;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos.General
|
||||||
|
{
|
||||||
|
public class ListadosEstaticos_Kronos
|
||||||
|
{
|
||||||
|
//Dias Semana
|
||||||
|
public static List<INTERNO_ComboBox_Modelo> Devolver_Dias_Semanas()
|
||||||
|
{
|
||||||
|
List<INTERNO_ComboBox_Modelo> lst_INTERNO_ComboBox_Modelo = new List<Exferia_Aplicacion.General.INTERNO_ComboBox_Modelo>();
|
||||||
|
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_DIASEMANA_LUNES.Codigo, Variables.G_MDL_DIASEMANA_LUNES.Descripcion, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_DIASEMANA_MARTES.Codigo, Variables.G_MDL_DIASEMANA_MARTES.Descripcion, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_DIASEMANA_MIERCOLES.Codigo, Variables.G_MDL_DIASEMANA_MIERCOLES.Descripcion, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_DIASEMANA_JUEVES.Codigo, Variables.G_MDL_DIASEMANA_JUEVES.Descripcion, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_DIASEMANA_VIERNES.Codigo, Variables.G_MDL_DIASEMANA_VIERNES.Descripcion, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_DIASEMANA_SABADO.Codigo, Variables.G_MDL_DIASEMANA_SABADO.Descripcion, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_DIASEMANA_DOMINGO.Codigo, Variables.G_MDL_DIASEMANA_DOMINGO.Descripcion, null));
|
||||||
|
|
||||||
|
return lst_INTERNO_ComboBox_Modelo;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Meses
|
||||||
|
public static List<INTERNO_ComboBox_Modelo> Devolver_Meses()
|
||||||
|
{
|
||||||
|
List<INTERNO_ComboBox_Modelo> lst_INTERNO_ComboBox_Modelo = new List<Exferia_Aplicacion.General.INTERNO_ComboBox_Modelo>();
|
||||||
|
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_MES_ENERO.Codigo, Variables.G_STR_CALENDARIO_MES_ENERO, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_MES_FEBRERO.Codigo, Variables.G_STR_CALENDARIO_MES_FEBRERO, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_MES_MARZO.Codigo, Variables.G_STR_CALENDARIO_MES_MARZO, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_MES_ABRIL.Codigo, Variables.G_STR_CALENDARIO_MES_ABRIL, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_MES_MAYO.Codigo, Variables.G_STR_CALENDARIO_MES_MAYO, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_MES_JUNIO.Codigo, Variables.G_STR_CALENDARIO_MES_JUNIO, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_MES_JULIO.Codigo, Variables.G_STR_CALENDARIO_MES_JULIO, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_MES_AGOSTO.Codigo, Variables.G_STR_CALENDARIO_MES_AGOSTO, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_MES_SEPTIEMBRE.Codigo, Variables.G_STR_CALENDARIO_MES_SEPTIEMBRE, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_MES_OCTUBRE.Codigo, Variables.G_STR_CALENDARIO_MES_OCTUBRE, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_MES_NOVIEMBRE.Codigo, Variables.G_STR_CALENDARIO_MES_NOVIEMBRE, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_MES_DICIEMBRE.Codigo, Variables.G_STR_CALENDARIO_MES_DICIEMBRE, null));
|
||||||
|
|
||||||
|
return lst_INTERNO_ComboBox_Modelo;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Dias Mes
|
||||||
|
public static List<INTERNO_ComboBox_Modelo> Devolver_Dias_Mes()
|
||||||
|
{
|
||||||
|
List<INTERNO_ComboBox_Modelo> lst_INTERNO_ComboBox_Modelo = new List<Exferia_Aplicacion.General.INTERNO_ComboBox_Modelo>();
|
||||||
|
|
||||||
|
for (int int_Contador = 1; int_Contador <= 31; int_Contador++)
|
||||||
|
{
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(int_Contador.ToString(), int_Contador.ToString(), null));
|
||||||
|
}
|
||||||
|
|
||||||
|
return lst_INTERNO_ComboBox_Modelo;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Dias Tipos
|
||||||
|
public static List<INTERNO_ComboBox_Modelo> Devolver_Dias_Tipo()
|
||||||
|
{
|
||||||
|
List<INTERNO_ComboBox_Modelo> lst_INTERNO_ComboBox_Modelo = new List<Exferia_Aplicacion.General.INTERNO_ComboBox_Modelo>();
|
||||||
|
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_DIASTIPOS_PRIMERO.Codigo, Variables.G_MDL_DIASTIPOS_PRIMERO.Descripcion, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_DIASTIPOS_SEGUNDO.Codigo, Variables.G_MDL_DIASTIPOS_SEGUNDO.Descripcion, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_DIASTIPOS_TERCERO.Codigo, Variables.G_MDL_DIASTIPOS_TERCERO.Descripcion, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_DIASTIPOS_CUARTO.Codigo, Variables.G_MDL_DIASTIPOS_CUARTO.Descripcion, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_DIASTIPOS_ULTIMO.Codigo, Variables.G_MDL_DIASTIPOS_ULTIMO.Descripcion, null));
|
||||||
|
|
||||||
|
return lst_INTERNO_ComboBox_Modelo;
|
||||||
|
}
|
||||||
|
//AntesDespues Tipos
|
||||||
|
public static List<INTERNO_ComboBox_Modelo> Devolver_AntesDespues_Tipo()
|
||||||
|
{
|
||||||
|
List<INTERNO_ComboBox_Modelo> lst_INTERNO_ComboBox_Modelo = new List<Exferia_Aplicacion.General.INTERNO_ComboBox_Modelo>();
|
||||||
|
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_KRONOS_ANTESDESPUESTIPO_ANTES.Codigo, Variables.G_MDL_KRONOS_ANTESDESPUESTIPO_ANTES.Descripcion, null));
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(Variables.G_MDL_KRONOS_ANTESDESPUESTIPO_DESPUES.Codigo, Variables.G_MDL_KRONOS_ANTESDESPUESTIPO_DESPUES.Descripcion, null));
|
||||||
|
|
||||||
|
return lst_INTERNO_ComboBox_Modelo;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Procesos Tipos
|
||||||
|
public static List<INTERNO_ComboBox_Modelo> Devolver_ProcesosTipo()
|
||||||
|
{
|
||||||
|
List<INTERNO_ComboBox_Modelo> lst_INTERNO_ComboBox_Modelo = new List<Exferia_Aplicacion.General.INTERNO_ComboBox_Modelo>();
|
||||||
|
|
||||||
|
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo("-1", "", null));
|
||||||
|
foreach (INTERNO_KRO_Procesos_Modelo mdl_INTERNO_KRO_Procesos_Modelo in Variables.G_LST_KRONOS_INTERNO_PROCESOS_MODELO)
|
||||||
|
{
|
||||||
|
lst_INTERNO_ComboBox_Modelo.Add(new INTERNO_ComboBox_Modelo(mdl_INTERNO_KRO_Procesos_Modelo.tipoTarea_Codigo.ToString(), mdl_INTERNO_KRO_Procesos_Modelo.tipotarea_Descripcion, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
return lst_INTERNO_ComboBox_Modelo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_Kronos._1_Modelos;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using static Exferia_Aplicacion.General.Enumerados;
|
||||||
|
using static Exferia_Kronos.General.Variables_Kronos;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos.General
|
||||||
|
{
|
||||||
|
public class Variables_Kronos
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,498 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_Controles;
|
||||||
|
using Exferia_Formularios;
|
||||||
|
using Exferia_Kronos._2_Datos;
|
||||||
|
using Exferia_Kronos._4_Vistas;
|
||||||
|
using Exferia_Kronos._4_Vistas.F3;
|
||||||
|
using Exferia_Kronos._4_Vistas.Listados;
|
||||||
|
using Exferia_Kronos.General;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Kronos
|
||||||
|
{
|
||||||
|
public class Opciones
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Evento que se activa cuando se selecciona un registro
|
||||||
|
/// </summary>
|
||||||
|
///
|
||||||
|
public event EventHandler<INTERNO_EventArgs_Listado> ABS_Opciones_Evento_RegistroSeleccionado;
|
||||||
|
protected void Evento_RegistroSeleccionado(object sender, INTERNO_EventArgs_Listado e)
|
||||||
|
{
|
||||||
|
INTERNO_EventArgs_Listado obj_Exferia_EventArgs = new INTERNO_EventArgs_Listado(null, null, e.REGISTRO_SELECCIONADO, null,e.Objeto_Auxiliar,e.Listado_INTERNO_Filtro_OpcionPadre_Modelo,e.CamposValores_ParaMantenimiento);
|
||||||
|
EventHandler<INTERNO_EventArgs_Listado> obj_EventHandler = ABS_Opciones_Evento_RegistroSeleccionado;
|
||||||
|
if (obj_EventHandler != null)
|
||||||
|
obj_EventHandler(this, obj_Exferia_EventArgs);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Listado
|
||||||
|
private void CARGAR_LISTADO(string _str_Opcion,
|
||||||
|
bool _bol_ListadoSeleccionable,
|
||||||
|
int _int_AccionesPermitidas,
|
||||||
|
P_Base _frm_P_Base_Origen,
|
||||||
|
INTERNO_ValoresGenerales_Modelo _mdl_INTERNO_ValoresGenerales_Modelo,
|
||||||
|
DateTime _dtt_FechaPorDefecto,
|
||||||
|
string _str_SeleccionFiltro_NombreCampo,
|
||||||
|
string _str_SeleccionFiltro_Valor,
|
||||||
|
bool _bol_SeleccionFiltro_SencibleMayusculasMinusculas,
|
||||||
|
bool _bol_SeleccionFiltro_PalabraCompleta,
|
||||||
|
List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo,
|
||||||
|
List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo,
|
||||||
|
Dictionary<string, object> _dct_ListadoFiltros,
|
||||||
|
object _obj_Auxiliar,
|
||||||
|
object _obj_Filtros_Auxiliar,
|
||||||
|
ABS_Listado _obj_ABS_Listado)
|
||||||
|
{
|
||||||
|
//Nombre de la DLL Actual
|
||||||
|
string str_Nombre_DLL = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
|
||||||
|
|
||||||
|
Funciones_Listado obj_Funciones_Listado = new Funciones_Listado();
|
||||||
|
|
||||||
|
//EVENTOS PUBLICOS
|
||||||
|
obj_Funciones_Listado.Funciones_Listado_Evento_RegistroSeleccionado += new System.EventHandler<INTERNO_EventArgs_Listado>(Evento_RegistroSeleccionado);
|
||||||
|
|
||||||
|
//Datos Variables segun Opcione ###########################################################
|
||||||
|
ABS_Listado obj_ABS_Listado_Auxiliar = null;
|
||||||
|
|
||||||
|
//TAREAPROGRAMADA
|
||||||
|
if (_str_Opcion.Equals(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA))
|
||||||
|
{
|
||||||
|
obj_ABS_Listado_Auxiliar = new ABS_Listado_KRO_TareasProgramadas();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//#########################################################################################
|
||||||
|
|
||||||
|
//Llamar a la Funcion general que cargara los datos y generar la pantalla del listado
|
||||||
|
obj_Funciones_Listado.Mostrar_Listado(_bol_ListadoSeleccionable,
|
||||||
|
_int_AccionesPermitidas,
|
||||||
|
_frm_P_Base_Origen,
|
||||||
|
_mdl_INTERNO_ValoresGenerales_Modelo,
|
||||||
|
_dtt_FechaPorDefecto,
|
||||||
|
_str_SeleccionFiltro_NombreCampo,
|
||||||
|
_str_SeleccionFiltro_Valor,
|
||||||
|
_bol_SeleccionFiltro_SencibleMayusculasMinusculas,
|
||||||
|
_bol_SeleccionFiltro_PalabraCompleta,
|
||||||
|
str_Nombre_DLL,
|
||||||
|
_str_Opcion,
|
||||||
|
obj_ABS_Listado_Auxiliar,
|
||||||
|
_lst_INTERNO_Filtro_OpcionPadre_Modelo,
|
||||||
|
_lst_INTERNO_Filtro_Modelo,
|
||||||
|
_dct_ListadoFiltros,
|
||||||
|
_obj_Auxiliar);
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<dynamic> OBTENER_LISTADO(string _str_Opcion,
|
||||||
|
long _lng_idEmpresaSeleccionada,
|
||||||
|
long _lng_idEjercicioActual,
|
||||||
|
List<string> _lst_CamposConRelacionABuscar,
|
||||||
|
List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo,
|
||||||
|
List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
List<dynamic> lst_Valores = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//TAREAPROGRAMADA
|
||||||
|
if (_str_Opcion.Equals(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA))
|
||||||
|
{
|
||||||
|
KRO_TareasProgramadas_Datos g_obj_KRO_TareasProgramadas_Datos = new KRO_TareasProgramadas_Datos();
|
||||||
|
lst_Valores = g_obj_KRO_TareasProgramadas_Datos.Obtener_Listado(_lng_idEmpresaSeleccionada, _lng_idEjercicioActual, _lst_CamposConRelacionABuscar, _lst_INTERNO_Filtro_OpcionPadre_Modelo, _lst_INTERNO_Filtro_Modelo);
|
||||||
|
}
|
||||||
|
//TAREAPROGRAMADA_HISTORICO
|
||||||
|
else if (_str_Opcion.Equals(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA_HISTORICO))
|
||||||
|
{
|
||||||
|
KRO_TareasProgramadas_Historico_Datos g_obj_KRO_TareasProgramadas_Historico_Datos = new KRO_TareasProgramadas_Historico_Datos();
|
||||||
|
lst_Valores = g_obj_KRO_TareasProgramadas_Historico_Datos.Obtener_Listado(_lng_idEmpresaSeleccionada, _lng_idEjercicioActual, _lst_CamposConRelacionABuscar, _lst_INTERNO_Filtro_OpcionPadre_Modelo, _lst_INTERNO_Filtro_Modelo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{ }
|
||||||
|
catch (Exception)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
return lst_Valores;
|
||||||
|
}
|
||||||
|
|
||||||
|
private dynamic OBTENER_REGISTROSLISTADO(string _str_Opcion,
|
||||||
|
long _lng_idEmpresaSeleccionada,
|
||||||
|
long _lng_idEjercicioActual,
|
||||||
|
List<string> _lst_CamposConRelacionABuscar,
|
||||||
|
List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo,
|
||||||
|
List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo,
|
||||||
|
long _lng_id,
|
||||||
|
List<long> _lst_ids)
|
||||||
|
{
|
||||||
|
dynamic dnm_Valor = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//TAREAPROGRAMADA
|
||||||
|
if (_str_Opcion.Equals(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA))
|
||||||
|
{
|
||||||
|
KRO_TareasProgramadas_Datos obj_KRO_TareasProgramadas_Datos = new KRO_TareasProgramadas_Datos();
|
||||||
|
dnm_Valor = obj_KRO_TareasProgramadas_Datos.Obtener_RegistroListado(_lng_idEmpresaSeleccionada, _lng_idEjercicioActual, _lst_CamposConRelacionABuscar, _lst_INTERNO_Filtro_OpcionPadre_Modelo, _lst_INTERNO_Filtro_Modelo, _lng_id, _lst_ids);
|
||||||
|
}
|
||||||
|
//TAREAPROGRAMADA_Historico
|
||||||
|
else if (_str_Opcion.Equals(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA_HISTORICO))
|
||||||
|
{
|
||||||
|
KRO_TareasProgramadas_Historico_Datos obj_KRO_TareasProgramadas_Historico_Datos = new KRO_TareasProgramadas_Historico_Datos();
|
||||||
|
dnm_Valor = obj_KRO_TareasProgramadas_Historico_Datos.Obtener_RegistroListado(_lng_idEmpresaSeleccionada, _lng_idEjercicioActual, _lst_CamposConRelacionABuscar, _lst_INTERNO_Filtro_OpcionPadre_Modelo, _lst_INTERNO_Filtro_Modelo,_lng_id ,_lst_ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{ }
|
||||||
|
catch (Exception)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
return dnm_Valor;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Listado Secundario
|
||||||
|
private void MOSTRAR_LISTADO_SECUNDARIO(string _str_Opcion,
|
||||||
|
string _str_idNodoArbolSecundarioSeleccion,
|
||||||
|
P_Base _frm_P_Base_Origen,
|
||||||
|
INTERNO_ValoresGenerales_Modelo _mdl_INTERNO_ValoresGenerales_Modelo,
|
||||||
|
DateTime _dtt_FechaPorDefecto,
|
||||||
|
List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo,
|
||||||
|
List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo,
|
||||||
|
Dictionary<string, object> _dct_ListadoFiltros,
|
||||||
|
object _obj_Auxiliar)
|
||||||
|
{
|
||||||
|
//Nombre de la DLL Actual
|
||||||
|
string str_Nombre_DLL = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
|
||||||
|
|
||||||
|
Funciones_Listado_Secundario obj_Funciones_Listado_Secundario = new Funciones_Listado_Secundario();
|
||||||
|
|
||||||
|
//Datos Variables segun Opcione ###########################################################
|
||||||
|
ABS_Listado obj_ABS_Listado_Auxiliar = null;
|
||||||
|
|
||||||
|
//Llamar a la Funcion general que cargara los datos y generar la pantalla del listado
|
||||||
|
obj_Funciones_Listado_Secundario.Mostrar_Listado(_frm_P_Base_Origen,
|
||||||
|
_str_idNodoArbolSecundarioSeleccion,
|
||||||
|
_mdl_INTERNO_ValoresGenerales_Modelo,
|
||||||
|
_dtt_FechaPorDefecto,
|
||||||
|
str_Nombre_DLL,
|
||||||
|
_str_Opcion,
|
||||||
|
obj_ABS_Listado_Auxiliar,
|
||||||
|
_lst_INTERNO_Filtro_OpcionPadre_Modelo,
|
||||||
|
_lst_INTERNO_Filtro_Modelo,
|
||||||
|
_dct_ListadoFiltros,
|
||||||
|
_obj_Auxiliar);
|
||||||
|
}
|
||||||
|
private List<dynamic> OBTENER_LISTADO_SECUNDARIO(string _str_Opcion,
|
||||||
|
long _lng_idEmpresaSeleccionada,
|
||||||
|
long _lng_idEjercicioActual,
|
||||||
|
List<string> _lst_CamposConRelacionABuscar,
|
||||||
|
List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo,
|
||||||
|
List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
List<dynamic> lst_Valores = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{ }
|
||||||
|
catch (Exception)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
return lst_Valores;
|
||||||
|
}
|
||||||
|
private dynamic OBTENER_REGISTROSLISTADO_SECUNDARIO(string _str_Opcion,
|
||||||
|
long _lng_idEmpresaSeleccionada,
|
||||||
|
long _lng_idEjercicioActual,
|
||||||
|
List<string> _lst_CamposConRelacionABuscar,
|
||||||
|
List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo,
|
||||||
|
List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo,
|
||||||
|
long _lng_id,
|
||||||
|
List<long> _lst_ids)
|
||||||
|
{
|
||||||
|
dynamic dnm_Valor = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{ }
|
||||||
|
catch (Exception)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
return dnm_Valor;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private dynamic OBTENER_REGISTRO_F3(string _str_Opcion,
|
||||||
|
string _str_filtro,
|
||||||
|
string _str_CampoBusqueda,
|
||||||
|
long _lng_idEmpresaSeleccionada,
|
||||||
|
long _lng_idEjercicioActual,
|
||||||
|
List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo,
|
||||||
|
List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo,
|
||||||
|
object _obj_Filtros_Auxiliar)
|
||||||
|
{
|
||||||
|
dynamic dnm_Valores = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//TAREAPROGRAMADA
|
||||||
|
if(_str_Opcion.Equals(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA))
|
||||||
|
{
|
||||||
|
KRO_TareasProgramadas_Datos obj_KRO_TareasProgramadas_Datos = new KRO_TareasProgramadas_Datos();
|
||||||
|
dnm_Valores = obj_KRO_TareasProgramadas_Datos.Obtener_F3(_str_filtro, _str_CampoBusqueda, _lng_idEmpresaSeleccionada, _lng_idEjercicioActual, _lst_INTERNO_Filtro_OpcionPadre_Modelo, _lst_INTERNO_Filtro_Modelo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{ }
|
||||||
|
catch (Exception)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
return dnm_Valores;
|
||||||
|
}
|
||||||
|
|
||||||
|
private dynamic OBTENER_REGISTRO_F3_PORID(string _str_Opcion,
|
||||||
|
long _lng_id,
|
||||||
|
long _lng_idEmpresaSeleccionada,
|
||||||
|
long _lng_idEjercicioActual,
|
||||||
|
List<INTERNO_Filtro_OpcionPadre_Modelo> _lst_INTERNO_Filtro_OpcionPadre_Modelo,
|
||||||
|
List<INTERNO_Filtro_Modelo> _lst_INTERNO_Filtro_Modelo)
|
||||||
|
{
|
||||||
|
dynamic dnm_Valores = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//TAREAPROGRAMADA
|
||||||
|
if(_str_Opcion.Equals(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA))
|
||||||
|
{
|
||||||
|
KRO_TareasProgramadas_Datos obj_KRO_TareasProgramadas_Datos = new KRO_TareasProgramadas_Datos();
|
||||||
|
dnm_Valores = obj_KRO_TareasProgramadas_Datos.Obtener_F3_PorId(_lng_id, _lng_idEmpresaSeleccionada, _lng_idEjercicioActual, _lst_INTERNO_Filtro_OpcionPadre_Modelo, _lst_INTERNO_Filtro_Modelo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{ }
|
||||||
|
catch (Exception)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
return dnm_Valores;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ABS_F3 OBTENCION_ABS_F3(string _str_Opcion)
|
||||||
|
{
|
||||||
|
ABS_F3 obj_ABS_F3 = null;
|
||||||
|
|
||||||
|
//TAREAPROGRAMADA
|
||||||
|
if(_str_Opcion.Equals(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA))
|
||||||
|
{
|
||||||
|
obj_ABS_F3 = new ABS_F3_KRO_TareasProgramadas();
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj_ABS_F3;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MOSTRAR_EN_MANTENIMIENTO(string _str_Opcion,
|
||||||
|
P_Base _frm_P_Base_Origen,
|
||||||
|
Exferia_F3 _usc_Exferia_F3_Origen,
|
||||||
|
INTERNO_ValoresGenerales_Modelo _mdl_INTERNO_ValoresGenerales_Modelo,
|
||||||
|
DateTime _dtt_FechaPorDefecto,
|
||||||
|
INTERNO_OpcionesDetalle_Modelo _mdl_INTERNO_OpcionesDetalle_Modelo,
|
||||||
|
long _lng_RegistroSeleccionado,
|
||||||
|
string _str_Campo1_Valor,
|
||||||
|
string _str_Campo2_Valor,
|
||||||
|
object _obj_Auxiliar,
|
||||||
|
List<INTERNO_CampoValor_Modelo> _lst_ListadoArgumentos_ParaMantemiento)
|
||||||
|
{
|
||||||
|
//TAREAPROGRAMADA
|
||||||
|
if(_str_Opcion.Equals(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA))
|
||||||
|
{
|
||||||
|
P_TareaProgramada frm_P_TareaProgramada = new P_TareaProgramada(_mdl_INTERNO_ValoresGenerales_Modelo, _dtt_FechaPorDefecto, _mdl_INTERNO_OpcionesDetalle_Modelo);
|
||||||
|
frm_P_TareaProgramada.P_Base_Campo_1 = _str_Campo1_Valor;
|
||||||
|
frm_P_TareaProgramada.P_Base_Campo_2 = _str_Campo2_Valor;
|
||||||
|
|
||||||
|
//Se llamo desde una pantalla
|
||||||
|
if (_frm_P_Base_Origen != null)
|
||||||
|
{
|
||||||
|
frm_P_TareaProgramada.P_Base_PantallaPadre_IdentificadorTAG = _frm_P_Base_Origen.Tag.ToString();
|
||||||
|
frm_P_TareaProgramada.P_Base_PantallaOrigen = _frm_P_Base_Origen;
|
||||||
|
}
|
||||||
|
//Se llamo desde un control F3
|
||||||
|
else
|
||||||
|
{
|
||||||
|
frm_P_TareaProgramada.P_Base_PantallaPadre_IdentificadorTAG = "";
|
||||||
|
frm_P_TareaProgramada.P_Base_F3Origen = _usc_Exferia_F3_Origen;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Modificar
|
||||||
|
if (_lng_RegistroSeleccionado > 0)
|
||||||
|
{
|
||||||
|
frm_P_TareaProgramada.P_Base_TituloPantalla_CaminoHormigas = _mdl_INTERNO_OpcionesDetalle_Modelo.descripcion_TituloMantenimiento.ToUpper();
|
||||||
|
frm_P_TareaProgramada.P_Base_id = _lng_RegistroSeleccionado;
|
||||||
|
frm_P_TareaProgramada.P_Base_TipoAperturaPantalla = 1;
|
||||||
|
}
|
||||||
|
//Alta
|
||||||
|
else
|
||||||
|
{
|
||||||
|
frm_P_TareaProgramada.P_Base_TipoAperturaPantalla = 0;
|
||||||
|
frm_P_TareaProgramada.P_Base_TituloPantalla_CaminoHormigas = _mdl_INTERNO_OpcionesDetalle_Modelo.descripcion_TituloMantenimiento.ToUpper() + " -> Alta";
|
||||||
|
}
|
||||||
|
|
||||||
|
Funciones_PanelPrincipal.Cargar_PantallaEmpotrada(frm_P_TareaProgramada, _str_Opcion);
|
||||||
|
}
|
||||||
|
//#########################################################################################
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Cargar_MantenimientoSimple(P_Base _frm_P_Base_Origen,
|
||||||
|
Exferia_F3 _usc_Exferia_F3_Origen,
|
||||||
|
INTERNO_OpcionesDetalle_Modelo _mdl_INTERNO_OpcionesDetalle_Modelo,
|
||||||
|
long _lng_RegistroSeleccionado,
|
||||||
|
P_MantenimientoSimple _frm_P_MantenimientoSimple,
|
||||||
|
string _str_Opcion)
|
||||||
|
{
|
||||||
|
if (_frm_P_Base_Origen != null)
|
||||||
|
{
|
||||||
|
_frm_P_MantenimientoSimple.P_Base_PantallaPadre_IdentificadorTAG = _frm_P_Base_Origen.Tag.ToString();
|
||||||
|
_frm_P_MantenimientoSimple.P_Base_PantallaOrigen = _frm_P_Base_Origen;
|
||||||
|
}
|
||||||
|
//Se llamo desde un control F3
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_frm_P_MantenimientoSimple.P_Base_PantallaPadre_IdentificadorTAG = "";
|
||||||
|
_frm_P_MantenimientoSimple.P_Base_F3Origen = _usc_Exferia_F3_Origen;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Modificar
|
||||||
|
if (_lng_RegistroSeleccionado > 0)
|
||||||
|
{
|
||||||
|
_frm_P_MantenimientoSimple.P_Base_TituloPantalla_CaminoHormigas = _mdl_INTERNO_OpcionesDetalle_Modelo.descripcion_TituloMantenimiento.ToUpper();
|
||||||
|
_frm_P_MantenimientoSimple.P_Base_id = _lng_RegistroSeleccionado;
|
||||||
|
_frm_P_MantenimientoSimple.P_Base_TipoAperturaPantalla = 1;
|
||||||
|
}
|
||||||
|
//Alta
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_frm_P_MantenimientoSimple.P_Base_TipoAperturaPantalla = 0;
|
||||||
|
_frm_P_MantenimientoSimple.P_Base_TituloPantalla_CaminoHormigas = _mdl_INTERNO_OpcionesDetalle_Modelo.descripcion_TituloMantenimiento.ToUpper() + " -> Alta";
|
||||||
|
}
|
||||||
|
|
||||||
|
Funciones_PanelPrincipal.Cargar_PantallaEmpotrada(_frm_P_MantenimientoSimple, _str_Opcion);
|
||||||
|
}
|
||||||
|
|
||||||
|
private dynamic OBTENER_REGISTRO(string _str_Opcion, long _lng_id, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual)
|
||||||
|
{
|
||||||
|
dynamic dnm_Valores = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//TAREAPROGRAMADA
|
||||||
|
if (_str_Opcion.Equals(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA))
|
||||||
|
{
|
||||||
|
KRO_TareasProgramadas_Datos obj_KRO_TareasProgramadas_Datos = new KRO_TareasProgramadas_Datos();
|
||||||
|
dnm_Valores = obj_KRO_TareasProgramadas_Datos.Obtener(_lng_id);
|
||||||
|
}
|
||||||
|
//TAREAPROGRAMADA_Historico
|
||||||
|
else if(_str_Opcion.Equals(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA_HISTORICO))
|
||||||
|
{
|
||||||
|
KRO_TareasProgramadas_Historico_Datos obj_KRO_TareasProgramadas_Historico_Datos = new KRO_TareasProgramadas_Historico_Datos();
|
||||||
|
dnm_Valores = obj_KRO_TareasProgramadas_Historico_Datos.Obtener(_lng_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{ }
|
||||||
|
catch (Exception)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
return dnm_Valores;
|
||||||
|
}
|
||||||
|
|
||||||
|
private dynamic GRABAR_REGISTRO(string _str_Opcion, dynamic _dnm_Modelo)
|
||||||
|
{
|
||||||
|
dynamic dnm_Valores = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//TAREAPROGRAMADA
|
||||||
|
if (_str_Opcion.Equals(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA))
|
||||||
|
{
|
||||||
|
KRO_TareasProgramadas_Datos obj_KRO_TareasProgramadas_Datos = new KRO_TareasProgramadas_Datos();
|
||||||
|
dnm_Valores = obj_KRO_TareasProgramadas_Datos.Grabar(dnm_Valores);
|
||||||
|
}
|
||||||
|
//TAREAPROGRAMADA_Historico
|
||||||
|
else if(_str_Opcion.Equals(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA_HISTORICO))
|
||||||
|
{
|
||||||
|
KRO_TareasProgramadas_Historico_Datos obj_KRO_TareasProgramadas_Historico_Datos = new KRO_TareasProgramadas_Historico_Datos();
|
||||||
|
dnm_Valores = obj_KRO_TareasProgramadas_Historico_Datos.Grabar(dnm_Valores);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{ }
|
||||||
|
catch (Exception)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
return dnm_Valores;
|
||||||
|
}
|
||||||
|
|
||||||
|
private dynamic BORRAR_REGISTRO(string _str_Opcion, long _lng_id)
|
||||||
|
{
|
||||||
|
dynamic dnm_Valores = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//TAREAPROGRAMADA
|
||||||
|
if (_str_Opcion.Equals(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA))
|
||||||
|
{
|
||||||
|
KRO_TareasProgramadas_Datos obj_KRO_TareasProgramadas_Datos = new KRO_TareasProgramadas_Datos();
|
||||||
|
dnm_Valores = obj_KRO_TareasProgramadas_Datos.Borrar(_lng_id);
|
||||||
|
|
||||||
|
#region SE MODIFICO TAREA
|
||||||
|
KRO_TareasProgramadas_Modificadas_Datos obj_KRO_TareasProgramadas_Modificadas_Datos = new KRO_TareasProgramadas_Modificadas_Datos();
|
||||||
|
obj_KRO_TareasProgramadas_Modificadas_Datos.Insertar(DateTime.Now);
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
//TAREAPROGRAMADA_Historico
|
||||||
|
else if (_str_Opcion.Equals(Variables.G_STR_OPCION_KRO_TAREAPROGRAMADA_HISTORICO))
|
||||||
|
{
|
||||||
|
KRO_TareasProgramadas_Historico_Datos obj_KRO_TareasProgramadas_Historico_Datos = new KRO_TareasProgramadas_Historico_Datos();
|
||||||
|
dnm_Valores = obj_KRO_TareasProgramadas_Historico_Datos.Borrar(_lng_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{ }
|
||||||
|
catch (Exception)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
return dnm_Valores;
|
||||||
|
}
|
||||||
|
|
||||||
|
private dynamic OBTENER_REGISTRO_TEXTBOXBUSQUEDA(string _str_Opcion, string _str_Filtro, string _str_CampoBusqueda, long _lng_idEmpresaSeleccionada, long _lng_idEjercicioActual)
|
||||||
|
{
|
||||||
|
dynamic dnm_Valor = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Control_Errores)
|
||||||
|
{ }
|
||||||
|
catch (Exception)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
return dnm_Valor;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ABS_TextBox_Busqueda OBTENCION_ABS_TEXTBOXBUSQUEDA(string _str_Opcion)
|
||||||
|
{
|
||||||
|
ABS_TextBox_Busqueda obj_ABS_TextBox_Busqueda = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return obj_ABS_TextBox_Busqueda;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// La información general de un ensamblado se controla mediante el siguiente
|
||||||
|
// conjunto de atributos. Cambie estos valores de atributo para modificar la información
|
||||||
|
// asociada con un ensamblado.
|
||||||
|
[assembly: AssemblyTitle("Exferia_Kronos")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("Exferia_Kronos")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles
|
||||||
|
// para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde
|
||||||
|
// COM, establezca el atributo ComVisible en true en este tipo.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// El siguiente GUID sirve como id. de typelib si este proyecto se expone a COM.
|
||||||
|
[assembly: Guid("79dc322b-22f1-47fa-95ef-bef62106f9f8")]
|
||||||
|
|
||||||
|
// La información de versión de un ensamblado consta de los cuatro valores siguientes:
|
||||||
|
//
|
||||||
|
// Versión principal
|
||||||
|
// Versión secundaria
|
||||||
|
// Número de compilación
|
||||||
|
// Revisión
|
||||||
|
//
|
||||||
|
// Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión
|
||||||
|
// mediante el carácter '*', como se muestra a continuación:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
||||||
|
|
@ -0,0 +1,320 @@
|
||||||
|
namespace Test
|
||||||
|
{
|
||||||
|
partial class Form1
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Variable del diseñador necesaria.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Limpiar los recursos que se estén usando.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true si los recursos administrados se deben desechar; false en caso contrario.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Código generado por el Diseñador de Windows Forms
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Método necesario para admitir el Diseñador. No se puede modificar
|
||||||
|
/// el contenido de este método con el editor de código.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.lbl_Perfil = new System.Windows.Forms.Label();
|
||||||
|
this.lbl_BaseDatos = new System.Windows.Forms.Label();
|
||||||
|
this.lbl_Servidor = new System.Windows.Forms.Label();
|
||||||
|
this.label8 = new System.Windows.Forms.Label();
|
||||||
|
this.btn_CambiarConexion = new System.Windows.Forms.Button();
|
||||||
|
this.label7 = new System.Windows.Forms.Label();
|
||||||
|
this.label6 = new System.Windows.Forms.Label();
|
||||||
|
this.cbo_Listado_Opcion = new System.Windows.Forms.ComboBox();
|
||||||
|
this.cbo_Mantenimiento_Opcion = new System.Windows.Forms.ComboBox();
|
||||||
|
this.btn_CodigoPrueba = new System.Windows.Forms.Button();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
|
this.txt_Mantenimiento_Libreria = new System.Windows.Forms.TextBox();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.txt_Listado_Libreria = new System.Windows.Forms.TextBox();
|
||||||
|
this.btn_Abrir_Mantenimiento = new System.Windows.Forms.Button();
|
||||||
|
this.btn_Abrir_Listado = new System.Windows.Forms.Button();
|
||||||
|
this.ex_msp_Menu = new Exferia_Controles.Exferia_MenuSuperior();
|
||||||
|
this.spl_Principal = new System.Windows.Forms.SplitContainer();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.spl_Principal)).BeginInit();
|
||||||
|
this.spl_Principal.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// lbl_Perfil
|
||||||
|
//
|
||||||
|
this.lbl_Perfil.AutoSize = true;
|
||||||
|
this.lbl_Perfil.Location = new System.Drawing.Point(1078, 85);
|
||||||
|
this.lbl_Perfil.Name = "lbl_Perfil";
|
||||||
|
this.lbl_Perfil.Size = new System.Drawing.Size(41, 13);
|
||||||
|
this.lbl_Perfil.TabIndex = 62;
|
||||||
|
this.lbl_Perfil.Text = "label11";
|
||||||
|
//
|
||||||
|
// lbl_BaseDatos
|
||||||
|
//
|
||||||
|
this.lbl_BaseDatos.AutoSize = true;
|
||||||
|
this.lbl_BaseDatos.Location = new System.Drawing.Point(1106, 67);
|
||||||
|
this.lbl_BaseDatos.Name = "lbl_BaseDatos";
|
||||||
|
this.lbl_BaseDatos.Size = new System.Drawing.Size(41, 13);
|
||||||
|
this.lbl_BaseDatos.TabIndex = 61;
|
||||||
|
this.lbl_BaseDatos.Text = "label10";
|
||||||
|
//
|
||||||
|
// lbl_Servidor
|
||||||
|
//
|
||||||
|
this.lbl_Servidor.AutoSize = true;
|
||||||
|
this.lbl_Servidor.Location = new System.Drawing.Point(1071, 52);
|
||||||
|
this.lbl_Servidor.Name = "lbl_Servidor";
|
||||||
|
this.lbl_Servidor.Size = new System.Drawing.Size(35, 13);
|
||||||
|
this.lbl_Servidor.TabIndex = 60;
|
||||||
|
this.lbl_Servidor.Text = "label9";
|
||||||
|
//
|
||||||
|
// label8
|
||||||
|
//
|
||||||
|
this.label8.AutoSize = true;
|
||||||
|
this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.label8.Location = new System.Drawing.Point(1007, 86);
|
||||||
|
this.label8.Name = "label8";
|
||||||
|
this.label8.Size = new System.Drawing.Size(65, 13);
|
||||||
|
this.label8.TabIndex = 59;
|
||||||
|
this.label8.Text = "IdUsuario:";
|
||||||
|
//
|
||||||
|
// btn_CambiarConexion
|
||||||
|
//
|
||||||
|
this.btn_CambiarConexion.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.btn_CambiarConexion.BackColor = System.Drawing.SystemColors.ActiveCaption;
|
||||||
|
this.btn_CambiarConexion.Location = new System.Drawing.Point(1221, 52);
|
||||||
|
this.btn_CambiarConexion.Name = "btn_CambiarConexion";
|
||||||
|
this.btn_CambiarConexion.Size = new System.Drawing.Size(104, 45);
|
||||||
|
this.btn_CambiarConexion.TabIndex = 58;
|
||||||
|
this.btn_CambiarConexion.Text = "CAMBIAR CONEXION";
|
||||||
|
this.btn_CambiarConexion.UseVisualStyleBackColor = false;
|
||||||
|
this.btn_CambiarConexion.Click += new System.EventHandler(this.btn_CambiarConexion_Click);
|
||||||
|
//
|
||||||
|
// label7
|
||||||
|
//
|
||||||
|
this.label7.AutoSize = true;
|
||||||
|
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.label7.Location = new System.Drawing.Point(1007, 67);
|
||||||
|
this.label7.Name = "label7";
|
||||||
|
this.label7.Size = new System.Drawing.Size(93, 13);
|
||||||
|
this.label7.TabIndex = 57;
|
||||||
|
this.label7.Text = "Dase de datos:";
|
||||||
|
//
|
||||||
|
// label6
|
||||||
|
//
|
||||||
|
this.label6.AutoSize = true;
|
||||||
|
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.label6.Location = new System.Drawing.Point(1007, 52);
|
||||||
|
this.label6.Name = "label6";
|
||||||
|
this.label6.Size = new System.Drawing.Size(58, 13);
|
||||||
|
this.label6.TabIndex = 56;
|
||||||
|
this.label6.Text = "Servidor:";
|
||||||
|
//
|
||||||
|
// cbo_Listado_Opcion
|
||||||
|
//
|
||||||
|
this.cbo_Listado_Opcion.FormattingEnabled = true;
|
||||||
|
this.cbo_Listado_Opcion.Items.AddRange(new object[] {
|
||||||
|
"KRO_TAREAPROGRAMADA"});
|
||||||
|
this.cbo_Listado_Opcion.Location = new System.Drawing.Point(67, 79);
|
||||||
|
this.cbo_Listado_Opcion.Name = "cbo_Listado_Opcion";
|
||||||
|
this.cbo_Listado_Opcion.Size = new System.Drawing.Size(273, 21);
|
||||||
|
this.cbo_Listado_Opcion.TabIndex = 55;
|
||||||
|
this.cbo_Listado_Opcion.Text = "KRO_TAREAPROGRAMADA";
|
||||||
|
//
|
||||||
|
// cbo_Mantenimiento_Opcion
|
||||||
|
//
|
||||||
|
this.cbo_Mantenimiento_Opcion.FormattingEnabled = true;
|
||||||
|
this.cbo_Mantenimiento_Opcion.Items.AddRange(new object[] {
|
||||||
|
"KRO_TAREAPROGRAMADA"});
|
||||||
|
this.cbo_Mantenimiento_Opcion.Location = new System.Drawing.Point(534, 78);
|
||||||
|
this.cbo_Mantenimiento_Opcion.Name = "cbo_Mantenimiento_Opcion";
|
||||||
|
this.cbo_Mantenimiento_Opcion.Size = new System.Drawing.Size(252, 21);
|
||||||
|
this.cbo_Mantenimiento_Opcion.TabIndex = 54;
|
||||||
|
//
|
||||||
|
// btn_CodigoPrueba
|
||||||
|
//
|
||||||
|
this.btn_CodigoPrueba.BackColor = System.Drawing.SystemColors.ActiveCaption;
|
||||||
|
this.btn_CodigoPrueba.Location = new System.Drawing.Point(920, 52);
|
||||||
|
this.btn_CodigoPrueba.Name = "btn_CodigoPrueba";
|
||||||
|
this.btn_CodigoPrueba.Size = new System.Drawing.Size(81, 45);
|
||||||
|
this.btn_CodigoPrueba.TabIndex = 53;
|
||||||
|
this.btn_CodigoPrueba.Text = "CODIGO PRUEBA";
|
||||||
|
this.btn_CodigoPrueba.UseVisualStyleBackColor = false;
|
||||||
|
this.btn_CodigoPrueba.Click += new System.EventHandler(this.btn_CodigoPrueba_Click);
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(487, 85);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(41, 13);
|
||||||
|
this.label3.TabIndex = 52;
|
||||||
|
this.label3.Text = "Opcion";
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Location = new System.Drawing.Point(487, 56);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(41, 13);
|
||||||
|
this.label4.TabIndex = 51;
|
||||||
|
this.label4.Text = "Libreria";
|
||||||
|
//
|
||||||
|
// txt_Mantenimiento_Libreria
|
||||||
|
//
|
||||||
|
this.txt_Mantenimiento_Libreria.Location = new System.Drawing.Point(534, 52);
|
||||||
|
this.txt_Mantenimiento_Libreria.Name = "txt_Mantenimiento_Libreria";
|
||||||
|
this.txt_Mantenimiento_Libreria.Size = new System.Drawing.Size(252, 20);
|
||||||
|
this.txt_Mantenimiento_Libreria.TabIndex = 50;
|
||||||
|
this.txt_Mantenimiento_Libreria.Text = "Exferia_Kronos";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(20, 86);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(41, 13);
|
||||||
|
this.label2.TabIndex = 49;
|
||||||
|
this.label2.Text = "Opcion";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(20, 57);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(41, 13);
|
||||||
|
this.label1.TabIndex = 48;
|
||||||
|
this.label1.Text = "Libreria";
|
||||||
|
//
|
||||||
|
// txt_Listado_Libreria
|
||||||
|
//
|
||||||
|
this.txt_Listado_Libreria.Location = new System.Drawing.Point(67, 53);
|
||||||
|
this.txt_Listado_Libreria.Name = "txt_Listado_Libreria";
|
||||||
|
this.txt_Listado_Libreria.Size = new System.Drawing.Size(273, 20);
|
||||||
|
this.txt_Listado_Libreria.TabIndex = 47;
|
||||||
|
this.txt_Listado_Libreria.Text = "Exferia_Kronos";
|
||||||
|
//
|
||||||
|
// btn_Abrir_Mantenimiento
|
||||||
|
//
|
||||||
|
this.btn_Abrir_Mantenimiento.BackColor = System.Drawing.SystemColors.ActiveCaption;
|
||||||
|
this.btn_Abrir_Mantenimiento.Location = new System.Drawing.Point(794, 50);
|
||||||
|
this.btn_Abrir_Mantenimiento.Name = "btn_Abrir_Mantenimiento";
|
||||||
|
this.btn_Abrir_Mantenimiento.Size = new System.Drawing.Size(120, 47);
|
||||||
|
this.btn_Abrir_Mantenimiento.TabIndex = 46;
|
||||||
|
this.btn_Abrir_Mantenimiento.Text = "ABRIR MANTENIMIENTO";
|
||||||
|
this.btn_Abrir_Mantenimiento.UseVisualStyleBackColor = false;
|
||||||
|
this.btn_Abrir_Mantenimiento.Click += new System.EventHandler(this.btn_Abrir_Mantenimiento_Click);
|
||||||
|
//
|
||||||
|
// btn_Abrir_Listado
|
||||||
|
//
|
||||||
|
this.btn_Abrir_Listado.BackColor = System.Drawing.SystemColors.ActiveCaption;
|
||||||
|
this.btn_Abrir_Listado.Location = new System.Drawing.Point(346, 53);
|
||||||
|
this.btn_Abrir_Listado.Name = "btn_Abrir_Listado";
|
||||||
|
this.btn_Abrir_Listado.Size = new System.Drawing.Size(111, 47);
|
||||||
|
this.btn_Abrir_Listado.TabIndex = 45;
|
||||||
|
this.btn_Abrir_Listado.Text = "ABRIR LISTADO";
|
||||||
|
this.btn_Abrir_Listado.UseVisualStyleBackColor = false;
|
||||||
|
this.btn_Abrir_Listado.Click += new System.EventHandler(this.btn_Abrir_Listado_Click);
|
||||||
|
//
|
||||||
|
// ex_msp_Menu
|
||||||
|
//
|
||||||
|
this.ex_msp_Menu.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.ex_msp_Menu.BackColor = System.Drawing.Color.Maroon;
|
||||||
|
this.ex_msp_Menu.Exferia_MenuSuperior_Total_NumeroProcesosAbiertos = "0";
|
||||||
|
this.ex_msp_Menu.Location = new System.Drawing.Point(12, 12);
|
||||||
|
this.ex_msp_Menu.Name = "ex_msp_Menu";
|
||||||
|
this.ex_msp_Menu.Size = new System.Drawing.Size(1309, 35);
|
||||||
|
this.ex_msp_Menu.TabIndex = 63;
|
||||||
|
//
|
||||||
|
// spl_Principal
|
||||||
|
//
|
||||||
|
this.spl_Principal.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.spl_Principal.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
this.spl_Principal.Location = new System.Drawing.Point(12, 116);
|
||||||
|
this.spl_Principal.Name = "spl_Principal";
|
||||||
|
//
|
||||||
|
// spl_Principal.Panel1
|
||||||
|
//
|
||||||
|
this.spl_Principal.Panel1.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
//
|
||||||
|
// spl_Principal.Panel2
|
||||||
|
//
|
||||||
|
this.spl_Principal.Panel2.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.spl_Principal.Size = new System.Drawing.Size(1309, 619);
|
||||||
|
this.spl_Principal.SplitterDistance = 652;
|
||||||
|
this.spl_Principal.TabIndex = 64;
|
||||||
|
//
|
||||||
|
// Form1
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(1350, 747);
|
||||||
|
this.Controls.Add(this.spl_Principal);
|
||||||
|
this.Controls.Add(this.ex_msp_Menu);
|
||||||
|
this.Controls.Add(this.lbl_Perfil);
|
||||||
|
this.Controls.Add(this.lbl_BaseDatos);
|
||||||
|
this.Controls.Add(this.lbl_Servidor);
|
||||||
|
this.Controls.Add(this.label8);
|
||||||
|
this.Controls.Add(this.btn_CambiarConexion);
|
||||||
|
this.Controls.Add(this.label7);
|
||||||
|
this.Controls.Add(this.label6);
|
||||||
|
this.Controls.Add(this.cbo_Listado_Opcion);
|
||||||
|
this.Controls.Add(this.cbo_Mantenimiento_Opcion);
|
||||||
|
this.Controls.Add(this.btn_CodigoPrueba);
|
||||||
|
this.Controls.Add(this.label3);
|
||||||
|
this.Controls.Add(this.label4);
|
||||||
|
this.Controls.Add(this.txt_Mantenimiento_Libreria);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.txt_Listado_Libreria);
|
||||||
|
this.Controls.Add(this.btn_Abrir_Mantenimiento);
|
||||||
|
this.Controls.Add(this.btn_Abrir_Listado);
|
||||||
|
this.Name = "Form1";
|
||||||
|
this.Text = "Form1";
|
||||||
|
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.spl_Principal)).EndInit();
|
||||||
|
this.spl_Principal.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label lbl_Perfil;
|
||||||
|
private System.Windows.Forms.Label lbl_BaseDatos;
|
||||||
|
private System.Windows.Forms.Label lbl_Servidor;
|
||||||
|
private System.Windows.Forms.Label label8;
|
||||||
|
private System.Windows.Forms.Button btn_CambiarConexion;
|
||||||
|
private System.Windows.Forms.Label label7;
|
||||||
|
private System.Windows.Forms.Label label6;
|
||||||
|
private System.Windows.Forms.ComboBox cbo_Listado_Opcion;
|
||||||
|
private System.Windows.Forms.ComboBox cbo_Mantenimiento_Opcion;
|
||||||
|
private System.Windows.Forms.Button btn_CodigoPrueba;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.TextBox txt_Mantenimiento_Libreria;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.TextBox txt_Listado_Libreria;
|
||||||
|
private System.Windows.Forms.Button btn_Abrir_Mantenimiento;
|
||||||
|
private System.Windows.Forms.Button btn_Abrir_Listado;
|
||||||
|
private Exferia_Controles.Exferia_MenuSuperior ex_msp_Menu;
|
||||||
|
private System.Windows.Forms.SplitContainer spl_Principal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,249 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_Aplicacion.Visualizacion;
|
||||||
|
using Exferia_General;
|
||||||
|
using Exferia_Kronos;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
|
namespace Test
|
||||||
|
{
|
||||||
|
public partial class Form1 : Form
|
||||||
|
{
|
||||||
|
private string g_str_RUTA = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\XML_DatosPrueba.xml";
|
||||||
|
private string g_str_idUsuario = "";
|
||||||
|
|
||||||
|
public Form1()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
if (!File.Exists(g_str_RUTA))
|
||||||
|
{
|
||||||
|
CrearXML();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Cargar_ValoresXML();
|
||||||
|
|
||||||
|
lbl_Servidor.Text = Variables.G_STR_CONEXION_SERVIDOR;
|
||||||
|
lbl_BaseDatos.Text = Variables.G_STR_CONEXION_BASEDATOS;
|
||||||
|
lbl_Perfil.Text = g_str_idUsuario;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Asignar Colores de Exferia ..................................................................
|
||||||
|
Colores.G_COLOR_FONDO_BOTON = Color.Transparent;
|
||||||
|
Colores.G_COLOR_PRINCIPAL_BASE = ColorTranslator.FromHtml("#A19CC3");
|
||||||
|
Colores.G_COLOR_PRINCIPAL_OSCURO = ColorTranslator.FromHtml("#504888");
|
||||||
|
Colores.G_COLOR_PRINCIPAL_ATENUADO = ColorTranslator.FromHtml("#CBC8DF");
|
||||||
|
Colores.G_COLOR_PRINCIPAL_CLARO = ColorTranslator.FromHtml("#EDECF4");
|
||||||
|
Colores.G_COLOR_PRINCIPAL_TRASLUCIDO = Color.FromArgb(50, 191, 186, 225);
|
||||||
|
Colores.G_COLOR_SECUNDARIO_BASE = ColorTranslator.FromHtml("#FFF2C4");
|
||||||
|
Colores.G_COLOR_SECUNDARIO_CLARO = ColorTranslator.FromHtml("#FFF9E1");
|
||||||
|
Colores.G_COLOR_FONDO_BASE = ColorTranslator.FromHtml("#FFFFFF");
|
||||||
|
Colores.G_COLOR_TEXTO_ESCRITO = ColorTranslator.FromHtml("#000000");
|
||||||
|
Colores.G_COLOR_ATENCION = ColorTranslator.FromHtml("#c40909");
|
||||||
|
Colores.G_COLOR_KAIROSPRO_FICHAJE_BORDE_CELDA = ColorTranslator.FromHtml("#A19CC3");
|
||||||
|
|
||||||
|
Colores.G_COLOR_FONDO_BARRAPROGRESO_RELLENA = ColorTranslator.FromHtml("#504888");
|
||||||
|
|
||||||
|
//Listados
|
||||||
|
Colores.G_COLOR_LISTADO_FILTROS = Color.FromArgb(50, 161, 156, 195);
|
||||||
|
Colores.G_COLOR_LISTADO_FILTROS_CONTROLESPERSONALIZADOS = Color.FromArgb(70, 161, 156, 195);
|
||||||
|
|
||||||
|
|
||||||
|
//Usuario Validado .......................................................
|
||||||
|
INTERNO_UsuarioValidado_Modelo mdl_INTERNO_UsuarioValidado_Modelo = new INTERNO_UsuarioValidado_Modelo();
|
||||||
|
mdl_INTERNO_UsuarioValidado_Modelo.id = long.Parse(g_str_idUsuario != "" ? g_str_idUsuario : "0");//410
|
||||||
|
mdl_INTERNO_UsuarioValidado_Modelo.idPerfil = null;
|
||||||
|
mdl_INTERNO_UsuarioValidado_Modelo.nombre = "EXFERIA";
|
||||||
|
mdl_INTERNO_UsuarioValidado_Modelo.sincronizacionAthos = false;
|
||||||
|
mdl_INTERNO_UsuarioValidado_Modelo.esSuperUsuario = false;
|
||||||
|
|
||||||
|
Variables.G_MDL_USUARIOVALIDADO_MODELO = mdl_INTERNO_UsuarioValidado_Modelo;
|
||||||
|
|
||||||
|
//Delegacion
|
||||||
|
Variables.G_DTT_FECHA_INICIAL_PORDEFECTO = new DateTime(2022, 05, 1);
|
||||||
|
|
||||||
|
Variables.G_MDL_INTERNO_VALORESGENERALES_MODELO = null;
|
||||||
|
INTERNO_ValoresGenerales_Modelo mdl_INTERNO_ValoresGenerales_Modelo = Datos_Generales.GEN_ValoresGenerales_Obtener_Por_IdUsuario(Variables.G_MDL_USUARIOVALIDADO_MODELO.id);
|
||||||
|
if (mdl_INTERNO_ValoresGenerales_Modelo != null)
|
||||||
|
{
|
||||||
|
mdl_INTERNO_ValoresGenerales_Modelo = Datos_Generales.GEN_EjerciciosActivos_Empresa_Validar(mdl_INTERNO_ValoresGenerales_Modelo, Variables.G_DTT_FECHA_INICIAL_PORDEFECTO);
|
||||||
|
if (mdl_INTERNO_ValoresGenerales_Modelo != null)
|
||||||
|
{
|
||||||
|
Variables.G_MDL_INTERNO_VALORESGENERALES_MODELO = mdl_INTERNO_ValoresGenerales_Modelo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Variable con el codigo del cliente de la ExferiaStore
|
||||||
|
Variables.G_LNG_IDCLIENTE_LICENCIAVALIDADO = 37;
|
||||||
|
|
||||||
|
//Cargar XML Configuracion pantallas
|
||||||
|
Funciones_FicherosXML.CargarDatosXML_ConfiguracionPantallas();
|
||||||
|
|
||||||
|
Datos_Generales.PRV_OpcionesDetalle_Cargar();
|
||||||
|
|
||||||
|
Repintar.Empezar(this);
|
||||||
|
|
||||||
|
Variables.G_SPL_PANTALLASPRINCIPAL = spl_Principal;
|
||||||
|
Variables.G_PNL_PANTALLASEMPOTRADAS = spl_Principal.Panel1;
|
||||||
|
Variables.G_PNL_PANTALLASEMPOTRADAS_SECUNDARIA = spl_Principal.Panel2;
|
||||||
|
Variables.G_EMS_CONTROL_MENUSUPERIOR = ex_msp_Menu;
|
||||||
|
|
||||||
|
Funciones_PanelSecundario.Rellenar_Listados_ArbolSecundarioSeleccion();
|
||||||
|
|
||||||
|
//calcular distancia del splitter
|
||||||
|
spl_Principal.SplitterDistance = this.Width / 2;
|
||||||
|
spl_Principal.Panel2Collapsed = true;
|
||||||
|
|
||||||
|
Datos_Generales.Permisos_Cargar();
|
||||||
|
|
||||||
|
//Provicional es para cargar los tipos procesos que iran en aplicacion
|
||||||
|
Funciones_Procesos.Rellenar_Procesos();
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Botones
|
||||||
|
private void btn_Abrir_Listado_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string str_NombreLibreria = txt_Listado_Libreria.Text;
|
||||||
|
string str_Opcion = cbo_Listado_Opcion.Text;
|
||||||
|
|
||||||
|
if (str_Opcion != "")
|
||||||
|
{
|
||||||
|
//Cargamos el ensamblado
|
||||||
|
Assembly m_assembly = Assembly.LoadFrom(Variables.G_STR_LIBRERIA_RUTAINICIAL + @"\" + str_NombreLibreria + ".dll");
|
||||||
|
//Obtenemos el tipo de la clase
|
||||||
|
Type m_type = m_assembly.GetType(str_NombreLibreria + "." + Variables.G_STR_LIBRERIA_OPCIONES);
|
||||||
|
//creamos la instancia
|
||||||
|
var obj_Clase = Activator.CreateInstance(m_type);
|
||||||
|
//Cargamos el metodo solicitado
|
||||||
|
MethodInfo obj_MethodInfo = obj_Clase.GetType().GetMethod(Variables.G_STR_LIBRERIA_OPCIONES_PROCEDIMIENTO_CARGAR_LISTADO, BindingFlags.Instance | BindingFlags.NonPublic);
|
||||||
|
|
||||||
|
//Obtener valores
|
||||||
|
object[] arr_Parametros = { str_Opcion, false, 0, null, Variables.G_MDL_INTERNO_VALORESGENERALES_MODELO, Variables.G_DTT_FECHA_INICIAL_PORDEFECTO, "", "", false, false, null, null, null ,null,null,null};
|
||||||
|
//Pasamos los parametros al metodo y lo ejecutamos
|
||||||
|
obj_MethodInfo.Invoke(obj_Clase, arr_Parametros);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btn_Abrir_Mantenimiento_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string str_NombreLibreria = txt_Mantenimiento_Libreria.Text;
|
||||||
|
string str_Opcion = cbo_Mantenimiento_Opcion.Text;
|
||||||
|
|
||||||
|
INTERNO_OpcionesDetalle_Modelo mdl_INTERNO_OpcionesDetalle_Modelo = Datos_Generales.PRV_Opciones_Buscar_Detalles(str_Opcion);
|
||||||
|
|
||||||
|
//Cargamos el ensamblado
|
||||||
|
Assembly m_assembly = Assembly.LoadFrom(Variables.G_STR_LIBRERIA_RUTAINICIAL + @"\" + str_NombreLibreria + ".dll");
|
||||||
|
//Obtenemos el tipo de la clase
|
||||||
|
Type m_type = m_assembly.GetType(str_NombreLibreria + "." + Variables.G_STR_LIBRERIA_OPCIONES);
|
||||||
|
//creamos la instancia
|
||||||
|
var obj_Clase = Activator.CreateInstance(m_type);
|
||||||
|
//Cargamos el metodo solicitado
|
||||||
|
MethodInfo obj_MethodInfo = obj_Clase.GetType().GetMethod(Variables.G_STR_LIBRERIA_OPCIONES_PROCEDIMIENTO_MOSTRAR_EN_MANTENIMIENTO, BindingFlags.Instance | BindingFlags.NonPublic);
|
||||||
|
|
||||||
|
object[] arr_Parametros = { str_Opcion,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
Variables.G_MDL_INTERNO_VALORESGENERALES_MODELO,
|
||||||
|
Variables.G_DTT_FECHA_INICIAL_PORDEFECTO,
|
||||||
|
mdl_INTERNO_OpcionesDetalle_Modelo,
|
||||||
|
102638,
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
null,
|
||||||
|
null};
|
||||||
|
//Pasamos los parametros al metodo y lo ejecutamos
|
||||||
|
obj_MethodInfo.Invoke(obj_Clase, arr_Parametros);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btn_CodigoPrueba_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
/* Datos_Kronos obj_Datos_Kronos = new Datos_Kronos();
|
||||||
|
obj_Datos_Kronos.TareasProgramadas_Obtener();*/
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btn_CambiarConexion_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AbrirPantallaConexion();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private void CrearXML()
|
||||||
|
{
|
||||||
|
FileStream fls_CrearFichero = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Creamos el fichero
|
||||||
|
fls_CrearFichero = new FileStream(g_str_RUTA, FileMode.Create);
|
||||||
|
|
||||||
|
fls_CrearFichero.Close();
|
||||||
|
|
||||||
|
//Ahora crearemos la estructura del XML
|
||||||
|
XmlDocument Documento = new XmlDocument();
|
||||||
|
XmlNode xn_Declaration = Documento.CreateXmlDeclaration("1.0", "UTF-8", "yes");
|
||||||
|
Documento.AppendChild(xn_Declaration);
|
||||||
|
//Nodo Padre
|
||||||
|
XmlNode xn_NodoPrincipal = Documento.CreateElement("Datos");
|
||||||
|
Documento.AppendChild(xn_NodoPrincipal);
|
||||||
|
//Nodos Hijos
|
||||||
|
XmlNode xn_Servidor = Documento.CreateElement("servidor");
|
||||||
|
XmlNode xn_BaseDatos = Documento.CreateElement("basedatos");
|
||||||
|
XmlNode xn_Usuario = Documento.CreateElement("usuario");
|
||||||
|
XmlNode xn_Clave = Documento.CreateElement("clave");
|
||||||
|
XmlNode xn_Perfil = Documento.CreateElement("idusuario");
|
||||||
|
|
||||||
|
xn_NodoPrincipal.AppendChild(xn_Servidor);
|
||||||
|
xn_NodoPrincipal.AppendChild(xn_BaseDatos);
|
||||||
|
xn_NodoPrincipal.AppendChild(xn_Usuario);
|
||||||
|
xn_NodoPrincipal.AppendChild(xn_Clave);
|
||||||
|
xn_NodoPrincipal.AppendChild(xn_Perfil);
|
||||||
|
|
||||||
|
Documento.Save(g_str_RUTA);
|
||||||
|
|
||||||
|
AbrirPantallaConexion();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Cargar_ValoresXML()
|
||||||
|
{
|
||||||
|
XmlDocument Documento = new XmlDocument();
|
||||||
|
Documento.Load(g_str_RUTA);
|
||||||
|
|
||||||
|
//Nodo principal
|
||||||
|
XmlNode obj_NodoPadre = Documento.GetElementsByTagName("Datos")[0];
|
||||||
|
|
||||||
|
Variables.G_STR_CONEXION_SERVIDOR = obj_NodoPadre["servidor"].InnerText;
|
||||||
|
Variables.G_STR_CONEXION_BASEDATOS = obj_NodoPadre["basedatos"].InnerText;
|
||||||
|
Variables.G_STR_CONEXION_USUARIO = obj_NodoPadre["usuario"].InnerText;
|
||||||
|
Variables.G_STR_CONEXION_CLAVE = obj_NodoPadre["clave"].InnerText;
|
||||||
|
g_str_idUsuario = obj_NodoPadre["idusuario"].InnerText;
|
||||||
|
|
||||||
|
if (Variables.G_STR_CONEXION_SERVIDOR.Equals("") || g_str_idUsuario.Equals(""))
|
||||||
|
{
|
||||||
|
AbrirPantallaConexion();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AbrirPantallaConexion()
|
||||||
|
{
|
||||||
|
Form2 frm_Conexion = new Form2(Variables.G_STR_CONEXION_SERVIDOR, Variables.G_STR_CONEXION_BASEDATOS, Variables.G_STR_CONEXION_USUARIO, Variables.G_STR_CONEXION_CLAVE, g_str_idUsuario);
|
||||||
|
frm_Conexion.StartPosition = FormStartPosition.CenterParent;
|
||||||
|
frm_Conexion.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
|
|
@ -0,0 +1,172 @@
|
||||||
|
namespace Test
|
||||||
|
{
|
||||||
|
partial class Form2
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.txt_IdUsuario = new System.Windows.Forms.TextBox();
|
||||||
|
this.label5 = new System.Windows.Forms.Label();
|
||||||
|
this.btn_Actualizar = new System.Windows.Forms.Button();
|
||||||
|
this.txt_Clave = new System.Windows.Forms.TextBox();
|
||||||
|
this.txt_Usuario = new System.Windows.Forms.TextBox();
|
||||||
|
this.txt_BaseDatos = new System.Windows.Forms.TextBox();
|
||||||
|
this.txt_Servidor = new System.Windows.Forms.TextBox();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// txt_IdUsuario
|
||||||
|
//
|
||||||
|
this.txt_IdUsuario.Location = new System.Drawing.Point(102, 175);
|
||||||
|
this.txt_IdUsuario.Name = "txt_IdUsuario";
|
||||||
|
this.txt_IdUsuario.Size = new System.Drawing.Size(89, 20);
|
||||||
|
this.txt_IdUsuario.TabIndex = 29;
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.AutoSize = true;
|
||||||
|
this.label5.Location = new System.Drawing.Point(15, 178);
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.Size = new System.Drawing.Size(52, 13);
|
||||||
|
this.label5.TabIndex = 30;
|
||||||
|
this.label5.Text = "IdUsuario";
|
||||||
|
//
|
||||||
|
// btn_Actualizar
|
||||||
|
//
|
||||||
|
this.btn_Actualizar.Location = new System.Drawing.Point(147, 220);
|
||||||
|
this.btn_Actualizar.Name = "btn_Actualizar";
|
||||||
|
this.btn_Actualizar.Size = new System.Drawing.Size(75, 28);
|
||||||
|
this.btn_Actualizar.TabIndex = 31;
|
||||||
|
this.btn_Actualizar.Text = "Actualizar";
|
||||||
|
this.btn_Actualizar.UseVisualStyleBackColor = true;
|
||||||
|
this.btn_Actualizar.Click += new System.EventHandler(this.btn_Actualizar_Click);
|
||||||
|
//
|
||||||
|
// txt_Clave
|
||||||
|
//
|
||||||
|
this.txt_Clave.Location = new System.Drawing.Point(102, 136);
|
||||||
|
this.txt_Clave.Name = "txt_Clave";
|
||||||
|
this.txt_Clave.Size = new System.Drawing.Size(147, 20);
|
||||||
|
this.txt_Clave.TabIndex = 28;
|
||||||
|
//
|
||||||
|
// txt_Usuario
|
||||||
|
//
|
||||||
|
this.txt_Usuario.Location = new System.Drawing.Point(102, 98);
|
||||||
|
this.txt_Usuario.Name = "txt_Usuario";
|
||||||
|
this.txt_Usuario.Size = new System.Drawing.Size(147, 20);
|
||||||
|
this.txt_Usuario.TabIndex = 27;
|
||||||
|
//
|
||||||
|
// txt_BaseDatos
|
||||||
|
//
|
||||||
|
this.txt_BaseDatos.Location = new System.Drawing.Point(102, 61);
|
||||||
|
this.txt_BaseDatos.Name = "txt_BaseDatos";
|
||||||
|
this.txt_BaseDatos.Size = new System.Drawing.Size(147, 20);
|
||||||
|
this.txt_BaseDatos.TabIndex = 26;
|
||||||
|
//
|
||||||
|
// txt_Servidor
|
||||||
|
//
|
||||||
|
this.txt_Servidor.Location = new System.Drawing.Point(102, 25);
|
||||||
|
this.txt_Servidor.Name = "txt_Servidor";
|
||||||
|
this.txt_Servidor.Size = new System.Drawing.Size(147, 20);
|
||||||
|
this.txt_Servidor.TabIndex = 25;
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Location = new System.Drawing.Point(15, 139);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(61, 13);
|
||||||
|
this.label4.TabIndex = 24;
|
||||||
|
this.label4.Text = "Contraseña";
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(12, 64);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(75, 13);
|
||||||
|
this.label3.TabIndex = 23;
|
||||||
|
this.label3.Text = "Base de datos";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(15, 101);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(43, 13);
|
||||||
|
this.label2.TabIndex = 22;
|
||||||
|
this.label2.Text = "Usuario";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(12, 28);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(46, 13);
|
||||||
|
this.label1.TabIndex = 21;
|
||||||
|
this.label1.Text = "Servidor";
|
||||||
|
//
|
||||||
|
// Form2
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(274, 278);
|
||||||
|
this.Controls.Add(this.txt_IdUsuario);
|
||||||
|
this.Controls.Add(this.label5);
|
||||||
|
this.Controls.Add(this.btn_Actualizar);
|
||||||
|
this.Controls.Add(this.txt_Clave);
|
||||||
|
this.Controls.Add(this.txt_Usuario);
|
||||||
|
this.Controls.Add(this.txt_BaseDatos);
|
||||||
|
this.Controls.Add(this.txt_Servidor);
|
||||||
|
this.Controls.Add(this.label4);
|
||||||
|
this.Controls.Add(this.label3);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Name = "Form2";
|
||||||
|
this.Text = "Form2";
|
||||||
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form2_FormClosing);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TextBox txt_IdUsuario;
|
||||||
|
private System.Windows.Forms.Label label5;
|
||||||
|
private System.Windows.Forms.Button btn_Actualizar;
|
||||||
|
private System.Windows.Forms.TextBox txt_Clave;
|
||||||
|
private System.Windows.Forms.TextBox txt_Usuario;
|
||||||
|
private System.Windows.Forms.TextBox txt_BaseDatos;
|
||||||
|
private System.Windows.Forms.TextBox txt_Servidor;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
|
namespace Test
|
||||||
|
{
|
||||||
|
public partial class Form2 : Form
|
||||||
|
{
|
||||||
|
private string g_str_RUTA = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\XML_DatosPrueba.xml";
|
||||||
|
|
||||||
|
public Form2(string _str_Servidor, string _str_BaseDatos, string _str_Usuario, string _str_Clave, string _str_IdUsuario)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
txt_Servidor.Text = _str_Servidor;
|
||||||
|
txt_BaseDatos.Text = _str_BaseDatos;
|
||||||
|
txt_Usuario.Text = _str_Usuario;
|
||||||
|
txt_Clave.Text = _str_Clave;
|
||||||
|
txt_IdUsuario.Text = _str_IdUsuario;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btn_Actualizar_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
XmlDocument XDox = new XmlDocument();
|
||||||
|
|
||||||
|
XDox.Load(g_str_RUTA);
|
||||||
|
|
||||||
|
XmlNode obj_NodoPadre = XDox.GetElementsByTagName("Datos")[0];
|
||||||
|
|
||||||
|
obj_NodoPadre["servidor"].InnerText = txt_Servidor.Text;
|
||||||
|
obj_NodoPadre["basedatos"].InnerText = txt_BaseDatos.Text;
|
||||||
|
obj_NodoPadre["usuario"].InnerText = txt_Usuario.Text;
|
||||||
|
obj_NodoPadre["clave"].InnerText = txt_Clave.Text;
|
||||||
|
obj_NodoPadre["idusuario"].InnerText = txt_IdUsuario.Text;
|
||||||
|
|
||||||
|
XDox.Save(g_str_RUTA);
|
||||||
|
|
||||||
|
Application.Restart();
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Form2_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
|
{
|
||||||
|
Application.Exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Test
|
||||||
|
{
|
||||||
|
static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Punto de entrada principal para la aplicación.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new Form1());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// La información general de un ensamblado se controla mediante el siguiente
|
||||||
|
// conjunto de atributos. Cambie estos valores de atributo para modificar la información
|
||||||
|
// asociada con un ensamblado.
|
||||||
|
[assembly: AssemblyTitle("Test")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("Test")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles
|
||||||
|
// para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde
|
||||||
|
// COM, establezca el atributo ComVisible en true en este tipo.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// El siguiente GUID sirve como id. de typelib si este proyecto se expone a COM.
|
||||||
|
[assembly: Guid("a7dac7f3-a963-462a-846f-fa4b8433542b")]
|
||||||
|
|
||||||
|
// La información de versión de un ensamblado consta de los cuatro valores siguientes:
|
||||||
|
//
|
||||||
|
// Versión principal
|
||||||
|
// Versión secundaria
|
||||||
|
// Número de compilación
|
||||||
|
// Revisión
|
||||||
|
//
|
||||||
|
// Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión
|
||||||
|
// mediante el carácter '*', como se muestra a continuación:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Este código fue generado por una herramienta.
|
||||||
|
// Versión de runtime: 4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Los cambios de este archivo pueden provocar un comportamiento inesperado y se perderán si
|
||||||
|
// el código se vuelve a generar.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace Test.Properties
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clase de recurso fuertemente tipado para buscar cadenas traducidas, etc.
|
||||||
|
/// </summary>
|
||||||
|
// StronglyTypedResourceBuilder generó automáticamente esta clase
|
||||||
|
// a través de una herramienta como ResGen o Visual Studio.
|
||||||
|
// Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
|
||||||
|
// con la opción /str o recompile su proyecto de VS.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources
|
||||||
|
{
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Devuelve la instancia ResourceManager almacenada en caché utilizada por esta clase.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if ((resourceMan == null))
|
||||||
|
{
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Test.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Invalida la propiedad CurrentUICulture del subproceso actual para todas las
|
||||||
|
/// búsquedas de recursos usando esta clase de recursos fuertemente tipados.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace Test.Properties
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||||
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||||
|
{
|
||||||
|
|
||||||
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
|
public static Settings Default
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{A7DAC7F3-A963-462A-846F-FA4B8433542B}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>Test</RootNamespace>
|
||||||
|
<AssemblyName>Test</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Exferia_Aplicacion">
|
||||||
|
<HintPath>..\..\..\DLL\Exferia_Aplicacion.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Exferia_Controles">
|
||||||
|
<HintPath>..\..\..\DLL\Exferia_Controles.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Exferia_Formularios">
|
||||||
|
<HintPath>..\..\..\DLL\Exferia_Formularios.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Exferia_General">
|
||||||
|
<HintPath>..\..\..\DLL\Exferia_General.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Exferia_Kronos">
|
||||||
|
<HintPath>..\Exferia_Kronos\bin\Debug\Exferia_Kronos.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Form1.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Form1.Designer.cs">
|
||||||
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Form2.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Form2.Designer.cs">
|
||||||
|
<DependentUpon>Form2.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<EmbeddedResource Include="Form1.resx">
|
||||||
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 14
|
||||||
|
VisualStudioVersion = 14.0.25420.1
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exferia_Maestros", "Exferia_Maestros\Exferia_Maestros.csproj", "{8FA50137-6506-49E1-8F04-1E433943C82C}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj", "{4469D73A-CE0D-4923-AB9C-F44E86B7EF75}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{8FA50137-6506-49E1-8F04-1E433943C82C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{8FA50137-6506-49E1-8F04-1E433943C82C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{8FA50137-6506-49E1-8F04-1E433943C82C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{8FA50137-6506-49E1-8F04-1E433943C82C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{4469D73A-CE0D-4923-AB9C-F44E86B7EF75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{4469D73A-CE0D-4923-AB9C-F44E86B7EF75}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{4469D73A-CE0D-4923-AB9C-F44E86B7EF75}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{4469D73A-CE0D-4923-AB9C-F44E86B7EF75}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_AUX_Calculos_ArticulosEmbalajes_Modelo
|
||||||
|
{
|
||||||
|
public INTERNO_AUX_Calculos_ArticulosEmbalajes_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public INTERNO_AUX_Calculos_ArticulosEmbalajes_Modelo(decimal _dcm_Cantidad,
|
||||||
|
long _lng_IdNomenclatura,
|
||||||
|
decimal _dcm_Precio,
|
||||||
|
bool _bol_EsRelacional,
|
||||||
|
int _int_Precio_Cantidad_SegundaUnidad,
|
||||||
|
decimal? _dcm_Cantidad_SegundaUnidad)
|
||||||
|
{
|
||||||
|
Cantidad = _dcm_Cantidad;
|
||||||
|
IdNomenclatura = _lng_IdNomenclatura;
|
||||||
|
Precio = _dcm_Precio;
|
||||||
|
EsRelacional = _bol_EsRelacional;
|
||||||
|
Precio_Cantidad_SegundaUnidad = _int_Precio_Cantidad_SegundaUnidad;
|
||||||
|
Cantidad_SegundaUnidad = _dcm_Cantidad_SegundaUnidad;
|
||||||
|
}
|
||||||
|
|
||||||
|
public decimal Cantidad { get; set; }
|
||||||
|
public long IdNomenclatura { get; set; }
|
||||||
|
public decimal Precio { get; set; }
|
||||||
|
|
||||||
|
public bool EsRelacional { get; set; }
|
||||||
|
public int Precio_Cantidad_SegundaUnidad { get; set; }
|
||||||
|
public decimal? Cantidad_SegundaUnidad { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_AbonosTipos_Listado_Modelo : MAE_AbonosTipos
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_AbonosTipos_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_AgrupacionesArticulosCabeceras_Listado_Modelo : MAE_AgrupacionesArticulosCabeceras
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_AgrupacionesArticulosCabeceras_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public bool Seleccionar { get; set; }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_AgrupacionesClientesCabeceras_Listado_Modelo : MAE_AgrupacionesClientesCabeceras
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_AgrupacionesClientesCabeceras_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public bool Seleccionar { get; set; }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_AgrupacionesProveedoresCabeceras_Listado_Modelo : MAE_AgrupacionesProveedoresCabeceras
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_AgrupacionesProveedoresCabeceras_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public bool Seleccionar { get; set; }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_ArticulosCodigosBarras_Listado_Modelo : MAE_ArticulosCodigosBarras
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_ArticulosCodigosBarras_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//Embalaje
|
||||||
|
public string Embalaje_Codigo { get; set; }
|
||||||
|
public string Embalaje_Descripcion { get; set; }
|
||||||
|
public DateTime? Embalaje_FechaBorrado { get; set; }
|
||||||
|
public string Embalaje
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Embalaje_Codigo != null && Embalaje_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Embalaje_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Embalaje_Descripcion != null && Embalaje_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Embalaje_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,186 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_ArticulosComodin_Listado_Modelo : MAE_ArticulosComodin
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_ArticulosComodin_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Empresa
|
||||||
|
public string Empresa_Codigo { get; set; }
|
||||||
|
public string Empresa_Descripcion { get; set; }
|
||||||
|
public DateTime? Empresa_FechaBorrado { get; set; }
|
||||||
|
public string Empresa
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Empresa_Codigo != null && Empresa_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Empresa_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Empresa_Descripcion != null && Empresa_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Empresa_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//ImpuestoTipo
|
||||||
|
public string ImpuestoTipo_Codigo { get; set; }
|
||||||
|
public string ImpuestoTipo_Descripcion { get; set; }
|
||||||
|
public DateTime? ImpuestoTipo_FechaBorrado { get; set; }
|
||||||
|
public string ImpuestoTipo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (ImpuestoTipo_Codigo != null && ImpuestoTipo_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + ImpuestoTipo_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (ImpuestoTipo_Descripcion != null && ImpuestoTipo_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += ImpuestoTipo_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//RetencionTipo_Venta
|
||||||
|
public string RetencionTipo_Venta_Codigo { get; set; }
|
||||||
|
public string RetencionTipo_Venta_Descripcion { get; set; }
|
||||||
|
public DateTime? RetencionTipo_Venta_FechaBorrado { get; set; }
|
||||||
|
public string RetencionTipo_Venta
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (RetencionTipo_Venta_Codigo != null && RetencionTipo_Venta_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + RetencionTipo_Venta_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (RetencionTipo_Venta_Descripcion != null && RetencionTipo_Venta_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += RetencionTipo_Venta_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//RetencionTipo_Compra
|
||||||
|
public string RetencionTipo_Compra_Codigo { get; set; }
|
||||||
|
public string RetencionTipo_Compra_Descripcion { get; set; }
|
||||||
|
public DateTime? RetencionTipo_Compra_FechaBorrado { get; set; }
|
||||||
|
public string RetencionTipo_Compra
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (RetencionTipo_Compra_Codigo != null && RetencionTipo_Compra_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + RetencionTipo_Compra_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (RetencionTipo_Compra_Descripcion != null && RetencionTipo_Compra_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += RetencionTipo_Compra_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//NomenclaturaPrecio_Venta
|
||||||
|
public string NomenclaturaPrecio_Venta_Codigo { get; set; }
|
||||||
|
public string NomenclaturaPrecio_Venta_Descripcion { get; set; }
|
||||||
|
public DateTime? NomenclaturaPrecio_Venta_FechaBorrado { get; set; }
|
||||||
|
public string NomenclaturaPrecio_Venta
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (NomenclaturaPrecio_Venta_Codigo != null && NomenclaturaPrecio_Venta_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + NomenclaturaPrecio_Venta_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (NomenclaturaPrecio_Venta_Descripcion != null && NomenclaturaPrecio_Venta_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += NomenclaturaPrecio_Venta_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//NomenclaturaPrecio_Compra
|
||||||
|
public string NomenclaturaPrecio_Compra_Codigo { get; set; }
|
||||||
|
public string NomenclaturaPrecio_Compra_Descripcion { get; set; }
|
||||||
|
public DateTime? NomenclaturaPrecio_Compra_FechaBorrado { get; set; }
|
||||||
|
public string NomenclaturaPrecio_Compra
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (NomenclaturaPrecio_Compra_Codigo != null && NomenclaturaPrecio_Compra_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + NomenclaturaPrecio_Compra_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (NomenclaturaPrecio_Compra_Descripcion != null && NomenclaturaPrecio_Compra_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += NomenclaturaPrecio_Compra_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_ArticulosTotalizados_Listado_Modelo : MAE_ArticulosTotalizados
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_ArticulosTotalizados_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,104 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Articulos_EmbalajesPrincipal_Precios_Historico_Listado_Modelo : MAE_Articulos_EmbalajesPrincipal_Precios_Historico
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Articulos_EmbalajesPrincipal_Precios_Historico_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
//Fecha Inicio
|
||||||
|
public DateTime Fecha_Inicial { get; set; }
|
||||||
|
|
||||||
|
//Fecha Final
|
||||||
|
public DateTime Fecha_Final { get; set; }
|
||||||
|
|
||||||
|
//Embalaje
|
||||||
|
public string Embalaje_Codigo { get; set; }
|
||||||
|
public string Embalaje_Descripcion { get; set; }
|
||||||
|
public DateTime? Embalaje_FechaBorrado { get; set; }
|
||||||
|
public string Embalaje
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Embalaje_Codigo != null && Embalaje_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Embalaje_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Embalaje_Descripcion != null && Embalaje_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Embalaje_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//NomenclaturaPrecio
|
||||||
|
public string NomenclaturaPrecio_Codigo { get; set; }
|
||||||
|
public string NomenclaturaPrecio_Descripcion { get; set; }
|
||||||
|
public DateTime? NomenclaturaPrecio_FechaBorrado { get; set; }
|
||||||
|
public string NomenclaturaPrecio
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (NomenclaturaPrecio_Codigo != null && NomenclaturaPrecio_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + NomenclaturaPrecio_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (NomenclaturaPrecio_Descripcion != null && NomenclaturaPrecio_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += NomenclaturaPrecio_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Empresa
|
||||||
|
public string Empresa_Codigo { get; set; }
|
||||||
|
public string Empresa_Descripcion { get; set; }
|
||||||
|
public DateTime? Empresa_FechaBorrado { get; set; }
|
||||||
|
public string Empresa
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Empresa_Codigo != null && Empresa_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Empresa_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Empresa_Descripcion != null && Empresa_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Empresa_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Articulos_Embalajes_Modelo : MAE_Articulos_Embalajes
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Articulos_Embalajes_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public MAE_Articulos_Embalajes Articulo_Embalaje { get; set; }
|
||||||
|
|
||||||
|
public IEnumerable<MAE_Articulos_EmbalajesPrincipal_Precios> Articulos_EmbalajesPrincipal_Precios { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Articulos_Modelo :MAE_Articulos
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Articulos_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
public List<INTERNO_MAE_ArticulosCodigosBarras_Listado_Modelo> CodigosBarras { get; set; }
|
||||||
|
|
||||||
|
public List<INTERNO_MAE_Articulos_EmbalajesPrincipal_Precios_Historico_Listado_Modelo> Historico_Precios { get; set; }
|
||||||
|
|
||||||
|
public List<MAE_Tasas> Tasas { get; set; }
|
||||||
|
|
||||||
|
public List<INTERNO_MAE_Articulos_Temporadas_Listado_Modelo> Temporadas { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,161 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Articulos_Temporadas_Listado_Modelo : MAE_Articulos_Temporadas
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Articulos_Temporadas_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
//Ordenacion
|
||||||
|
public string Ordenacion
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Ordenacion = "0000";
|
||||||
|
|
||||||
|
string str_Dia = "0" + desde_Dia;
|
||||||
|
string str_Mes = "0" + desde_Mes;
|
||||||
|
|
||||||
|
str_Ordenacion = (str_Mes.Substring(str_Mes.Length - 2, 2)) + (str_Dia.Substring(str_Dia.Length-2,2));
|
||||||
|
|
||||||
|
return str_Ordenacion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Desde
|
||||||
|
public string Desde
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Desde = "";
|
||||||
|
|
||||||
|
str_Desde = desde_Dia + " de ";
|
||||||
|
|
||||||
|
if (desde_Mes == 1)
|
||||||
|
{
|
||||||
|
str_Desde += Variables.G_STR_CALENDARIO_MES_ENERO;
|
||||||
|
}
|
||||||
|
else if (desde_Mes == 2)
|
||||||
|
{
|
||||||
|
str_Desde += Variables.G_STR_CALENDARIO_MES_FEBRERO;
|
||||||
|
}
|
||||||
|
else if (desde_Mes == 3)
|
||||||
|
{
|
||||||
|
str_Desde += Variables.G_STR_CALENDARIO_MES_MARZO;
|
||||||
|
}
|
||||||
|
else if (desde_Mes == 4)
|
||||||
|
{
|
||||||
|
str_Desde += Variables.G_STR_CALENDARIO_MES_ABRIL;
|
||||||
|
}
|
||||||
|
else if (desde_Mes == 5)
|
||||||
|
{
|
||||||
|
str_Desde += Variables.G_STR_CALENDARIO_MES_MAYO;
|
||||||
|
}
|
||||||
|
else if (desde_Mes == 6)
|
||||||
|
{
|
||||||
|
str_Desde += Variables.G_STR_CALENDARIO_MES_JUNIO;
|
||||||
|
}
|
||||||
|
else if (desde_Mes == 7)
|
||||||
|
{
|
||||||
|
str_Desde += Variables.G_STR_CALENDARIO_MES_JULIO;
|
||||||
|
}
|
||||||
|
else if (desde_Mes == 8)
|
||||||
|
{
|
||||||
|
str_Desde += Variables.G_STR_CALENDARIO_MES_AGOSTO;
|
||||||
|
}
|
||||||
|
else if (desde_Mes == 9)
|
||||||
|
{
|
||||||
|
str_Desde += Variables.G_STR_CALENDARIO_MES_SEPTIEMBRE;
|
||||||
|
}
|
||||||
|
else if (desde_Mes == 10)
|
||||||
|
{
|
||||||
|
str_Desde += Variables.G_STR_CALENDARIO_MES_OCTUBRE;
|
||||||
|
}
|
||||||
|
else if (desde_Mes == 11)
|
||||||
|
{
|
||||||
|
str_Desde += Variables.G_STR_CALENDARIO_MES_NOVIEMBRE;
|
||||||
|
}
|
||||||
|
else if (desde_Mes == 12)
|
||||||
|
{
|
||||||
|
str_Desde += Variables.G_STR_CALENDARIO_MES_DICIEMBRE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return str_Desde;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Hasta
|
||||||
|
public string Hasta
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Hasta = "";
|
||||||
|
|
||||||
|
str_Hasta = hasta_Dia + " de ";
|
||||||
|
|
||||||
|
if (hasta_Mes == 1)
|
||||||
|
{
|
||||||
|
str_Hasta += Variables.G_STR_CALENDARIO_MES_ENERO;
|
||||||
|
}
|
||||||
|
else if (hasta_Mes == 2)
|
||||||
|
{
|
||||||
|
str_Hasta += Variables.G_STR_CALENDARIO_MES_FEBRERO;
|
||||||
|
}
|
||||||
|
else if (hasta_Mes == 3)
|
||||||
|
{
|
||||||
|
str_Hasta += Variables.G_STR_CALENDARIO_MES_MARZO;
|
||||||
|
}
|
||||||
|
else if (hasta_Mes == 4)
|
||||||
|
{
|
||||||
|
str_Hasta += Variables.G_STR_CALENDARIO_MES_ABRIL;
|
||||||
|
}
|
||||||
|
else if (hasta_Mes == 5)
|
||||||
|
{
|
||||||
|
str_Hasta += Variables.G_STR_CALENDARIO_MES_MAYO;
|
||||||
|
}
|
||||||
|
else if (hasta_Mes == 6)
|
||||||
|
{
|
||||||
|
str_Hasta += Variables.G_STR_CALENDARIO_MES_JUNIO;
|
||||||
|
}
|
||||||
|
else if (hasta_Mes == 7)
|
||||||
|
{
|
||||||
|
str_Hasta += Variables.G_STR_CALENDARIO_MES_JULIO;
|
||||||
|
}
|
||||||
|
else if (hasta_Mes == 8)
|
||||||
|
{
|
||||||
|
str_Hasta += Variables.G_STR_CALENDARIO_MES_AGOSTO;
|
||||||
|
}
|
||||||
|
else if (hasta_Mes == 9)
|
||||||
|
{
|
||||||
|
str_Hasta += Variables.G_STR_CALENDARIO_MES_SEPTIEMBRE;
|
||||||
|
}
|
||||||
|
else if (hasta_Mes == 10)
|
||||||
|
{
|
||||||
|
str_Hasta += Variables.G_STR_CALENDARIO_MES_OCTUBRE;
|
||||||
|
}
|
||||||
|
else if (hasta_Mes == 11)
|
||||||
|
{
|
||||||
|
str_Hasta += Variables.G_STR_CALENDARIO_MES_NOVIEMBRE;
|
||||||
|
}
|
||||||
|
else if (hasta_Mes == 12)
|
||||||
|
{
|
||||||
|
str_Hasta += Variables.G_STR_CALENDARIO_MES_DICIEMBRE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return str_Hasta;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Articulos_Trazabilidad_Listado_Modelo : MAE_Articulos_Trazabilidad
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Articulos_Trazabilidad_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
//Articulo
|
||||||
|
public string Articulo_Codigo { get; set; }
|
||||||
|
public string Articulo_Descripcion { get; set; }
|
||||||
|
public DateTime? Articulo_FechaBorrado { get; set; }
|
||||||
|
public string Articulo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Articulo_Codigo != null && Articulo_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += "(" + Articulo_Codigo + ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Articulo_Descripcion != null && Articulo_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Articulo_Descripcion;
|
||||||
|
}
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Articulos_UbicacionesDelegaciones_Modelo
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Articulos_UbicacionesDelegaciones_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long id { get; set; }
|
||||||
|
public long idArticulo { get; set; }
|
||||||
|
public long idDelegacion { get; set; }
|
||||||
|
public long idUbicacion { get; set; }
|
||||||
|
public GEN_Delegaciones Delegacion { get; set; }
|
||||||
|
public GEN_Almacenes Almacen { get; set; }
|
||||||
|
public MAE_Ubicaciones Ubicacion { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Articulos_UbicacionesDelegaciones_Modelo
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Articulos_UbicacionesDelegaciones_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long id { get; set; }
|
||||||
|
public long idArticulo { get; set; }
|
||||||
|
public long idDelegacion { get; set; }
|
||||||
|
public long idUbicacion { get; set; }
|
||||||
|
public GEN_Delegaciones Delegacion { get; set; }
|
||||||
|
public GEN_Almacenes Almacen { get; set; }
|
||||||
|
public MAE_Ubicaciones Ubicacion { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Cargos_Listado_Modelo : MAE_Cargos
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Cargos_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_CategoriasProfesionales_Listado_Modelo : MAE_CategoriasProfesionales
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_CategoriasProfesionales_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,217 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using Exferia_Maestros.General;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Clientes_Articulos_Listado_Modelo : MAE_Clientes_Articulos
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Clientes_Articulos_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public bool Desactivada_Boolean
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
bool bol_ValorDevuelto = false;
|
||||||
|
|
||||||
|
if (desactivada != null)
|
||||||
|
{
|
||||||
|
bol_ValorDevuelto = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bol_ValorDevuelto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Cliente/Agrupacion cliente
|
||||||
|
//Cliente
|
||||||
|
public string Cliente_Codigo { get; set; }
|
||||||
|
public string Cliente_Descripcion { get; set; }
|
||||||
|
public DateTime? Cliente_FechaBorrado { get; set; }
|
||||||
|
|
||||||
|
//AgrupacionCliente
|
||||||
|
public string AgrupacionCliente_Codigo { get; set; }
|
||||||
|
public string AgrupacionCliente_Descripcion { get; set; }
|
||||||
|
public DateTime? AgrupacionCliente_FechaBorrado { get; set; }
|
||||||
|
public IEnumerable<long> AgrupacionCliente_IdsClientesAgrupados { get; set; }
|
||||||
|
|
||||||
|
//Campo a mostrar el el Grid
|
||||||
|
public string Cliente_AgrupacionCliente
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
if (idCliente!=null)
|
||||||
|
{
|
||||||
|
//Codigo
|
||||||
|
if (Cliente_Codigo != null && Cliente_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Cliente_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Cliente_Descripcion != null && Cliente_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Cliente_Descripcion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Codigo
|
||||||
|
if (AgrupacionCliente_Codigo != null && AgrupacionCliente_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + AgrupacionCliente_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (AgrupacionCliente_Descripcion != null && AgrupacionCliente_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += AgrupacionCliente_Descripcion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Articulo/Agrupacion articulo
|
||||||
|
//Articulo
|
||||||
|
public string Articulo_Codigo { get; set; }
|
||||||
|
public string Articulo_Descripcion { get; set; }
|
||||||
|
public DateTime? Articulo_FechaBorrado { get; set; }
|
||||||
|
|
||||||
|
//AgrupacionArticulo
|
||||||
|
public string AgrupacionArticulo_Codigo { get; set; }
|
||||||
|
public string AgrupacionArticulo_Descripcion { get; set; }
|
||||||
|
public DateTime? AgrupacionArticulo_FechaBorrado { get; set; }
|
||||||
|
public IEnumerable<long> AgrupacionArticulo_IdsArticulosAgrupados { get; set; }
|
||||||
|
|
||||||
|
public string Articulo_AgrupacionArticulo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
if (idArticulo!=null)
|
||||||
|
{
|
||||||
|
//Codigo
|
||||||
|
if (Articulo_Codigo != null && Articulo_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Articulo_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Articulo_Descripcion != null && Articulo_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Articulo_Descripcion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Codigo
|
||||||
|
if (AgrupacionArticulo_Codigo != null && AgrupacionArticulo_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + AgrupacionArticulo_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (AgrupacionArticulo_Descripcion != null && AgrupacionArticulo_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += AgrupacionArticulo_Descripcion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region TarifaPromocion/PromocionEsquema
|
||||||
|
//TarifaPromocion
|
||||||
|
public string TarifaPromocion_Codigo { get; set; }
|
||||||
|
public string TarifaPromocion_Descripcion { get; set; }
|
||||||
|
public DateTime? TarifaPromocion_FechaBorrado { get; set; }
|
||||||
|
|
||||||
|
//PromocionEsquema
|
||||||
|
public string PromocionEsquema_Codigo { get; set; }
|
||||||
|
public string PromocionEsquema_Descripcion { get; set; }
|
||||||
|
public DateTime? PromocionEsquema_FechaBorrado { get; set; }
|
||||||
|
public IEnumerable<long> PromocionEsquema_IdsPromocionesAgrupados { get; set; }
|
||||||
|
|
||||||
|
public string TarifaPromocion_PromocionEsquema
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
if (idTarifaPromocion != null)
|
||||||
|
{
|
||||||
|
//Codigo
|
||||||
|
if (TarifaPromocion_Codigo != null && TarifaPromocion_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + TarifaPromocion_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (TarifaPromocion_Descripcion != null && TarifaPromocion_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += TarifaPromocion_Descripcion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Codigo
|
||||||
|
if (PromocionEsquema_Codigo != null && PromocionEsquema_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + PromocionEsquema_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (PromocionEsquema_Descripcion != null && PromocionEsquema_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += PromocionEsquema_Descripcion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Empresa
|
||||||
|
public string Empresa_Codigo { get; set; }
|
||||||
|
public string Empresa_Descripcion { get; set; }
|
||||||
|
public DateTime? Empresa_FechaBorrado { get; set; }
|
||||||
|
public string Empresa
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Empresa_Codigo != null && Empresa_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Empresa_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Empresa_Descripcion != null && Empresa_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Empresa_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,26 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Clientes_InformeEntreFechas
|
||||||
|
{
|
||||||
|
public int Leads { get; set; }
|
||||||
|
public int Clientes { get; set; }
|
||||||
|
|
||||||
|
public long Tasa
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Leads != 0 ? (Clientes / Leads) : 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public INTERNO_MAE_Clientes_InformeEntreFechas()
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_ContactosProcesosEmail_Listado_Modelo : MAE_ContactosProcesosEmail
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_ContactosProcesosEmail_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_CuentasBancariasSEPA_Pagos_Listado_Modelo : MAE_CuentasBancariasSEPA_Pagos
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_CuentasBancariasSEPA_Pagos_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
//Proveedor
|
||||||
|
public string Proveedor_Codigo { get; set; }
|
||||||
|
public string Proveedor_RazonSocial { get; set; }
|
||||||
|
public DateTime? Proveedor_FechaBorrado { get; set; }
|
||||||
|
public string Proveedor
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Proveedor_Codigo != null && Proveedor_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Proveedor_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Proveedor_RazonSocial != null && Proveedor_RazonSocial.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Proveedor_RazonSocial;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//EntidadBancaria
|
||||||
|
public string EntidadBancaria_Codigo { get; set; }
|
||||||
|
public string EntidadBancaria_RazonSocial { get; set; }
|
||||||
|
public DateTime? EntidadBancaria_FechaBorrado { get; set; }
|
||||||
|
public string EntidadBancaria
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (EntidadBancaria_Codigo != null && EntidadBancaria_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + EntidadBancaria_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (EntidadBancaria_RazonSocial != null && EntidadBancaria_RazonSocial.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += EntidadBancaria_RazonSocial;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Empleado
|
||||||
|
public string Empleado_Codigo { get; set; }
|
||||||
|
public string Empleado_Nombre { get; set; }
|
||||||
|
public DateTime? Empleado_FechaBorrado { get; set; }
|
||||||
|
public string Empleado
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Empleado_Codigo != null && Empleado_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Empleado_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Empleado_Nombre != null && Empleado_Nombre.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Empleado_Nombre;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Empresa
|
||||||
|
public string Empresa_Codigo { get; set; }
|
||||||
|
public string Empresa_Descripcion { get; set; }
|
||||||
|
public DateTime? Empresa_FechaBorrado { get; set; }
|
||||||
|
public string Empresa
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Empresa_Codigo != null && Empresa_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Empresa_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Empresa_Descripcion != null && Empresa_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Empresa_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_DepartamentosExternos_Listado_Modelo : MAE_DepartamentosExternos
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_DepartamentosExternos_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Embalajes_Listado_Modelo : MAE_Embalajes
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Embalajes_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//UbicacionPerfil
|
||||||
|
public string UbicacionPerfil_Codigo { get; set; }
|
||||||
|
public string UbicacionPerfil_Descripcion { get; set; }
|
||||||
|
public DateTime? UbicacionPerfil_FechaBorrado { get; set; }
|
||||||
|
public string UbicacionPerfil
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (UbicacionPerfil_Codigo != null && UbicacionPerfil_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += "(" + UbicacionPerfil_Codigo + ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if(UbicacionPerfil_Descripcion != null && UbicacionPerfil_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += UbicacionPerfil_Descripcion;
|
||||||
|
}
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,17 @@
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Empleados_Modelo : MAE_Empleados
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Empleados_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public List<INTERNO_MAE_CuentasBancariasSEPA_Pagos_Listado_Modelo> CuentasBancarias { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_FormasPago_Listado_Modelo : MAE_FormasPago
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_FormasPago_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Empresa
|
||||||
|
public string Empresa_Codigo { get; set; }
|
||||||
|
public string Empresa_Descripcion { get; set; }
|
||||||
|
public DateTime? Empresa_FechaBorrado { get; set; }
|
||||||
|
|
||||||
|
public string Empresa
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Empresa_Codigo != null && Empresa_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Empresa_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Empresa_Descripcion != null && Empresa_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Empresa_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_FormasPago_Modelo : MAE_FormasPago
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_FormasPago_Modelo ()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public List<MAE_FormasPago_Detalle> Detalle = new List<MAE_FormasPago_Detalle>();
|
||||||
|
|
||||||
|
//Empresa
|
||||||
|
public string Empresa_Codigo { get; set; }
|
||||||
|
public string Empresa_Descripcion { get; set; }
|
||||||
|
public DateTime? Empresa_FechaBorrado { get; set; }
|
||||||
|
|
||||||
|
public string Empresa
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Empresa_Codigo != null && Empresa_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Empresa_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Empresa_Descripcion != null && Empresa_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Empresa_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Medidas_Listado_Modelo : MAE_Medidas
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Medidas_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_MotivosAltaBaja_Listado_Modelo : MAE_MotivosAltaBaja
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_MotivosAltaBaja_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_NomenclaturasPrecios_Listado_Modelo : MAE_NomenclaturasPrecios
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_NomenclaturasPrecios_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ActualizarPreciosCompras_Cuando_Texto
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_actualizarPreciosCompras_Cuando_Texto = Variables.G_MDL_ACTUALIZACIONPRECIOS_COMPRA_CUANDO_NUNCA.Descripcion;
|
||||||
|
|
||||||
|
if (actualizarPreciosCompras_Cuando!=null)
|
||||||
|
{
|
||||||
|
if (actualizarPreciosCompras_Cuando.ToString().Equals(Variables.G_MDL_ACTUALIZACIONPRECIOS_COMPRA_CUANDO_NUNCA.Codigo))
|
||||||
|
{
|
||||||
|
str_actualizarPreciosCompras_Cuando_Texto = Variables.G_MDL_ACTUALIZACIONPRECIOS_COMPRA_CUANDO_NUNCA.Descripcion;
|
||||||
|
}
|
||||||
|
else if (actualizarPreciosCompras_Cuando.ToString().Equals(Variables.G_MDL_ACTUALIZACIONPRECIOS_COMPRA_CUANDO_SIEMPRE.Codigo))
|
||||||
|
{
|
||||||
|
str_actualizarPreciosCompras_Cuando_Texto = Variables.G_MDL_ACTUALIZACIONPRECIOS_COMPRA_CUANDO_SIEMPRE.Descripcion;
|
||||||
|
}
|
||||||
|
else if (actualizarPreciosCompras_Cuando.ToString().Equals(Variables.G_MDL_ACTUALIZACIONPRECIOS_COMPRA_CUANDO_MASALTO.Codigo))
|
||||||
|
{
|
||||||
|
str_actualizarPreciosCompras_Cuando_Texto = Variables.G_MDL_ACTUALIZACIONPRECIOS_COMPRA_CUANDO_MASALTO.Descripcion;
|
||||||
|
}
|
||||||
|
else if (actualizarPreciosCompras_Cuando.ToString().Equals(Variables.G_MDL_ACTUALIZACIONPRECIOS_COMPRA_CUANDO_MASBAJO.Codigo))
|
||||||
|
{
|
||||||
|
str_actualizarPreciosCompras_Cuando_Texto = Variables.G_MDL_ACTUALIZACIONPRECIOS_COMPRA_CUANDO_MASBAJO.Descripcion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_actualizarPreciosCompras_Cuando_Texto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool ActualizarPreciosCompras_Preguntar_Booleano
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
bool bol_actualizarPreciosCompras_Preguntar_Booleano = false;
|
||||||
|
|
||||||
|
if (actualizarPreciosCompras_Preguntar != null && actualizarPreciosCompras_Preguntar.Value)
|
||||||
|
{
|
||||||
|
bol_actualizarPreciosCompras_Preguntar_Booleano = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bol_actualizarPreciosCompras_Preguntar_Booleano;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ActualizarPreciosCompras_Tipo_Texto
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_actualizarPreciosCompras_Tipo_Texto = Variables.G_MDL_ACTUALIZACIONPRECIOS_COMPRA_TIPOPRECIO_NORMAL.Descripcion;
|
||||||
|
|
||||||
|
if (actualizarPreciosCompras_Tipo != null)
|
||||||
|
{
|
||||||
|
if (actualizarPreciosCompras_Tipo.ToString().Equals(Variables.G_MDL_ACTUALIZACIONPRECIOS_COMPRA_TIPOPRECIO_NORMAL.Codigo))
|
||||||
|
{
|
||||||
|
str_actualizarPreciosCompras_Tipo_Texto = Variables.G_MDL_ACTUALIZACIONPRECIOS_COMPRA_TIPOPRECIO_NORMAL.Descripcion;
|
||||||
|
}
|
||||||
|
else if (actualizarPreciosCompras_Tipo.ToString().Equals(Variables.G_MDL_ACTUALIZACIONPRECIOS_COMPRA_TIPOPRECIO_MENOSDESCUENTOGENERAL.Codigo))
|
||||||
|
{
|
||||||
|
str_actualizarPreciosCompras_Tipo_Texto = Variables.G_MDL_ACTUALIZACIONPRECIOS_COMPRA_TIPOPRECIO_MENOSDESCUENTOGENERAL.Descripcion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_actualizarPreciosCompras_Tipo_Texto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_PieImpresiones_Listado_Modelo : MAE_PieImpresiones
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_PieImpresiones_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_Maestros.General;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Prioridades_Listado_Modelo : MAE_Prioridades
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Prioridades_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_PromocionesEsquema_Cabecera_Listado_Modelo : MAE_PromocionesEsquema_Cabecera
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_PromocionesEsquema_Cabecera_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Cliente/Proveedor Texto
|
||||||
|
public string ClienteProveedor_Texto
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_ValorDevuelto = Variables.G_STR_TIPOCLIENTEPROVEEDOR_CLIENTE_DESCRIPCION;
|
||||||
|
|
||||||
|
if (clienteProveedor.Equals(Variables.G_INT_TIPOCLIENTEPROVEEDOR_PROVEEDOR_CODIGO))
|
||||||
|
{
|
||||||
|
str_ValorDevuelto = Variables.G_STR_TIPOCLIENTEPROVEEDOR_PROVEEDOR_DESCRIPCION;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_ValorDevuelto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,217 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using Exferia_Maestros.General;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Proveedores_Articulos_Listado_Modelo : MAE_Proveedores_Articulos
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Proveedores_Articulos_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public bool Desactivada_Boolean
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
bool bol_ValorDevuelto = false;
|
||||||
|
|
||||||
|
if (desactivada != null)
|
||||||
|
{
|
||||||
|
bol_ValorDevuelto = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bol_ValorDevuelto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Proveedor/Agrupacion proveedor
|
||||||
|
//Proveedor
|
||||||
|
public string Proveedor_Codigo { get; set; }
|
||||||
|
public string Proveedor_Descripcion { get; set; }
|
||||||
|
public DateTime? Proveedor_FechaBorrado { get; set; }
|
||||||
|
|
||||||
|
//AgrupacionProveedor
|
||||||
|
public string AgrupacionProveedor_Codigo { get; set; }
|
||||||
|
public string AgrupacionProveedor_Descripcion { get; set; }
|
||||||
|
public DateTime? AgrupacionProveedor_FechaBorrado { get; set; }
|
||||||
|
public IEnumerable<long> AgrupacionProveedor_IdsProveedoresAgrupados { get; set; }
|
||||||
|
|
||||||
|
//Campo a mostrar el el Grid
|
||||||
|
public string Proveedor_AgrupacionProveedor
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
if (idProveedor != null)
|
||||||
|
{
|
||||||
|
//Codigo
|
||||||
|
if (Proveedor_Codigo != null && Proveedor_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Proveedor_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Proveedor_Descripcion != null && Proveedor_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Proveedor_Descripcion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Codigo
|
||||||
|
if (AgrupacionProveedor_Codigo != null && AgrupacionProveedor_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + AgrupacionProveedor_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (AgrupacionProveedor_Descripcion != null && AgrupacionProveedor_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += AgrupacionProveedor_Descripcion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Articulo/Agrupacion articulo
|
||||||
|
//Articulo
|
||||||
|
public string Articulo_Codigo { get; set; }
|
||||||
|
public string Articulo_Descripcion { get; set; }
|
||||||
|
public DateTime? Articulo_FechaBorrado { get; set; }
|
||||||
|
|
||||||
|
//AgrupacionArticulo
|
||||||
|
public string AgrupacionArticulo_Codigo { get; set; }
|
||||||
|
public string AgrupacionArticulo_Descripcion { get; set; }
|
||||||
|
public DateTime? AgrupacionArticulo_FechaBorrado { get; set; }
|
||||||
|
public IEnumerable<long> AgrupacionArticulo_IdsArticulosAgrupados { get; set; }
|
||||||
|
|
||||||
|
//Campo a mostrar el el Grid
|
||||||
|
public string Articulo_AgrupacionArticulo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
if (idArticulo!=null)
|
||||||
|
{
|
||||||
|
//Codigo
|
||||||
|
if (Articulo_Codigo != null && Articulo_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Articulo_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Articulo_Descripcion != null && Articulo_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Articulo_Descripcion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Codigo
|
||||||
|
if (AgrupacionArticulo_Codigo != null && AgrupacionArticulo_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + AgrupacionArticulo_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (AgrupacionArticulo_Descripcion != null && AgrupacionArticulo_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += AgrupacionArticulo_Descripcion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region TarifaPromocion/PromocionEsquema
|
||||||
|
//TarifaPromocion
|
||||||
|
public string TarifaPromocion_Codigo { get; set; }
|
||||||
|
public string TarifaPromocion_Descripcion { get; set; }
|
||||||
|
public DateTime? TarifaPromocion_FechaBorrado { get; set; }
|
||||||
|
|
||||||
|
//PromocionEsquema
|
||||||
|
public string PromocionEsquema_Codigo { get; set; }
|
||||||
|
public string PromocionEsquema_Descripcion { get; set; }
|
||||||
|
public DateTime? PromocionEsquema_FechaBorrado { get; set; }
|
||||||
|
public IEnumerable<long> PromocionEsquema_IdsPromocionesAgrupados { get; set; }
|
||||||
|
|
||||||
|
public string TarifaPromocion_PromocionEsquema
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
if (idTarifaPromocion != null)
|
||||||
|
{
|
||||||
|
//Codigo
|
||||||
|
if (TarifaPromocion_Codigo != null && TarifaPromocion_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + TarifaPromocion_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (TarifaPromocion_Descripcion != null && TarifaPromocion_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += TarifaPromocion_Descripcion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Codigo
|
||||||
|
if (PromocionEsquema_Codigo != null && PromocionEsquema_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + PromocionEsquema_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (PromocionEsquema_Descripcion != null && PromocionEsquema_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += PromocionEsquema_Descripcion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//Empresa
|
||||||
|
public string Empresa_Codigo { get; set; }
|
||||||
|
public string Empresa_Descripcion { get; set; }
|
||||||
|
public DateTime? Empresa_FechaBorrado { get; set; }
|
||||||
|
public string Empresa
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Empresa_Codigo != null && Empresa_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Empresa_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Empresa_Descripcion != null && Empresa_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Empresa_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,70 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using Exferia_Maestros.General;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Proveedores_CodigosArticuloProveedor_Listado_Modelo : MAE_Proveedores_CodigosArticuloProveedor
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Proveedores_CodigosArticuloProveedor_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
//Proveedor
|
||||||
|
public string Proveedor_Codigo { get; set; }
|
||||||
|
public string Proveedor_Descripcion { get; set; }
|
||||||
|
public DateTime? Proveedor_FechaBorrado { get; set; }
|
||||||
|
public string Proveedor
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Proveedor_Codigo != null && Proveedor_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Proveedor_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Proveedor_Descripcion != null && Proveedor_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Proveedor_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Articulo
|
||||||
|
public string Articulo_Codigo { get; set; }
|
||||||
|
public string Articulo_Descripcion { get; set; }
|
||||||
|
public DateTime? Articulo_FechaBorrado { get; set; }
|
||||||
|
public string Articulo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Articulo_Codigo != null && Articulo_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Articulo_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Articulo_Descripcion != null && Articulo_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Articulo_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,20 @@
|
||||||
|
using Exferia_Aplicacion.Modelos_Generales;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Proveedores_Modelo : MAE_Proveedores
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Proveedores_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public List<INTERNO_Contactos_Modelo> Contactos { get; set; }
|
||||||
|
public List<INTERNO_MAE_CuentasBancariasSEPA_Pagos_Listado_Modelo> CuentasBancarias { get; set; }
|
||||||
|
public List<INTERNO_RelacionClienteProveedor_Modelo> Relaciones_ClienteProveedor { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Soportes_Listado_Modelo : MAE_Soportes
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Soportes_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Empresa
|
||||||
|
public string Empresa_Codigo { get; set; }
|
||||||
|
public string Empresa_Descripcion { get; set; }
|
||||||
|
public DateTime? Empresa_FechaBorrado { get; set; }
|
||||||
|
public string Empresa
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Empresa_Codigo != null && Empresa_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Empresa_Codigo + ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if(Empresa_Descripcion != null && Empresa_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Empresa_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//UbicacionPerfil
|
||||||
|
public string UbicacionPerfil_Codigo { get; set; }
|
||||||
|
public string UbicacionPerfil_Descripcion { get; set; }
|
||||||
|
public DateTime? UbicacionPerfil_FechaBorrado { get; set; }
|
||||||
|
public string UbicacionPerfil
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (UbicacionPerfil_Codigo != null && UbicacionPerfil_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + UbicacionPerfil_Codigo + ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (UbicacionPerfil_Descripcion != null && UbicacionPerfil_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += UbicacionPerfil_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,219 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_TarifasPromociones_Listado_Modelo : MAE_TarifasPromociones
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_TarifasPromociones_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Desactivada_Boolean
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
bool bol_ValorDevuelto = false;
|
||||||
|
|
||||||
|
if (desactivada != null)
|
||||||
|
{
|
||||||
|
bol_ValorDevuelto = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bol_ValorDevuelto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Cliente/Proveedor Texto
|
||||||
|
public string ClienteProveedor_Texto
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_ValorDevuelto = Variables.G_STR_TIPOCLIENTEPROVEEDOR_CLIENTE_DESCRIPCION;
|
||||||
|
|
||||||
|
if (clienteProveedor.Equals(Variables.G_INT_TIPOCLIENTEPROVEEDOR_PROVEEDOR_CODIGO))
|
||||||
|
{
|
||||||
|
str_ValorDevuelto = Variables.G_STR_TIPOCLIENTEPROVEEDOR_PROVEEDOR_DESCRIPCION;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_ValorDevuelto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Precio Fijo/Dinamico Texto
|
||||||
|
public string PrecioFijoDinamico_Texto
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_ValorDevuelto = Variables.G_STR_TIPOPRECIO_FIJO_DESCRIPCION;
|
||||||
|
|
||||||
|
if (precioFijoDinamico.Equals(Variables.G_INT_TIPOPRECIO_DINAMICO_CODIGO))
|
||||||
|
{
|
||||||
|
str_ValorDevuelto = Variables.G_STR_TIPOPRECIO_DINAMICO_DESCRIPCION;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_ValorDevuelto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Tarifa/Promocion Texto
|
||||||
|
public string TarifaPromocion_Texto
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_ValorDevuelto = Variables.G_STR_TIPO_TARIFAPROMOCION_TARIFA_DESCRIPCION;
|
||||||
|
|
||||||
|
if (tipo.Equals(Variables.G_INT_TIPO_TARIFAPROMOCION_PROMOCIONES_CODIGO))
|
||||||
|
{
|
||||||
|
str_ValorDevuelto = Variables.G_STR_TIPO_TARIFAPROMOCION_PROMOCIONES_DESCRIPCION;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_ValorDevuelto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Aportacion del proveedor Texto
|
||||||
|
public string AportacionProveedor_Texto
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_ValorDevuelto = Variables.G_STR_TIPOAPORTACIONPROVEEDOR_COSTE_DESCRIPCION;
|
||||||
|
|
||||||
|
if (aportacionProveedor_Tipo != null)
|
||||||
|
{
|
||||||
|
if (aportacionProveedor_Tipo.Equals(Variables.G_INT_TIPOAPORTACIONPROVEEDOR_TARIFA_CODIGO))
|
||||||
|
{
|
||||||
|
str_ValorDevuelto = Variables.G_STR_TIPOAPORTACIONPROVEEDOR_TARIFA_DESCRIPCION;
|
||||||
|
}
|
||||||
|
else if (aportacionProveedor_Tipo.Equals(Variables.G_INT_TIPOAPORTACIONPROVEEDOR_VENTA_CODIGO))
|
||||||
|
{
|
||||||
|
str_ValorDevuelto = Variables.G_STR_TIPOAPORTACIONPROVEEDOR_VENTA_DESCRIPCION;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_ValorDevuelto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Empresa
|
||||||
|
public string Empresa_Codigo { get; set; }
|
||||||
|
public string Empresa_Descripcion { get; set; }
|
||||||
|
public DateTime? Empresa_FechaBorrado { get; set; }
|
||||||
|
public string Empresa
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Empresa_Codigo != null && Empresa_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Empresa_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Empresa_Descripcion != null && Empresa_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Empresa_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//NomenclaturaPrecio
|
||||||
|
public string NomenclaturaPrecio_Codigo { get; set; }
|
||||||
|
public string NomenclaturaPrecio_Descripcion { get; set; }
|
||||||
|
public DateTime? NomenclaturaPrecio_FechaBorrado { get; set; }
|
||||||
|
public string NomenclaturaPrecio
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (NomenclaturaPrecio_Codigo != null && NomenclaturaPrecio_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + NomenclaturaPrecio_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (NomenclaturaPrecio_Descripcion != null && NomenclaturaPrecio_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += NomenclaturaPrecio_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//AB_Embalaje
|
||||||
|
public string AB_Embalaje_Codigo { get; set; }
|
||||||
|
public string AB_Embalaje_Descripcion { get; set; }
|
||||||
|
public DateTime? AB_Embalaje_FechaBorrado { get; set; }
|
||||||
|
public string AB_Embalaje
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (AB_Embalaje_Codigo != null && AB_Embalaje_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + AB_Embalaje_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (AB_Embalaje_Descripcion != null && AB_Embalaje_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += AB_Embalaje_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//AB_Articulo
|
||||||
|
public string AB_Articulo_Codigo { get; set; }
|
||||||
|
public string AB_Articulo_Descripcion { get; set; }
|
||||||
|
public DateTime? AB_Articulo_FechaBorrado { get; set; }
|
||||||
|
public string AB_Articulo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (AB_Articulo_Codigo != null && AB_Articulo_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + AB_Articulo_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (AB_Articulo_Descripcion != null && AB_Articulo_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += AB_Articulo_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Tasas_Listado_Modelo : MAE_Tasas
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Tasas_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_TelefonosTipos_Listado_Modelo : MAE_TelefonosTipos
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_TelefonosTipos_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,317 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Tesorerias_ContratosPublicos_Listado_Modelo : MAE_Tesorerias
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Tesorerias_ContratosPublicos_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//MayorCuentaContable
|
||||||
|
public string MayorCuentaContable_Codigo { get; set; }
|
||||||
|
public string MayorCuentaContable_Descripcion { get; set; }
|
||||||
|
public DateTime? MayorCuentaContable_FechaBorrado { get; set; }
|
||||||
|
public string MayorCuentaContable
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (MayorCuentaContable_Codigo != null && MayorCuentaContable_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + MayorCuentaContable_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (MayorCuentaContable_Descripcion != null && MayorCuentaContable_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += MayorCuentaContable_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MayorTesoreria
|
||||||
|
public string MayorTesoreria_Codigo { get; set; }
|
||||||
|
public string MayorTesoreria_Descripcion { get; set; }
|
||||||
|
public DateTime? MayorTesoreria_FechaBorrado { get; set; }
|
||||||
|
public string MayorTesoreria
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (MayorTesoreria_Codigo != null && MayorTesoreria_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + MayorTesoreria_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (MayorTesoreria_Descripcion != null && MayorTesoreria_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += MayorTesoreria_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MayorImpuesto
|
||||||
|
public string MayorImpuesto_Codigo { get; set; }
|
||||||
|
public string MayorImpuesto_Descripcion { get; set; }
|
||||||
|
public DateTime? MayorImpuesto_FechaBorrado { get; set; }
|
||||||
|
public string MayorImpuesto
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (MayorImpuesto_Codigo != null && MayorImpuesto_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + MayorImpuesto_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (MayorImpuesto_Descripcion != null && MayorImpuesto_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += MayorImpuesto_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MayorGasto
|
||||||
|
public string MayorGasto_Codigo { get; set; }
|
||||||
|
public string MayorGasto_Descripcion { get; set; }
|
||||||
|
public DateTime? MayorGasto_FechaBorrado { get; set; }
|
||||||
|
public string MayorGasto
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (MayorGasto_Codigo != null && MayorGasto_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + MayorGasto_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (MayorGasto_Descripcion != null && MayorGasto_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += MayorGasto_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MayorComision
|
||||||
|
public string MayorComision_Codigo { get; set; }
|
||||||
|
public string MayorComision_Descripcion { get; set; }
|
||||||
|
public DateTime? MayorComision_FechaBorrado { get; set; }
|
||||||
|
public string MayorComision
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (MayorComision_Codigo != null && MayorComision_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + MayorComision_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (MayorComision_Descripcion != null && MayorComision_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += MayorComision_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MayorProveedor
|
||||||
|
public string MayorProveedor_Codigo { get; set; }
|
||||||
|
public string MayorProveedor_Descripcion { get; set; }
|
||||||
|
public DateTime? MayorProveedor_FechaBorrado { get; set; }
|
||||||
|
public string MayorProveedor
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (MayorProveedor_Codigo != null && MayorProveedor_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + MayorProveedor_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (MayorProveedor_Descripcion != null && MayorProveedor_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += MayorProveedor_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Empresa
|
||||||
|
public string Empresa_Codigo { get; set; }
|
||||||
|
public string Empresa_Descripcion { get; set; }
|
||||||
|
public DateTime? Empresa_FechaBorrado { get; set; }
|
||||||
|
public string Empresa
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Empresa_Codigo != null && Empresa_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Empresa_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Empresa_Descripcion != null && Empresa_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Empresa_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//EntidadBancaria
|
||||||
|
public string EntidadBancaria_Codigo { get; set; }
|
||||||
|
public string EntidadBancaria_Descripcion { get; set; }
|
||||||
|
public DateTime? EntidadBancaria_FechaBorrado { get; set; }
|
||||||
|
public string EntidadBancaria
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (EntidadBancaria_Codigo != null && EntidadBancaria_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + EntidadBancaria_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (EntidadBancaria_Descripcion != null && EntidadBancaria_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += EntidadBancaria_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//MayorAuxiliar
|
||||||
|
public string MayorAuxiliar_Codigo { get; set; }
|
||||||
|
public string MayorAuxiliar_Descripcion { get; set; }
|
||||||
|
public DateTime? MayorAuxiliar_FechaBorrado { get; set; }
|
||||||
|
public string MayorAuxiliar
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (MayorAuxiliar_Codigo != null && MayorAuxiliar_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + MayorAuxiliar_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (MayorAuxiliar_Descripcion != null && MayorAuxiliar_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += MayorAuxiliar_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Departamento
|
||||||
|
public string Departamento_Codigo { get; set; }
|
||||||
|
public string Departamento_Descripcion { get; set; }
|
||||||
|
public DateTime? Departamento_FechaBorrado { get; set; }
|
||||||
|
public string Departamento
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Departamento_Codigo != null && Departamento_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Departamento_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Departamento_Descripcion != null && Departamento_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Departamento_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Pais
|
||||||
|
public string Pais_Codigo { get; set; }
|
||||||
|
public string Pais_Descripcion { get; set; }
|
||||||
|
public DateTime? Pais_FechaBorrado { get; set; }
|
||||||
|
public string Pais
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Pais_Codigo != null && Pais_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Pais_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Pais_Descripcion != null && Pais_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Pais_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,316 @@
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_Tesorerias_Listado_Modelo : MAE_Tesorerias
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_Tesorerias_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//MayorCuentaContable
|
||||||
|
public string MayorCuentaContable_Codigo { get; set; }
|
||||||
|
public string MayorCuentaContable_Descripcion { get; set; }
|
||||||
|
public DateTime? MayorCuentaContable_FechaBorrado { get; set; }
|
||||||
|
public string MayorCuentaContable
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (MayorCuentaContable_Codigo != null && MayorCuentaContable_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + MayorCuentaContable_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (MayorCuentaContable_Descripcion != null && MayorCuentaContable_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += MayorCuentaContable_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MayorTesoreria
|
||||||
|
public string MayorTesoreria_Codigo { get; set; }
|
||||||
|
public string MayorTesoreria_Descripcion { get; set; }
|
||||||
|
public DateTime? MayorTesoreria_FechaBorrado { get; set; }
|
||||||
|
public string MayorTesoreria
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (MayorTesoreria_Codigo != null && MayorTesoreria_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + MayorTesoreria_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (MayorTesoreria_Descripcion != null && MayorTesoreria_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += MayorTesoreria_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MayorImpuesto
|
||||||
|
public string MayorImpuesto_Codigo { get; set; }
|
||||||
|
public string MayorImpuesto_Descripcion { get; set; }
|
||||||
|
public DateTime? MayorImpuesto_FechaBorrado { get; set; }
|
||||||
|
public string MayorImpuesto
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (MayorImpuesto_Codigo != null && MayorImpuesto_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + MayorImpuesto_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (MayorImpuesto_Descripcion != null && MayorImpuesto_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += MayorImpuesto_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MayorGasto
|
||||||
|
public string MayorGasto_Codigo { get; set; }
|
||||||
|
public string MayorGasto_Descripcion { get; set; }
|
||||||
|
public DateTime? MayorGasto_FechaBorrado { get; set; }
|
||||||
|
public string MayorGasto
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (MayorGasto_Codigo != null && MayorGasto_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + MayorGasto_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (MayorGasto_Descripcion != null && MayorGasto_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += MayorGasto_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MayorComision
|
||||||
|
public string MayorComision_Codigo { get; set; }
|
||||||
|
public string MayorComision_Descripcion { get; set; }
|
||||||
|
public DateTime? MayorComision_FechaBorrado { get; set; }
|
||||||
|
public string MayorComision
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (MayorComision_Codigo != null && MayorComision_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + MayorComision_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (MayorComision_Descripcion != null && MayorComision_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += MayorComision_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MayorProveedor
|
||||||
|
public string MayorProveedor_Codigo { get; set; }
|
||||||
|
public string MayorProveedor_Descripcion { get; set; }
|
||||||
|
public DateTime? MayorProveedor_FechaBorrado { get; set; }
|
||||||
|
public string MayorProveedor
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (MayorProveedor_Codigo != null && MayorProveedor_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + MayorProveedor_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (MayorProveedor_Descripcion != null && MayorProveedor_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += MayorProveedor_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Empresa
|
||||||
|
public string Empresa_Codigo { get; set; }
|
||||||
|
public string Empresa_Descripcion { get; set; }
|
||||||
|
public DateTime? Empresa_FechaBorrado { get; set; }
|
||||||
|
public string Empresa
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Empresa_Codigo != null && Empresa_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Empresa_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Empresa_Descripcion != null && Empresa_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Empresa_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//EntidadBancaria
|
||||||
|
public string EntidadBancaria_Codigo { get; set; }
|
||||||
|
public string EntidadBancaria_Descripcion { get; set; }
|
||||||
|
public DateTime? EntidadBancaria_FechaBorrado { get; set; }
|
||||||
|
public string EntidadBancaria
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (EntidadBancaria_Codigo != null && EntidadBancaria_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + EntidadBancaria_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (EntidadBancaria_Descripcion != null && EntidadBancaria_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += EntidadBancaria_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MayorAuxiliar
|
||||||
|
public string MayorAuxiliar_Codigo { get; set; }
|
||||||
|
public string MayorAuxiliar_Descripcion { get; set; }
|
||||||
|
public DateTime? MayorAuxiliar_FechaBorrado { get; set; }
|
||||||
|
public string MayorAuxiliar
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (MayorAuxiliar_Codigo != null && MayorAuxiliar_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + MayorAuxiliar_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (MayorAuxiliar_Descripcion != null && MayorAuxiliar_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += MayorAuxiliar_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Departamento
|
||||||
|
public string Departamento_Codigo { get; set; }
|
||||||
|
public string Departamento_Descripcion { get; set; }
|
||||||
|
public DateTime? Departamento_FechaBorrado { get; set; }
|
||||||
|
public string Departamento
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Departamento_Codigo != null && Departamento_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Departamento_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Departamento_Descripcion != null && Departamento_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Departamento_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Pais
|
||||||
|
public string Pais_Codigo { get; set; }
|
||||||
|
public string Pais_Descripcion { get; set; }
|
||||||
|
public DateTime? Pais_FechaBorrado { get; set; }
|
||||||
|
public string Pais
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Pais_Codigo != null && Pais_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Pais_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Pais_Descripcion != null && Pais_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Pais_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_TiposGastos_Listado_Modelo : MAE_TiposGastos
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_TiposGastos_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Empresa
|
||||||
|
public string Empresa_Codigo { get; set; }
|
||||||
|
public string Empresa_Descripcion { get; set; }
|
||||||
|
public DateTime? Empresa_FechaBorrado { get; set; }
|
||||||
|
public string Empresa
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Empresa_Codigo != null && Empresa_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Empresa_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Empresa_Descripcion != null && Empresa_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Empresa_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Exferia_EntityFramework;
|
||||||
|
using Exferia_Aplicacion.General;
|
||||||
|
using Exferia_Maestros.General;
|
||||||
|
|
||||||
|
namespace Exferia_Maestros._0_Modelos
|
||||||
|
{
|
||||||
|
public class INTERNO_MAE_TiposPagos_Listado_Modelo: MAE_TiposPagos
|
||||||
|
{
|
||||||
|
public INTERNO_MAE_TiposPagos_Listado_Modelo()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public long codigo_Long
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long lng_Codigo = 0;
|
||||||
|
if (Funciones.IsNumeric(codigo))
|
||||||
|
{
|
||||||
|
lng_Codigo = long.Parse(codigo);
|
||||||
|
}
|
||||||
|
return lng_Codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Empresa
|
||||||
|
public string Empresa_Codigo { get; set; }
|
||||||
|
public string Empresa_Descripcion { get; set; }
|
||||||
|
public DateTime? Empresa_FechaBorrado { get; set; }
|
||||||
|
public string Empresa
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (Empresa_Codigo != null && Empresa_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + Empresa_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (Empresa_Descripcion != null && Empresa_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += Empresa_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//PredefinidoCabereca
|
||||||
|
public string PredefinidoCabecera_Codigo { get; set; }
|
||||||
|
public string PredefinidoCabecera_Descripcion { get; set; }
|
||||||
|
public DateTime? PredefinidoCabecera_FechaBorrado { get; set; }
|
||||||
|
public string PredefinidoCabecera
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str_Aux = "";
|
||||||
|
|
||||||
|
//Codigo
|
||||||
|
if (PredefinidoCabecera_Codigo != null && PredefinidoCabecera_Codigo.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux = "(" + PredefinidoCabecera_Codigo + ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
//Descripcion
|
||||||
|
if (PredefinidoCabecera_Descripcion != null && PredefinidoCabecera_Descripcion.Trim().Length > 0)
|
||||||
|
{
|
||||||
|
str_Aux += PredefinidoCabecera_Descripcion;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str_Aux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue