private void GetDefaultFeeEarnerDetails() { DiaryServiceClient diaryService = null; try { diaryService = new DiaryServiceClient(); CollectionRequest collectionRequest = new CollectionRequest(); collectionRequest.ForceRefresh = true; collectionRequest.StartRow = 0; collectionRequest.RowCount = 0; DiaryMemberSearchReturnValue returnValue = new DiaryMemberSearchReturnValue(); returnValue = diaryService.GetDiaryMembers(_logonSettings.LogonId, collectionRequest); if (returnValue.Success) { for (int i = 0; i < returnValue.DiaryMembers.Rows.Length; i++) { if (_logonSettings.UserDefaultFeeMemberId.ToString() == returnValue.DiaryMembers.Rows[i].MemberID) { _ddlUsers.SelectedIndex = -1; if (_ddlUsers.Items.FindByValue(_logonSettings.UserDefaultFeeMemberId.ToString()) != null) { _ddlUsers.Items.FindByValue(_logonSettings.UserDefaultFeeMemberId.ToString()).Selected = true; } } } } else { throw new Exception(returnValue.Message); } } catch (Exception ex) { throw ex; } finally { if (diaryService != null) { if (diaryService.State != System.ServiceModel.CommunicationState.Faulted) { diaryService.Close(); } } } if (_ddlUsers.SelectedValue == "") { _ddlUsers.SelectedIndex = 0; } }
private void GetDefaultFeeEarnerDetails() { DiaryServiceClient diaryService = null; _txtAttendees.Text = string.Empty; _hdnAttendeesMemberId.Value = string.Empty; try { diaryService = new DiaryServiceClient(); CollectionRequest collectionRequest = new CollectionRequest(); collectionRequest.ForceRefresh = true; collectionRequest.StartRow = 0; collectionRequest.RowCount = 0; DiaryMemberSearchReturnValue returnValue = new DiaryMemberSearchReturnValue(); returnValue = diaryService.GetDiaryMembers(_logonSettings.LogonId, collectionRequest); if (returnValue.Success) { for (int i = 0; i < returnValue.DiaryMembers.Rows.Length; i++) { if (_logonSettings.MemberId.ToString() == returnValue.DiaryMembers.Rows[i].MemberID) { _txtAttendees.Text = _txtAttendees.Text + returnValue.DiaryMembers.Rows[i].MemberDisplayName + "; "; _hdnAttendeesMemberId.Value += _hdnAttendeesMemberId.Value + returnValue.DiaryMembers.Rows[i].MemberID + "; "; } } } else { throw new Exception(returnValue.Message); } } catch (System.ServiceModel.EndpointNotFoundException) { _lblError.Text = DataConstants.WSEndPointErrorMessage; _lblError.CssClass = "errorMessage"; } catch (Exception ex) { _lblError.Text = ex.Message; _lblError.CssClass = "errorMessage"; } finally { if (diaryService != null) { if (diaryService.State != System.ServiceModel.CommunicationState.Faulted) { diaryService.Close(); } } } }
private void BindUsers() { DiaryServiceClient diaryService = null; try { diaryService = new DiaryServiceClient(); CollectionRequest collectionRequest = new CollectionRequest(); collectionRequest.ForceRefresh = true; collectionRequest.StartRow = 0; collectionRequest.RowCount = 0; DiaryMemberSearchReturnValue returnValue = new DiaryMemberSearchReturnValue(); returnValue = diaryService.GetDiaryMembers(_logonSettings.LogonId, collectionRequest); if (returnValue.Success) { _ddlUsers.DataSource = returnValue.DiaryMembers.Rows; _ddlUsers.DataTextField = "MemberDisplayName"; _ddlUsers.DataValueField = "MemberID"; _ddlUsers.DataBind(); } else { throw new Exception(returnValue.Message); } } catch (Exception ex) { throw ex; } finally { if (diaryService != null) { if (diaryService.State != System.ServiceModel.CommunicationState.Faulted) { diaryService.Close(); } } } AddDefaultToDropDownList(_ddlUsers, "Select"); }
private void GetDefaultFeeEarnerDetails() { DiaryServiceClient diaryService = null; _txtAttendees.Text = string.Empty; _hdnAttendeesMemberId.Value = string.Empty; try { diaryService = new DiaryServiceClient(); CollectionRequest collectionRequest = new CollectionRequest(); collectionRequest.ForceRefresh = true; collectionRequest.StartRow = 0; collectionRequest.RowCount = 0; DiaryMemberSearchReturnValue returnValue = new DiaryMemberSearchReturnValue(); returnValue = diaryService.GetDiaryMembers(_logonSettings.LogonId, collectionRequest); if (returnValue.Success) { for (int i = 0; i < returnValue.DiaryMembers.Rows.Length; i++) { if (_logonSettings.UserDefaultFeeMemberId.ToString() == returnValue.DiaryMembers.Rows[i].MemberID) { _txtAttendees.Text = _txtAttendees.Text + returnValue.DiaryMembers.Rows[i].MemberDisplayName + "; "; _hdnAttendeesMemberId.Value += _hdnAttendeesMemberId.Value + returnValue.DiaryMembers.Rows[i].MemberID + "; "; } } } else { throw new Exception(returnValue.Message); } } catch (System.ServiceModel.EndpointNotFoundException) { _lblError.Text = DataConstants.WSEndPointErrorMessage; _lblError.CssClass = "errorMessage"; } catch (Exception ex) { _lblError.Text = ex.Message; _lblError.CssClass = "errorMessage"; } finally { if (diaryService != null) { if (diaryService.State != System.ServiceModel.CommunicationState.Faulted) diaryService.Close(); } } }
private void GetDefaultFeeEarnerDetails() { DiaryServiceClient diaryService = null; try { diaryService = new DiaryServiceClient(); CollectionRequest collectionRequest = new CollectionRequest(); collectionRequest.ForceRefresh = true; collectionRequest.StartRow = 0; collectionRequest.RowCount = 0; DiaryMemberSearchReturnValue returnValue = new DiaryMemberSearchReturnValue(); returnValue = diaryService.GetDiaryMembers(_logonSettings.LogonId, collectionRequest); if (returnValue.Success) { for (int i = 0; i < returnValue.DiaryMembers.Rows.Length; i++) { if (_logonSettings.UserDefaultFeeMemberId.ToString() == returnValue.DiaryMembers.Rows[i].MemberID) { _ddlUsers.SelectedIndex = -1; if (_ddlUsers.Items.FindByValue(_logonSettings.UserDefaultFeeMemberId.ToString()) != null) { _ddlUsers.Items.FindByValue(_logonSettings.UserDefaultFeeMemberId.ToString()).Selected = true; } } } } else { throw new Exception(returnValue.Message); } } catch (Exception ex) { throw ex; } finally { if (diaryService != null) { if (diaryService.State != System.ServiceModel.CommunicationState.Faulted) diaryService.Close(); } } if (_ddlUsers.SelectedValue == "") { _ddlUsers.SelectedIndex = 0; } }
private void BindUsers() { DiaryServiceClient diaryService = null; try { diaryService = new DiaryServiceClient(); CollectionRequest collectionRequest = new CollectionRequest(); collectionRequest.ForceRefresh = true; collectionRequest.StartRow = 0; collectionRequest.RowCount = 0; DiaryMemberSearchReturnValue returnValue = new DiaryMemberSearchReturnValue(); returnValue = diaryService.GetDiaryMembers(_logonSettings.LogonId, collectionRequest); if (returnValue.Success) { _ddlUsers.DataSource = returnValue.DiaryMembers.Rows; _ddlUsers.DataTextField = "MemberDisplayName"; _ddlUsers.DataValueField = "MemberID"; _ddlUsers.DataBind(); } else { throw new Exception(returnValue.Message); } } catch (Exception ex) { throw ex; } finally { if (diaryService != null) { if (diaryService.State != System.ServiceModel.CommunicationState.Faulted) diaryService.Close(); } } }