public JsonResult SaveCategory(int CategoryTypeId, string jsonData, int Operation)
 {
     NuPortalAdminService.NuPortalAdminService admService = new NuPortalAdminService.NuPortalAdminService();
     admService.Url = Constants.AdminService;
     try
     {
         string IsSuccess = admService.CustomizationByAdmin(jsonData, Convert.ToInt32(Session["CompanyId"]), 1,
                                                            Convert.ToInt32(Session["EmpID"]), CategoryTypeId, Operation);
         if (IsSuccess != string.Empty)
         {
             return(Json(Common_Library.Constants.JsonSuccess));
         }
     }
     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));
     }
     finally
     {
         admService = null;
     }
     return(Json(Common_Library.Constants.JsonError));
 }
 public JsonResult SaveResourceGroups(string jsonData, int ResourceId)
 {
     NuPortalAdminService.NuPortalAdminService admService = new NuPortalAdminService.NuPortalAdminService();
     admService.Url = Constants.AdminService;
     try
     {
         bool IsSuccess = admService.SetGroupMembers(ResourceId, Convert.ToInt32(Session["EmpId"]), jsonData);
         if (IsSuccess)
         {
             return(Json(Common_Library.Constants.JsonSuccess));
         }
     }
     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));
     }
     finally
     {
         admService = null;
     }
     return(Json(Common_Library.Constants.JsonError));
 }