Exemple #1
0
        public JsonResult SaveSolutionFeedback(SolutionFeedback solFeedbackObj, string solutionCode)
        {
            FormsAuthenticationTicket ticket = null;

            try
            {
                _UserDetailsBusinessLogic = new UserDetailsBusinessLogic();
                HttpCookie authCookie = System.Web.HttpContext.Current.Request.Cookies[FormsAuthentication.FormsCookieName];
                ticket = FormsAuthentication.Decrypt(authCookie.Value);
                int currentUserId = _UserDetailsBusinessLogic.GetUserID(ticket.Name);

                _SearchSolutionBusinessLogic = new SearchSolutionBusinessLogic();

                var retObj = _SearchSolutionBusinessLogic.SaveSolutionFeedback(solFeedbackObj, currentUserId, solutionCode);

                return(Json(true));
            }
            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));
            }
        }
Exemple #2
0
        public JsonResult GetExistingErrorListForErrorCode(string errorCode)
        {
            FormsAuthenticationTicket ticket = null;

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

                var retObj = _SearchSolutionBusinessLogic.GetExistingErrorListForErrorCode(errorCode);

                return(Json(retObj));
            }
            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));
            }
        }