public List <beControlSenalSupCaidasFalloTestControlCierre> ListarFalloTest(string Dstb, string Abnd, string Time, string Dpto, int TipoAbnd)
        {
            List <beControlSenalSupCaidasFalloTestControlCierre> lbeFalloTest = null;

            using (SqlConnection con = new SqlConnection(Conexion))
            {
                try
                {
                    con.Open();
                    daFalloTest odaFalloTest = new daFalloTest();
                    lbeFalloTest = odaFalloTest.ListarFalloTest(con, Dstb, Abnd, Time, Dpto, TipoAbnd);
                }
                catch (SqlException ex)
                {
                    beLog obeLog;
                    foreach (SqlError err in ex.Errors)
                    {
                        obeLog = new beLog();
                        obeLog.MensajeError = err.Message;
                        obeLog.DetalleError = ex.StackTrace;
                        ucObjeto.Grabar(obeLog, ArchivoLog);
                    }
                }
                catch (Exception ex)
                {
                    beLog obeLog = new beLog();
                    obeLog.MensajeError = ex.Message;
                    obeLog.DetalleError = ex.StackTrace;
                    ucObjeto.Grabar(obeLog, ArchivoLog);
                }
            }
            return(lbeFalloTest);
        }
Пример #2
0
        public void GrabarLog(Exception ex)
        {
            beLog obeLog = new beLog();

            obeLog.MensajeError = ex.Message;
            obeLog.DetalleError = ex.StackTrace;
            string archivo = String.Format("{0}LogError_{1}_{2}_{3}.txt", rutaLog, DateTime.Now.Year,
                                           DateTime.Now.Month.ToString().PadLeft(2, '0'), DateTime.Now.Day.ToString().PadLeft(2, '0'));

            ucObjeto.Grabar(obeLog, archivo);
        }
Пример #3
0
        public void GrabarLog(string MesanjeError, string DetalleError)
        {
            beLog obeLog = new beLog();

            obeLog.FechaHora = DateTime.Now;
            obeLog.Usuario   = "Sebastian Mateus";
            //obeLog.Usuario = HttpContext.Current.Session[""].ToString();
            obeLog.MensageError = MesanjeError;
            obeLog.DetalleError = DetalleError;
            obeLog.Aplicacion   = ConfigurationManager.AppSettings["aplicacion"];
            obeLog.IP_Cliente   = HttpContext.Current.Request.UserHostAddress;
            Objeto.Grabar(obeLog, archivoLog);
        }
 public brGeneral()
 {
     try
     {
         Conexion = ConfigurationManager.ConnectionStrings["ConWatcher"].ConnectionString;
         string rutaLog = ConfigurationManager.AppSettings["rutaLog"];
         ArchivoLog = String.Format("{0}{1}.txt", rutaLog, "Log" + DateTime.Now.Day.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Year.ToString());
     }
     catch (Exception ex)
     {
         beLog obeLog = new beLog();
         obeLog.MensajeError = ex.Message;
         obeLog.DetalleError = ex.StackTrace;
         ucObjeto.Grabar(obeLog, ArchivoLog);
     }
 }
Пример #5
0
 public brGeneral()
 {
     try
     {
         Conexion = ConfigurationManager.ConnectionStrings["ConWatcher"].ConnectionString;
         string rutaLog = ConfigurationManager.AppSettings["rutaLog"];
         ArchivoLog = String.Format("{0}{1}.txt", rutaLog,
                                    ucCadena.formatearAMD("Log"));
     }
     catch (Exception ex)
     {
         beLog obeLog = new beLog();
         obeLog.MensajeError = ex.Message;
         obeLog.DetalleError = ex.StackTrace;
         ucObjeto <beLog> .grabarArchivoTexto(ArchivoLog, obeLog);
     }
 }
        public bool RegistrarAlarma(string alarmcode, string csid, string PhysicalZone, string UserAssigned, out string outIdAlarmhistory, out string outDateTimeOccurred)
        {
            bool updated = false;

            using (SqlConnection con = new SqlConnection(Conexion))
            {
                try
                {
                    con.Open();
                    daEventoAdministrativo odadaEventoAdministrativo = new daEventoAdministrativo();
                    updated = odadaEventoAdministrativo.RegistrarAlarma(con, alarmcode, csid, PhysicalZone, UserAssigned, out outIdAlarmhistory, out outDateTimeOccurred);
                }
                catch (SqlException ex)
                {
                    beLog obeLog;
                    foreach (SqlError err in ex.Errors)
                    {
                        obeLog = new beLog();
                        obeLog.MensajeError = err.Message;
                        obeLog.DetalleError = ex.StackTrace;
                        ucObjeto.Grabar(obeLog, ArchivoLog);
                    }
                    outDateTimeOccurred = "";
                    outIdAlarmhistory   = "";
                }
                catch (Exception ex)
                {
                    beLog obeLog = new beLog();
                    obeLog.MensajeError = ex.Message;
                    obeLog.DetalleError = ex.StackTrace;
                    ucObjeto.Grabar(obeLog, ArchivoLog);
                    outDateTimeOccurred = "";
                    outIdAlarmhistory   = "";
                }
            }
            return(updated);
        }
Пример #7
0
        public bool InsertarFichaAtencion(Int64 ID_Ficha, string CSID, string Usuario, out string outID_Atencion)
        {
            bool updated = false;

            using (SqlConnection con = new SqlConnection(Conexion))
            {
                try
                {
                    con.Open();
                    daFichaAtenciones odaFichaAtencion = new daFichaAtenciones();
                    updated = odaFichaAtencion.InsertarFichaAtencion(con, ID_Ficha, CSID, Usuario, out outID_Atencion);
                }
                catch (SqlException ex)
                {
                    beLog obeLog;
                    foreach (SqlError err in ex.Errors)
                    {
                        obeLog = new beLog();
                        obeLog.MensajeError = err.Message;
                        obeLog.DetalleError = ex.StackTrace;
                        ucObjeto <beLog> .grabarArchivoTexto(ArchivoLog, obeLog);
                    }
                    outID_Atencion = "";
                }
                catch (Exception ex)
                {
                    beLog obeLog = new beLog();
                    obeLog.MensajeError = ex.Message;
                    obeLog.DetalleError = ex.StackTrace;
                    ucObjeto <beLog> .grabarArchivoTexto(ArchivoLog, obeLog);

                    outID_Atencion = "";
                }
            }
            return(updated);
        }
Пример #8
0
        public bool InsertarFichaSupervision(int ProveedorID, int PersonalID, DateTime Hora_Ingreso, DateTime Hora_Salida, string Obs_Tec, int Estado_Ficha, string Nro_Telefono, string Panel, string Obs_Ficha, out string outID_Ficha)
        {
            bool updated = false;

            using (SqlConnection con = new SqlConnection(Conexion))
            {
                try
                {
                    con.Open();
                    daFichaSupervision odaFichaSupervision = new daFichaSupervision();
                    updated = odaFichaSupervision.InsertarFichaSupervision(con, ProveedorID, PersonalID, Hora_Ingreso, Hora_Salida, Obs_Tec, Estado_Ficha, Nro_Telefono, Panel, Obs_Ficha, out outID_Ficha);
                }
                catch (SqlException ex)
                {
                    beLog obeLog;
                    foreach (SqlError err in ex.Errors)
                    {
                        obeLog = new beLog();
                        obeLog.MensajeError = err.Message;
                        obeLog.DetalleError = ex.StackTrace;
                        ucObjeto <beLog> .grabarArchivoTexto(ArchivoLog, obeLog);
                    }
                    outID_Ficha = "";
                }
                catch (Exception ex)
                {
                    beLog obeLog = new beLog();
                    obeLog.MensajeError = ex.Message;
                    obeLog.DetalleError = ex.StackTrace;
                    ucObjeto <beLog> .grabarArchivoTexto(ArchivoLog, obeLog);

                    outID_Ficha = "";
                }
            }
            return(updated);
        }