public JsonResult SaveMainErrorDetails(ErrorMaster errorObjParam, SolutionMaster solObjParam, ErrorAttachment[] errorImageList, ErrorAttachment[] solutionImageList, bool isSolutionAddForError, bool isErrorWithSolution) { 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); _ErrorMgtBusinesssLogic = new ErrorMgtBusinesssLogic(); var retVal = string.Empty; retVal = _ErrorMgtBusinesssLogic.SaveMainErrorDetails(errorObjParam, solObjParam, errorImageList, solutionImageList, isSolutionAddForError, isErrorWithSolution, currentUserId); return(Json(retVal)); } 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("0000")); } }
public JsonResult GetNewSolutionCode() { FormsAuthenticationTicket ticket = null; try { _ErrorMgtBusinesssLogic = new ErrorMgtBusinesssLogic(); HttpCookie authCookie = System.Web.HttpContext.Current.Request.Cookies[FormsAuthentication.FormsCookieName]; ticket = FormsAuthentication.Decrypt(authCookie.Value); var retVal = string.Empty; retVal = _ErrorMgtBusinesssLogic.GetNewSolutionCode(); return(Json(retVal)); } 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)); } }