AperturaMethod.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using sage.ew.interficies;
6 
7 namespace Sage.ES.S50.Addons
8 {
9  internal class AperturaMethod : Command
10  {
11  public AperturaMethod(IAddonsManager oAddons) : base(oAddons)
12  {
13  Name = "Apertura";
14  }
15 
16  protected override void CommandModulo(IModulo modulo, params object[] parameters)
17  {
18  bool lOk = modulo._Apertura(parameters[0].ToString(), parameters[1].ToString());
19  if (!lOk)
20  {
21  throw new Exception(!string.IsNullOrWhiteSpace(modulo._Error_Message) ? modulo._Error_Message : "Incidencia sin definir."); //Task 179594
22  //OnError(new CommandErrorEventArgs(Name, modulo._Nombre, modulo._Error_Message));
23  }
24  }
25  protected override bool Condition(KeyValuePair<string, object> addon)
26  {
27  return (IModulo)addon.Value != null;
28  }
29 
30  protected override ExpectedParameters GetExpectedParameters()
31  {
32  return new ExpectedParameters(new Type[] { typeof(string), typeof(string) });
33  }
34 
35  }
36 }
PE-93426 Interficie para los módulos de la aplicación
Definition: IModulo.cs:22
string _Error_Message
Contiene el último texto de error generado
Definition: IModulo.cs:84
bool _Apertura(string tcEjerAnt, string tcEjerActual)
Task 122583: Método para realizar la apertura del Addon