public JsonResult SaveEmployeeRatings(int ratedto, int rating, int RatingFactorId) { NuPortalEmpService.NuPortalEmployeeService empService = new NuPortalEmpService.NuPortalEmployeeService(); empService.Url = Constants.EmpService; try { string jsonString = empService.UpdateEmployeeRating(0, ratedto, Convert.ToInt32(Session["EmpId"]), rating, Convert.ToInt32(Session["EmpId"]), Convert.ToInt32(Session["EmpId"]), 1, RatingFactorId, 1); if (jsonString != string.Empty) { return(Json(jsonString, JsonRequestBehavior.AllowGet)); } } catch (Exception ex) { GeneralFunctions genFun = new GeneralFunctions(); genFun.LogError(ControllerContext.HttpContext, ex.Message, ex.TargetSite.Name, Convert.ToString(ControllerContext.RouteData.Values["action"]), Convert.ToString(ControllerContext.RouteData.Values["controller"])); genFun = null; return(Json(Common_Library.Constants.JsonError, JsonRequestBehavior.AllowGet)); } finally { empService = null; } return(Json(Common_Library.Constants.JsonError, JsonRequestBehavior.AllowGet)); }