Beispiel #1
0
        private void btnInfo_Click(object sender, EventArgs e)
        {
            List <string> lst         = new List <string>();
            Event         eventFilter = new Event();

            try
            {
                _loger.Information("Fwk Loggin test", "Mensaje de prueba para Fwk Loggin");
                System.Configuration.ConnectionStringSettings cnn = System.Configuration.ConfigurationManager.ConnectionStrings[_LoggingSection.GetProvider().CnnStringName];
                if (cnn == null)
                {
                    throw new Exception("no existe la ConnectionString " + _LoggingSection.GetProvider().CnnStringName + " configurada en el config file para EventType.Information");
                }
                ITarget t = DatabaseTarget.TargetFactory(TargetType.Database, cnn.Name);
                _loger.Information("test logging", "Informe de error");
                //eventFilter.LogType = EventType.Information;
                //t.SearchByParam(eventFilter);
                //foreach (Event wEvent in t.SearchByParam(eventFilter))
                //{
                //    lst.Add(wEvent.Id.ToString());
                //}
                //t.Remove(lst);
                //eventFilter.LogType = EventType.None;
                txtNoStaticResult.Text = t.SearchByParam(eventFilter).GetXml();
            }
            catch (Exception ex)
            {
                ExceptionView.Show(ex);
            }
        }
Beispiel #2
0
 void Update()
 {
     if (exceptionMsg != null)
     {
         ExceptionView.Show(exceptionMsg);
         exceptionMsg = null;
     }
 }
Beispiel #3
0
 private void button1_Click_1(object sender, EventArgs e)
 {
     try
     {
         _loger.Error("Test Login", "pppppppppppppppppppppppp");
     }
     catch (Exception ex)
     {
         ExceptionView.Show(ex);
     }
 }
Beispiel #4
0
 private void button5_Click(object sender, EventArgs e)
 {
     try
     {
         _loger.Audit("Fwk Loggin test", "mensaje de prueba para Fwk Loggin", Environment.UserName, Environment.MachineName);
         txtNoStaticResult.Text = XmlTarget.Logs.GetXml();
     }
     catch (Exception ex)
     {
         ExceptionView.Show(ex);
     }
 }
Beispiel #5
0
 private void button6_Click(object sender, EventArgs e)
 {
     try
     {
         _loger.Warning("Fwk Loggin test", "Mensaje de prueba para Fwk Loggin");
         txtNoStaticResult.Text = XmlTarget.Logs.GetXml();
     }
     catch (Exception ex)
     {
         ExceptionView.Show(ex);
     }
 }
Beispiel #6
0
        private void button7_Click(object sender, EventArgs e)
        {
            try
            {
                Events _Logs = Fwk.Logging.Events.GetFromXml <Events>(Fwk.HelperFunctions.FileFunctions.OpenTextFile(_LoggingSection.GetProvider().FileName));

                txtNoStaticResult.Text = _Logs.GetXml();
            }
            catch (Exception ex)
            {
                ExceptionView.Show(ex);
            }
        }
Beispiel #7
0
        /// <summary>
        /// Informs the user via error popup about a given exception.
        /// </summary>
        /// <param name="ex"></param>
        public static void InformUserAboutError(Exception ex)
        {
            var exceptionView = new ExceptionView(ex);

            exceptionView.Show();
        }