Пример #1
0
        void tmpServicioRG_Elapsed(object sender, ElapsedEventArgs e)
        {
            //string varchivov = "c://valida_hash.txt";
            Int32 _valor = 0;

            try
            {
                //if (!(System.IO.File.Exists(varchivov)))
                if (_valida_serviceRG == 0)
                {
                    _valor            = 1;
                    _valida_serviceRG = 1;
                    string _error = "";
                    Basico._recepcionar_guias(ref _error);// Basico._ejecuta_proceso(ref _error);
                    _valida_serviceRG = 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_serviceRG = 0;
            }

            if (_valor == 1)
            {
                _valida_serviceRG = 0;
            }
        }