LoadManteDBCommand.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using sage.ew.db;
6 using sage.ew.interficies;
7 
8 namespace Sage.ES.S50.Addons
9 {
10  internal class LoadManteDBCommand : Command
11  {
12  int ret = 0;
13  public LoadManteDBCommand(IAddonsManager addons) : base(addons)
14  {
15  Name = "LoadManteDB";
16  }
17 
18  protected override void CommandModulo(IModulo modulo, params object[] parameters)
19  {
20  Func<string, string, string, bool> _LoadManteDb = parameters[0] as Func<string, string, string, bool>;
21  string tcFormularioFox = parameters[1].ToString();
22  string lcFiltro = parameters[2].ToString();
23  if (DB._SQLExisteTablaBBDD(modulo._NombreConexion, "MANTES"))
24  {
25  if (_LoadManteDb(tcFormularioFox, lcFiltro, modulo._AliasDB))
26  {
27  ret = 1;
28  }
29  }
30  }
31  protected override bool Exit()
32  {
33  return ret == 1;
34  }
35  protected override object Return(params object[] parameters)
36  {
37  return ret;
38  }
39 
40  protected override ExpectedParameters GetExpectedParameters()
41  {
42  //private static bool _LoadManteDb(string tcFormularioFox, string tcFiltro, string tcAliasDb = "COMUNES")
43  return new ExpectedParameters(new Type[] { typeof(Func<string, string, string, bool>), typeof(string), typeof(string) });
44  }
45  }
46 }
PE-93426 Interficie para los módulos de la aplicación
Definition: IModulo.cs:22
string _NombreConexion
Nombre real de la base de datos
Definition: IModulo.cs:59
string _AliasDB
Alias de la Base de datos
Definition: IModulo.cs:29