Exemplo n.º 1
0
        public ActionResult UsersActivity()
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();

            try
            {
                AuditLog log = new AuditLog();
                IEnumerable <UserActivity> activity = log.GetUsersActivity();

                return(Json(new { success = true, data = serializer.Serialize(activity) }, "json/application"));
            }
            catch (Exception ex)
            {
                Log.Write(TraceEventType.Stop, "Auditing Controller, UsersActivity | Exception {0}", ex);
                return(Json(new { success = false, message = ex.Message }, "json/text"));
            }
        }