public void Attention(int userId, int groupTeamId, int status, string version, string equType, string equName) { string json = String.Empty; BLL.manager_guid bll_managerguid = new BLL.manager_guid(); Model.manager_guid model_managerguid = null; try { bool is_exsit = bll_managerguid.Exists(groupTeamId, userId); if (is_exsit) { bool result = false; if (status == 0) { result = bll_managerguid.Delete(groupTeamId, userId); } if (result) { json = "{\"status\":\"true\"}"; } else { json = "{\"status\":\"false\",\"data\":\"已关注此旅行社!\"}"; } } else { model_managerguid = new Model.manager_guid(); model_managerguid.guid_id = userId; model_managerguid.manager_id = groupTeamId; model_managerguid.status = 1;//关注 model_managerguid.apply_time = DateTime.Now; int count = bll_managerguid.Add(model_managerguid); if (count > 0) { json = "{\"status\":\"true\"}"; } else { json = "{\"status\":\"false\",\"data\":\"关注失败,请联系管理员!\"}"; } } } catch (Exception ex) { json = "{\"status\":\"false\",\"data\":\"" + ex.Message + "\"}"; } WriteWebServiceLog(version, equType, equName, "Attention", ""); Context.Response.Write(json); Context.Response.End(); }