24 #endregion PROPIEDADES 26 #region PROPIEDADES privadas 28 private bool _bUsingContactsCapture =
false;
42 InitializeComponent();
54 InitializeComponent();
55 _GrupoEmpresa = toGrupo;
63 private void ConstructorPrivado()
65 lblBusiness.Visible =
false;
66 btBusinessCenter.Visible =
false;
68 btAsociarCuenta._GoogleAnalytics =
true;
69 btLiberarCuenta._GoogleAnalytics =
true;
71 CambiosContactCapture();
74 #endregion CONSTRUCTORES 93 #region METODOS PRIVADOS 95 private void CambiosContactCapture()
97 if (_GrupoEmpresa != null)
98 _bUsingContactsCapture = _GrupoEmpresa.IsConctactsEnabled();
105 if (_bUsingContactsCapture)
107 lblInfo.Text =
"Configura desde esta opción una cuenta de Microsoft 365 Business Standard para activar la funcionalidad de copia de seguridad en la nube Cloud Backup y la sincronización con Outlook de los datos mas relevantes de Clientes,proveedores y sus contactos mediante Sage Apps";
108 lblBusiness.Visible =
true;
109 btBusinessCenter.Visible =
true;
113 lblInfo.Text =
"Configura desde esta opción una cuenta de Microsoft 365 Business Standard para activar la funcionalidad de copia de seguridad en la nube Cloud Backup";
114 lblBusiness.Visible =
false;
115 btBusinessCenter.Visible =
false;
124 private void btAsociarCuenta_Click(
object sender, EventArgs e)
131 if (btAsociarCuenta.Text ==
"Actualizar credenciales")
140 btAsociarCuenta.Text =
"Actualizar credenciales";
141 if (_bUsingContactsCapture)
143 btBusinessCenter.Visible =
true;
144 lblBusiness.Visible =
true;
148 btBusinessCenter.Visible =
false;
149 lblBusiness.Visible =
false;
151 btLiberarCuenta.Enabled =
true;
153 EW_GLOBAL._SaveDbVariable(
"wl_o365",
true);
155 FUNCTIONS._MessageBox(
"Se ha logado con éxito a Microsoft365/Overdrive",
"Login correcto", MessageBoxButtons.OK, MessageBoxIcon.Information);
159 FUNCTIONS._MessageBox(
"Login incorrecto a Microsoft365/Overdrive",
"Login incorrecto", MessageBoxButtons.OK, MessageBoxIcon.Information);
168 private void btLiberarCuenta_Click(
object sender, EventArgs e)
174 DialogResult loResult = FUNCTIONS._MessageBox(
"Se eliminará la configuración que permite realizar las copias de seguridad Cloud Backup y la sincronización de datos con Outlook con Sage Contact. ¿Desea continuar?",
"Liberar cuenta", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
176 if (loResult == DialogResult.Yes)
181 _GrupoEmpresa._LiberarCuenta();
188 btAsociarCuenta.Text =
"Asociar Cuenta";
189 lblBusiness.Visible =
false;
190 btBusinessCenter.Visible =
false;
191 btLiberarCuenta.Enabled =
false;
192 txtCuentaO365.Text =
"";
193 EW_GLOBAL._SaveDbVariable(
"wl_o365",
false);
196 var mensaje = $
"Cuenta Office365/Overdrive liberada con éxito." + Environment.NewLine + Environment.NewLine +
"Para el correcto funcionamiento es necesario reiniciar la aplicación.";
197 FUNCTIONS._MessageBox(mensaje,
"Logout Overdrive", MessageBoxButtons.OK, MessageBoxIcon.Information);
200 _CuentaLiberada?.Invoke();
203 FUNCTIONS._CerrarAplicacion();
213 private void btBusinessCenter_Click(
object sender, EventArgs e)
215 System.Diagnostics.Process.Start(
"https://ceo365portal.na.sage.com/Home/Landing");
218 #endregion METODOS PRIVADOS 221 #region METODOS PUBLICOS 234 string lcMensajeErrorSO =
"";
235 if (!FUNCTIONS._RequisitosVersionSO(out lcMensajeErrorSO))
244 btAsociarCuenta.Text =
"Actualizar credenciales";
245 if (_bUsingContactsCapture)
247 btBusinessCenter.Visible =
true;
248 lblBusiness.Visible =
true;
252 btBusinessCenter.Visible =
false;
253 lblBusiness.Visible =
false;
255 btLiberarCuenta.Enabled =
true;
259 txtCuentaO365.Text =
"";
264 #endregion METODOS PUBLICOS
CuentaOffice365()
Constructor
bool LoginOverdrive()
PE-104237: Método para hacer el login o refrescar las credenciales de Overdrive para un determinado g...
delegate void _CuentaLiberadaDelegado()
Definición del delegado para el evento que se disparará al liberar una cuenta de office 365 ...
static void _Show(string tcTexto, string tcTitulo, int tnTimeout)
Método show. Instancia la clase.
Interficie de operaciones adicionales del UserControl CuentaOffice365
bool LogoutOverDrive()
PE-104237: Método para hacer logout de OverDrive
CuentaOffice365(GrupoEmpresa toGrupo)
Constructor con mante
bool _Login()
Método para lanzar login de credenciales
PE-104237: Clase con métodos estáticos para realizar las llamadas por reflection al conector de AppAd...
string ObtenerUsuarioLogueado()
Task 128909: Obtener Usuario Logueado a O365
bool IsConctactsEnabled()
Task 184846: Obtener si está activada la variable que nos indica que Contacts/Capture han de ser visi...
Task 137442. Usercontrol para la cuenta de Microsoft 365
bool CheckLoginOverDrive()
PE-104237: Comprobar la conexión con Overdrive si ya estamos o no logueados
Clase para el control de grupos de empresa (nuevo enfoque en Sage50, desaparece el multiempresa...
_CuentaLiberadaDelegado _CuentaLiberada
Definición del delegado para el evento _CuentaLiberada
Clase auxiliar para mostrar mensajes de error que se cierren temporizados