Beispiel #1
0
        public void AddLog(string sSectionName, string sDescription)
        {
            try
            {
                OSMLogsContext logs = new OSMLogsContext();

                OSMLogs item = new OSMLogs()
                {
                    Description = sDescription,
                    SectionName = sSectionName,
                    When        = DateTime.Now,
                    ID          = Guid.NewGuid().ToString()
                };

                logs.LogsItem.Add(item);
                logs.SaveChanges();
            }
            catch { }
        }
Beispiel #2
0
        public void AddLog(string sSectionName, string sDescription)
        {
            try
            {
                OSMLogsContext logs = new OSMLogsContext();

                OSMLogs item = new OSMLogs()
                {
                    Description = sDescription,
                    SectionName = sSectionName,
                    When = DateTime.Now,
                    ID = Guid.NewGuid().ToString()
                };

                logs.LogsItem.Add(item);
                logs.SaveChanges();
            }
            catch { }
        }