コード例 #1
0
        public BIM.BusinessEntities.VerificadorPLD ServicioVerificadorPLD(BIM.BusinessEntities.BitacoraPLD parametros)
        {
            BIM.BusinessEntities.VerificadorPLD result = null;
            try
            {
                result = (new VerificadorPLDLogic()).ServicioVerificadorPLD(parametros);
            }
            catch (Exception ex)
            {
#if (DEBUG)
                if (Directory.Exists(RepositorioTmpLocal))
                {
                    Directory.CreateDirectory(RepositorioTmpLocal);
                }

                string msg = DateTime.Today.ToShortDateString() + " - " + DateTime.Today.ToShortTimeString() + " Mensaje error: " + ex.Message;

                File.AppendAllText(RepositorioTmpLocal + ArchivoError, msg);
#else
                EventLogManager.LogErrorEntry("Error en VerificadorPLDServices.ServicioVerificadorPLD: " + ex.Message);
                //TODO: Codificar envío de notificación de error al EventLog
#endif
            }
            return(result);
        }
コード例 #2
0
        public BIM.BusinessEntities.VerificadorPLD ServicioVerificadorPLD(BIM.BusinessEntities.BitacoraPLD parametros)
        {
            BIM.BusinessEntities.VerificadorPLD result = null;
            try
            {
                result = (new VerificadorPLDLogic()).ServicioVerificadorPLD(parametros);
            }
            catch (Exception ex)
            {
#if (DEBUG)
                const string fic   = @"C:\inetpub\wwwroot\PLD\Prueba.txt";
                string       texto = ex.Message;

                System.IO.StreamWriter sw = new System.IO.StreamWriter(fic);
                sw.WriteLine(texto);
                sw.Close();


                //Console.WriteLine("Error en VerificadorPLDServices.ServicioVerificadorPLD: " + ex.Message);

                //if (!EventLog.SourceExists(cs))
                //    EventLog.CreateEventSource(cs, "Application");

                //EventLog.WriteEntry(cs, ex.Message, EventLogEntryType.Error);
#else
                EventLogManager.LogErrorEntry("Error en VerificadorPLDServices.ServicioVerificadorPLD: " + ex.Message);
                //TODO: Codificar envío de notificación de error al EventLog
#endif
            }
            return(result);
        }