public ActionResult List() { if (!_permissionService.Authorize("ManageAudits")) { return(AccessDeniedView()); } var model = new AuditListModel(); // Get All Entities var allEntities = FindSubClassesOf <BaseEntity>(); var enumerable = allEntities as Type[] ?? allEntities.ToArray(); if (enumerable.Any()) { foreach (var cls in enumerable) { if (cls.Name.ToLower() != "feedbacks" && cls.Name.ToLower() != "installdatabase" && cls.Name.ToLower() != "irepository" && cls.Name.ToLower() != "iusercontext" && cls.Name.ToLower() != "replies" && cls.Name.ToLower() != "comments" && cls.Name.ToLower() != "scheduletask" && cls.Name.ToLower() != "slider" && cls.Name.ToLower() != "systemlog" && cls.Name.ToLower() != "videos" && cls.Name.ToLower() != "pictures" && cls.Name.ToLower() != "files") { model.Entities.Add(new SelectListItem { Text = cls.Name, Value = cls.FullName }); } } } return(View(model)); }
public AuditListModel FindAuditListModel(string tableName, int rowId = -1) { var model = new AuditListModel(); string tempTable = normaliseTableName(tableName); // Do a case-insensitive search var x = db.FindAuditLogs(tempTable, rowId).ToList(); foreach (var item in db.FindAuditLogs(tempTable, rowId)) { model.Items.Add(MapToModel(item)); } return(model); }