public void Save_UserGroupRole(string json)
 {
     try
     {
         KeyValuePair <string, string>[] selectIDs = JSON.Deserialize <KeyValuePair <string, string>[]>(json);
         List <String> list = new List <string>();
         foreach (KeyValuePair <string, string> row in selectIDs)
         {
             list.Add(row.Key);
         }
         SystemUserGroupWrapper.PatchAssignUserGroupRoles(SystemUserGroupWrapper.FindById(UserGroupID), list);
     }
     catch (Exception ex)
     {
         ResourceManager.AjaxSuccess      = false;
         ResourceManager.AjaxErrorMessage = "Error Message:" + ex.Message;
     }
 }
Exemple #2
0
        public void Save_UserGroupRole(string json)
        {
            try
            {
                List <SystemRoleWrapper> selectIDs = JSON.Deserialize <List <SystemRoleWrapper> >(json);

                List <String> list = new List <string>();
                foreach (SystemRoleWrapper row in selectIDs)
                {
                    list.Add(row.RoleID.ToString());
                }
                SystemUserGroupWrapper.PatchAssignUserGroupRoles(SystemUserGroupWrapper.FindById(UserGroupID), list);
            }
            catch (Exception ex)
            {
                ResourceManager.AjaxSuccess      = false;
                ResourceManager.AjaxErrorMessage = string.Format(this.GetGlobalResourceObject("GlobalResource", "msgServerErrorMsg").ToString(), ex.Message);
            }
        }