public void Save_RoleApplication(string json) { try { List <SystemApplicationWrapper> applications = JSON.Deserialize <List <SystemApplicationWrapper> >(json); List <String> list = new List <string>(); foreach (SystemApplicationWrapper systemApplicationWrapper in applications) { list.Add(systemApplicationWrapper.SystemApplicationID.ToString()); } SystemRoleWrapper.PatchSetRoleApplications(SystemRoleWrapper.FindById(RoleID), list); } catch (Exception ex) { ResourceManager.AjaxSuccess = false; ResourceManager.AjaxErrorMessage = string.Format(this.GetGlobalResourceObject("GlobalResource", "msgServerErrorMsg").ToString(), ex.Message); } }