//Get all runtime errors
        public JsonResult GetAllRuntimeErrors()
        {
            FormsAuthenticationTicket ticket = null;

            try
            {
                HttpCookie authCookie = System.Web.HttpContext.Current.Request.Cookies[FormsAuthentication.FormsCookieName];
                ticket = FormsAuthentication.Decrypt(authCookie.Value);

                _RuntimeErrorTraceBusinessLogic = new RuntimeErrorTraceBusinessLogic();

                var errorArr = _RuntimeErrorTraceBusinessLogic.GetAllRuntimeErrors();


                return(Json(errorArr));
            }
            catch (Exception ex)
            {
                currentFile = this.ControllerContext.RouteData.Values["controller"].ToString(); // System.Diagnostics.StackTrace(true).GetFrame(0).GetFileName();
                StackTrace st = new StackTrace();
                StackFrame sf = st.GetFrame(0);
                methodName = sf.GetMethod().Name;
                ErrorLogHelper.UpdatingErrorLog(currentFile + "-" + methodName, ticket == null ? "N/A" : ticket.Name, ex);
                return(Json(null));
            }
        }
        //Delete selected errors
        public JsonResult DeleteSelectedErrorTraces(ErrorLogger[] errorTraceArr)
        {
            FormsAuthenticationTicket ticket = null;

            try
            {
                _RuntimeErrorTraceBusinessLogic = new RuntimeErrorTraceBusinessLogic();

                var result = _RuntimeErrorTraceBusinessLogic.DeleteSelectedErrorTraces(errorTraceArr);

                return(Json(result));
            }
            catch (Exception ex)
            {
                currentFile = this.ControllerContext.RouteData.Values["controller"].ToString(); // System.Diagnostics.StackTrace(true).GetFrame(0).GetFileName();
                StackTrace st = new StackTrace();
                StackFrame sf = st.GetFrame(0);
                methodName = sf.GetMethod().Name;
                ErrorLogHelper.UpdatingErrorLog(currentFile + "-" + methodName, ticket == null ? "N/A" : ticket.Name, ex);
                return(Json(false));
            }
        }