private void btnGetPendingTransactions_Click(object sender, EventArgs e) { try { AccountService.credential accountcredential = null; accountcredential = GetAccountCredential(); bool recordCountSpecified = false; if (txtGetPendingRecordCount.Text != string.Empty) { recordCountSpecified = true; } else { recordCountSpecified = false; } bool pageNumberSpecified = false; if (txtGetPendingPageNumber.Text != string.Empty) { pageNumberSpecified = true; } else { pageNumberSpecified = false; } int convertPageNumber = 0; bool convertPageNumberResult = false; int convertRecorcount = 0; bool ConvertRecordcountResult = false; convertPageNumberResult = Int32.TryParse(txtGetPendingPageNumber.Text, out convertPageNumber); ConvertRecordcountResult = Int32.TryParse(txtGetPendingRecordCount.Text, out convertRecorcount); if (convertPageNumberResult && convertPageNumberResult) { AccountService.paging objPaging = new AccountService.paging() { pageNumber = convertPageNumber, recordCount = convertRecorcount, pageNumberSpecified = pageNumberSpecified, recordCountSpecified = recordCountSpecified }; if (accountcredential != null) { AccountService.pagedData pagedData = null; pagedData = accountClient.getPendingTransactions(accountcredential, txtGetPendingAccountNumber.Text, objPaging); if (pagedData != null) { grdViewPendingTransactions.DataSource = pagedData; } else { MessageBox.Show(Messages.EmptyDataSource); } } } } catch (FaultException <AccountService.UnableToAuthenticateException> unableAutExcp) { MessageBox.Show(Messages.UnableToAuthenticateExceptionMessage + " " + unableAutExcp.Message); } catch (FaultException <AccountService.InvalidCredentialException> invCredExc) { MessageBox.Show(Messages.InvalidCredentialExceptionMesssage + " " + invCredExc.Message); } catch (Exception exc) { MessageBox.Show(exc.Message); } }