2 using System.Collections.Generic;
11 internal class GetInfoFromPantallaListadosCommand : Command
14 public GetInfoFromPantallaListadosCommand(IAddonsManager addons) : base(addons)
16 Name =
"GetInfoFromPantallaListados";
19 protected override void CommandModulo(
IModulo modulo, params
object[] parameters)
21 string tcPantalla = parameters[0].ToString();
22 Func<string, string> _FormatearStringEspecial = parameters[1] as Func<string, string>;
23 Func<string, string> _Revisar_Descripcio = parameters[2] as Func<string, string>;
24 DataTable ldtResult =
new DataTable();
28 string lcCampoUpdate = DB.SQLExisteCampo(lcAliasDb,
"LISTADOS",
"UPDATE") ?
"CAST([UPDATE] AS varchar(max)) " :
"''";
29 string lcGroupUpdate = lcCampoUpdate.StartsWith(
"C") ?
"," + lcCampoUpdate :
"";
31 string lcSql = $
@"select top 1 ID,PANTALLA,NOMBRE,NOMBRE as NOMBRE_REAL,CLASE,CLASEPADRE,ADICIONAL,CAST(FORM AS varchar(max)) as FORM 32 , max(TIPO) as TIPO,SELIVA,PERS,PERSMODULO,FIRMA,TAREA,MULTIEJER, {lcCampoUpdate} AS [UPDATE] 33 from {DB.SQLDatabase(lcAliasDb, "listados
")} 34 where PANTALLA = {DB.SQLString(tcPantalla)} 35 group by ID,PANTALLA,NOMBRE,CLASE,CLASEPADRE,ADICIONAL,SELIVA,CAST(FORM AS varchar(max)),SELIVA,PERS,PERSMODULO,FIRMA,TAREA,MULTIEJER {lcGroupUpdate} 38 DB.SQLExec(lcSql, ref ldtResult);
41 if (ldtResult != null && ldtResult.Rows.Count > 0)
44 ldtResult.Rows[0][
"NOMBRE"] = _FormatearStringEspecial(_Revisar_Descripcio(ldtResult.Rows[0][
"NOMBRE"].ToString()));
45 ret = ldtResult.Rows[0];
49 protected override ExpectedParameters GetExpectedParameters()
51 return new ExpectedParameters(
new Type[] { typeof(
string), typeof(Func<string, string>), typeof(Func<string, string>) });
53 protected override object Return(params
object[] parameters)
57 protected override bool Exit()
PE-93426 Interficie para los módulos de la aplicación
string _NombreConexion
Nombre real de la base de datos
string _AliasDB
Alias de la Base de datos