public static List <string> GetSelfGroupMembers(string groupid) { var url = ConfigHelper.GetConfigString("GetSelfGroupMembers") + groupid; var resp = HttpWebHelper.HttpGet(url); var list = new List <string>(); resp = resp.Replace("[", "").Replace("]", ""); var arry = resp.Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (var s in arry) { list.Add(s.Replace("\"", "")); } return(list); }
public IHttpActionResult GetGroupList(string userId) { try { var chatGroupList = new List <MyGroup>(); var list = new List <MyGroup>(); /* * 1.发送请求,获取工作群 */ var unitid = ""; var url = ConfigHelper.GetConfigString("GetMyGroups") + "?unitID=" + unitid + "&userID=" + userId + "&pageSize=999"; var resp = HttpWebHelper.HttpGet(url); PmcJsonResultJsonContent result = JsonConvert.DeserializeObject <PmcJsonResultJsonContent>(resp); //获取所有 return(Json( new { Success = true, Content = result.Content, Error = "", Message = "查询成功", Count = result.Count, Total = result.Total, })); } catch (Exception ex) { return(Json( new { Success = false, Content = "", Error = ex.ToString(), Message = "查询失败", Count = 0, Total = 0 })); } }
public IHttpActionResult GetGroupMembers(string groupID) { try { /* * 1.发送请求,获取工作群组成员 */ var url = ConfigHelper.GetConfigString("GetMyGroupMembers") + "?groupID=" + groupID; var resp = HttpWebHelper.HttpGet(url); PmcJsonResultWeb result = JsonConvert.DeserializeObject <PmcJsonResultWeb>(resp); //获取所有 return(Json( new { Success = true, Data = result.Data, Error = "", Message = "查询成功", Count = 0, Total = 0, })); } catch (Exception ex) { return(Json( new { Success = false, Content = "", Error = ex.ToString(), Message = "查询失败", Count = 0, Total = 0 })); } }
public IHttpActionResult GetUserApplyResult(string userId) { try { /* * 1.发送请求,获取工作群组成员 */ var url = ConfigHelper.GetConfigString("GroupMsg03") + "?userId=" + userId; var resp = HttpWebHelper.HttpGet(url); PmcJsonResultWebApi result = JsonConvert.DeserializeObject <PmcJsonResultWebApi>(resp); //获取所有 return(Json( new { Success = result.Success, Content = result.Content, Error = "", Message = "查询成功", Count = 0, Total = 0, })); } catch (Exception ex) { return(Json( new { Success = false, Content = "", Error = ex.ToString(), Message = "查询失败", Count = 0, Total = 0 })); } }