Information.cs
1 #region Usings
2 using sage.ew.contabilidad;
3 using sage.ew.global;
5 using System;
6 using System.Collections.Generic;
7 using System.Linq;
8 using System.Text;
9 #endregion Usings
10 
11 namespace Sage.ES.S50.Modelos
12 {
16  public class Information : IInformation
17  {
18  #region Propiedades privadas
19  private string _cApiUserId = string.Empty;
20  private string _cCompanyId = string.Empty;
21  private string _cVersionId = string.Empty;
22  private string _cBusinessId = string.Empty;
23  private eComplianceWorkingMode _oWorkingMode = eComplianceWorkingMode.Debug;
24  #endregion Propiedades privadas
25 
26  #region Propiedades públicas
27  public string _ApiUserId
31  {
32  get { return _cApiUserId; }
33  }
34 
38  public string _BusinessId
39  {
40  get { return _cBusinessId; }
41  set { _cBusinessId = value; }
42  }
43 
47  public string _CompanyId
48  {
49  get { return _cCompanyId; }
50  }
51 
55  public string _VersionId
56  {
57  get { return _cVersionId; }
58  set { _cVersionId = value; }
59  }
60 
64  public string _APIKey
65  {
66  get { return _cAPIKey; }
67  }
68 
72  public eComplianceWorkingMode _WorkingMode
73  {
74  get { return _oWorkingMode; }
75  set
76  {
77  _oWorkingMode = value;
78  }
79  }
80 
91  private string _cAPIKey
92  {
93  get
94  {
95  string lcAPIKey = "";
96 
97  switch (_oWorkingMode)
98  {
99  case eComplianceWorkingMode.PreDebugUAT5:
100  break;
101 
102  case eComplianceWorkingMode.PreDebugUAT2:
103  break;
104 
105  case eComplianceWorkingMode.PreDebug: // UAT4
106  break;
107 
108  case eComplianceWorkingMode.Debug: // UAT
109  lcAPIKey = "96SGWb2dYj9CHwyuEj3RB34KlFt7aAkRaGwVoCfc";
110  break;
111 
112  case eComplianceWorkingMode.PreProduction:
113  lcAPIKey = "Qp7EeAY9KS7x966H0IK65abaqOql4mt9WdNd1786";
114  break;
115 
116  case eComplianceWorkingMode.Production:
117  lcAPIKey = "uYliLFpJSo40jOAoJ8hAE143TgRRyPDs8izORkpu";
118  break;
119 
120  default:
121  break;
122  }
123 
124  return lcAPIKey;
125  }
126  }
127  #endregion Propiedades públicas
128 
129  #region Constructor
130  public Information()
134  {
135  _cApiUserId = "S50";
136  _cCompanyId = Convert.ToString(EW_GLOBAL._GetVariable("wc_concomunes")) + Convert.ToString(EW_GLOBAL._GetVariable("wc_empresa"));
137  _cVersionId = "50.0.7650"; // Indicamos la primera versión del Compliance
138  }
139 
144  public Information(string tcEmpresa)
145  {
146  _cApiUserId = "S50";
147  _cCompanyId = Convert.ToString(EW_GLOBAL._GetVariable("wc_empresa"));
148  _cVersionId = "50.0.7650"; // Indicamos la primera versión del Compliance
149  }
150  #endregion Constructor
151  }
152 }
eComplianceWorkingMode
Enumeración para el Working Mode de conectarse al Compliance necesario para poder establecer el EndPo...
Intefaz para la información de empresa
Definition: IInformation.cs:14
Clas de información del Compliance
Definition: Information.cs:16
Information(string tcEmpresa)
Constructor para consultar declaraciones anteriores a fecha 9/2/21
Definition: Information.cs:144