private void GetConversationList() { if (UserList.SelectedIndex != -1) { divConversation.Visible = true; } else { divConversation.Visible = false; } long currentUserId = UserHelper.CurrentUser.UserId; long selectedUserId = Convert.ToInt64(UserList.SelectedValue); try { ServiceResult <List <ConversationDTO> > serviceResult = new ServiceResult <List <ConversationDTO> >(); var queryString = new Dictionary <string, string>(); queryString.Add("currentUserId", currentUserId.ToString()); queryString.Add("userId", selectedUserId.ToString()); var response = ApiHelper.CallGetApiMethod(ApiKeys.MessageApiUrl, "GetConversationList", queryString); if (!response.IsSuccessStatusCode) { throw new Exception("Hata oluştu!"); } var data = response.Content.ReadAsStringAsync().Result; serviceResult = JsonConvert.DeserializeObject <ServiceResult <List <ConversationDTO> > >(data); if (serviceResult.ServiceResultType != EnumServiceResultType.Success) { throw new Exception(serviceResult.ErrorMessage); } if (serviceResult.Result == null) { throw new Exception(serviceResult.ErrorMessage); } ConversationList.DataSource = serviceResult.Result; ConversationList.DataBind(); } catch (Exception ex) { } }