Beispiel #1
0
        public static bool addDatabaseLogging(string level, int priority, string Text, LogState State)
        {
            int s = (int)State;

            if (s >= DAL.Session.LogState)
            {
                try
                {
                    var log = new logging();
                    log.created  = DateTime.Now;
                    log.level    = level;
                    log.priority = priority;
                    Text        += " : User : "******"CheckMailReminder", "addLogin", DAL.Tools.LoggingTool.LogState.low);
                    return(false);
                }
            }

            return(true);
        }
        public static bool addDatabaseLogging(string level, int priority, string Text, LogState State)
        {
            int s = (int)State;

            if (s >= DAL.Session.LogState)
            {
                try
                {
                    var log = new logging();
                    log.created  = DateTime.Now;
                    log.level    = level;
                    log.priority = priority;
                    string username = DAL.Session.GetValidUser.benutzername;

                    //if (DAL.Session.User == null)
                    //{
                    //    username = "******";
                    //}
                    //else
                    //{
                    //    username = DAL.Session.User.benutzername;
                    //}


                    //Text += " : User : "******"Kein User abgemeldet";
                    Text    += " : User : "******"addDatabaseLogging", "addLogin", DAL.Tools.LoggingTool.LogState.low);
                    return(false);
                }
            }

            return(true);
        }