public void WriteInJournal(string Ordi, int App, string xml)
        {
            if (string.IsNullOrEmpty(Ordi))
            {
                Ordi = HttpContext.Current.Request.UserHostAddress;
            }

            try
            {
                CatchExceptionEntities _Sql = new CatchExceptionEntities();
                Journal log = new Journal();

                log.Ordinateur    = Ordi;
                log.ApplicationID = App;
                log.Date          = DateTime.Now;

                log.ZipException(xml);

                _Sql.Journals.Add(log);

                _Sql.SaveChanges();
            }
            catch (Exception ex)
            {
                /*
                 * LogFile.FilePath = @"c:\";
                 * CatchException.CatchMe.ApplicationId = 0;
                 * CatchException.CatchMe.WriteException(ex).Write<LogFile>();
                 * */
            }
        }
Ejemplo n.º 2
0
        public ActionResult Index()
        {
            CatchExceptionEntities db = new CatchExceptionEntities();

            return(View(db.Journals));
        }