private void button4_Click(object sender, EventArgs e) { string error = ""; Basico._ticket_retorno(ref error); if (error.Length > 0) { MessageBox.Show(error); } }
void tmpServicioTR_Elapsed(object sender, ElapsedEventArgs e) { //string varchivov = "c://valida_hash.txt"; Int32 _valor = 0; try { //if (!(System.IO.File.Exists(varchivov))) if (_valida_service_TR == 0) { _valor = 1; _valida_service_TR = 1; string _error = ""; Basico._ticket_retorno(ref _error);// Basico._ejecuta_proceso(ref _error); _valida_service_TR = 0; if (_error.Length > 0) { TextWriter tw = new StreamWriter(@"D:\POS\Transmision.net\ERROR.txt", true); tw.WriteLine(_error); tw.Flush(); tw.Close(); tw.Dispose(); } } //**************************************************************************** } catch (Exception EXC) { TextWriter tw = new StreamWriter(@"D:\POS\Transmision.net\ERROR.txt", true); tw.WriteLine(EXC.Message); tw.Flush(); tw.Close(); tw.Dispose(); _valida_service_TR = 0; } if (_valor == 1) { _valida_service_TR = 0; } }