コード例 #1
0
ファイル: ElmahSqlErrorLog.cs プロジェクト: mengithub/XP-2
        public static void DeleteError(KElmahDBType kElmahDBType, string errType, string errMessage)
        {
            if (kElmahDBType == KElmahDBType.AuditManager)
            {
                using (var db = new KElmahDbContext_AuditManager())
                {
                    DeleteError(db, errType, errMessage);
                }
            }
            else if (kElmahDBType == KElmahDBType.KAudit)
            {
                using (var db = new KElmahDbContext())
                {
                    DeleteError(db, errType, errMessage);
                }
            }
            else if (kElmahDBType == KElmahDBType.All)
            {
                using (var db = new KElmahDbContext_AuditManager())
                {
                    DeleteError(db, errType, errMessage);
                }

                using (var db = new KElmahDbContext())
                {
                    DeleteError(db, errType, errMessage);
                }
            }
        }
コード例 #2
0
ファイル: ElmahSqlErrorLog.cs プロジェクト: mengithub/XP-2
        public static List<Tuple<string, string>> GetErrors(KElmahDBType kElmahDBType)
        {
            List<Tuple<string, string>> result = new List<Tuple<string, string>>();

            if (kElmahDBType == KElmahDBType.AuditManager)
            {
                using (var db = new KElmahDbContext_AuditManager())
                {
                    result.AddRange(GetErrors(db));
                }
            }
            else if (kElmahDBType == KElmahDBType.KAudit)
            {
                using (var db = new KElmahDbContext())
                {
                    result.AddRange(GetErrors(db));
                }
            }
            else if (kElmahDBType == KElmahDBType.All)
            {
                using (var db = new KElmahDbContext_AuditManager())
                {
                    result.AddRange(GetErrors(db));
                }

                using (var db = new KElmahDbContext())
                {
                    result.AddRange(GetErrors(db));
                }
            }

            return result.Distinct().OrderBy(x => x.Item1).ToList();
        }
コード例 #3
0
ファイル: ElmahSqlErrorLog.cs プロジェクト: mengithub/XP-2
        public static List<string> GetErrorType(KElmahDBType kElmahDBType)
        {
            List<string> result = new List<string>();

            if (kElmahDBType == KElmahDBType.AuditManager)
            {
                using (var db = new KElmahDbContext_AuditManager())
                {
                    result.AddRange(GetErrorType(db));
                }
            }
            else if (kElmahDBType == KElmahDBType.KAudit)
            {
                using (var db = new KElmahDbContext())
                {
                    result.AddRange(GetErrorType(db));
                }
            }
            else if (kElmahDBType == KElmahDBType.All)
            {
                using (var db = new KElmahDbContext_AuditManager())
                {
                    result.AddRange(GetErrorType(db));
                }

                using (var db = new KElmahDbContext())
                {
                    result.AddRange(GetErrorType(db));
                }
            }

            return result.Distinct().ToList();
        }