2 using System.Collections.Generic;
11 internal class UpdateNombreCommand : Command
13 public UpdateNombreCommand(IAddonsManager addons) : base(addons)
15 Name =
"UpdateNombreCommand";
18 protected override void CommandModulo(
IModulo modulo, params
object[] parameters)
20 if (modulo.
_Tipo == 3 &&
25 string tcPantalla = parameters[0].ToString();
26 string tcNombreViejo = parameters[1].ToString();
27 string tcNombreNuevo = parameters[2].ToString();
29 DataTable ldtTemp =
new DataTable();
30 string lcSql = $
@"SELECT * from {DB.SQLDatabase(lcAliasDb, "MENU50
")} 31 WHERE pantalla = {DB.SQLString(tcPantalla)}";
32 if (!
string.IsNullOrWhiteSpace(tcNombreViejo))
34 AND nombre = {DB.SQLString(tcNombreViejo)}";
36 if (DB.SQLExec(lcSql, ref ldtTemp) && ldtTemp.Rows.Count > 0)
38 lcSql = $
@"UPDATE {DB.SQLDatabase(lcAliasDb, "MENU50
")} 39 SET nombre = {DB.SQLString(tcNombreNuevo)} 40 WHERE pantalla = {DB.SQLString(tcPantalla)}";
42 if (!
string.IsNullOrWhiteSpace(tcNombreViejo))
44 AND nombre = {DB.SQLString(tcNombreViejo)}";
50 protected override ExpectedParameters GetExpectedParameters()
52 return new ExpectedParameters(
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