protected void hlInter_Click(object sender, EventArgs e) { try { BD.Conectar(); BD.CrearComando(@"SELECT idComPago FROM GeneralPago WHERE edoInter=@estat"); BD.AsignarParametroCadena("@estat", "0"); DbDataReader DR = BD.EjecutarConsulta(); while (DR.Read()) { allId.Add(DR[0].ToString()); val_Imp.Add(true); } BD.Desconectar(); } catch (Exception ex) { anade_linea_archivo(archivo_log, "1.- " + ex.ToString()); BD.Desconectar(); } ////////////////////////////////////////interfaz en curso BD.Conectar(); BD.CrearComando(@"SELECT idInterfaz, estatus FROM Interfaz where estatus=@sta ORDER BY idInterfaz DESC"); BD.AsignarParametroCadena("@sta", "Procesando"); DbDataReader DR1 = BD.EjecutarConsulta(); if (DR1.Read()) { estatus = DR1[1].ToString(); } BD.Desconectar(); if (!estatus.Equals("Procesando", StringComparison.OrdinalIgnoreCase)) { ///////////////////////////////////////////////////// if (allId.Count > 0) { System.Net.ServicePointManager.ServerCertificateValidationCallback += delegate(object sender1, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors) { return(true); }; GInterComp.GInterfazComplemento Generar = new GInterComp.GInterfazComplemento(); try { new Thread(() => { GInterfazCom("", "", true, "todos"); }).Start(); Session["estNot"] = true; Session["msjNoti"] = "GENERANDO INTERFAZ DE COMPLEMENTO, SI NO APARECE EN EL LISTADO FAVOR DE RECARGAR LA PAGINA"; Session["estPan"] = true; Panel56.Visible = false; } catch (Exception ex) { Session["estNot"] = false; Session["msjNoti"] = "NO ES POSIBLE CONECTAR CON EL SERVIDOR"; Session["estPan"] = true; } } else { Session["estNot"] = false; Session["msjNoti"] = "NO HAY COMPLEMENTOS DE PAGO PARA GENERAR INTERFAZ"; Session["estPan"] = true; } } else { Session["estNot"] = false; Session["msjNoti"] = "HAY UNA INTERFAZ DE COMPLEMENTO DE PAGO EN PROCESO"; Session["estPan"] = true; } Pinterfaz.Width = 20; Pinterfaz.Height = 20; Pinterfaz.Visible = false; }
public async void GInterfazCom(string RazonSocial = "", string TipoProveedor = "", bool grabar_en_bd = false, string numero_registros = "todos") { GInterComp.GInterfazComplemento Generar = new GInterComp.GInterfazComplemento(); Generar.GeneraInterfazComAsync("", "", true, "todos"); }