private bool ValidarIngreso() { try { FrmSeg_Login login = new FrmSeg_Login(); login.ShowDialog(this); if (param.IdUsuario == null) { Application.Exit(); return(false); } FrmSeg_Login_x_Empresas frm_login_x_empresas = new FrmSeg_Login_x_Empresas(); frm_login_x_empresas.ShowDialog(this); InfoEmpresa = param.InfoEmpresa; InfoUsuario = param.InfoUsuario; tb_Empresa_Bus BusEmpresa = new tb_Empresa_Bus(); byte[] fondo = BusEmpresa.Get_Fondo_Pantalla_x_Empresa(param.InfoEmpresa.IdEmpresa); if (fondo != null) { this.BackgroundImage = Funciones.ArrayAImage(fondo); this.BackgroundImageLayout = ImageLayout.Stretch; } bei_logo.EditValue = InfoEmpresa.em_logo; switch (param.IdCliente_Ven_x_Default) { case Cl_Enumeradores.eCliente_Vzen.FJ: blcApariencia.Visibility = BarItemVisibility.Never; break; default: blcApariencia.Visibility = BarItemVisibility.Always; break; } return(true); } catch (Exception ex) { string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name; NameMetodo = NameMetodo + " - " + ex.ToString(); MessageBox.Show(NameMetodo + " " + param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) , param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString()); return(false); } }
private bool ValidarIngreso() { try { FrmSeg_Login login = new FrmSeg_Login(); login.ShowDialog(this); if (param.IdUsuario == null) { Application.Exit(); return(false); } FrmSeg_Login_x_Empresas frm_login_x_empresas = new FrmSeg_Login_x_Empresas(); frm_login_x_empresas.ShowDialog(this); InfoEmpresa = param.InfoEmpresa; InfoUsuario = param.InfoUsuario; tb_Empresa_Bus BusEmpresa = new tb_Empresa_Bus(); byte[] fondo = BusEmpresa.Get_Fondo_Pantalla_x_Empresa(param.InfoEmpresa.IdEmpresa); if (fondo != null) { this.BackgroundImage = Funciones.ArrayAImage(fondo); } if (InfoEmpresa.em_nombre.Equals("DESARROLLO") || InfoEmpresa.em_nombre.Equals("DESarrollo") || InfoEmpresa.em_nombre.Equals("desARROllo") || InfoEmpresa.em_nombre.Equals("desarroLLO")) { LBLMENSAJE.Visible = true; } return(true); } catch (Exception ex) { string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name; NameMetodo = NameMetodo + " - " + ex.ToString(); MessageBox.Show(NameMetodo + " " + param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) , param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString()); return(false); } }