private void btnClearAccountControlType_Click(object sender, EventArgs e) { try { AccountService.credential accountcredential = null; accountcredential = GetAccountCredential(); if (accountcredential != null) { accountClient.clearAccountControlType(accountcredential, txtAccountNumber.Text, txtIdentifierType.Text); } } catch (FaultException <AccountService.UnableToAuthenticateException> unableAutExcp) { MessageBox.Show(Messages.UnableToAuthenticateExceptionMessage + " " + unableAutExcp.Message); } catch (FaultException <AccountService.InvalidCredentialException> invCredExc) { MessageBox.Show(Messages.InvalidCredentialExceptionMesssage + " " + invCredExc.Message); } catch (FaultException <AccountService.InvalidIdentifierTypeException> invIdentTypexc) { MessageBox.Show(Messages.InvalidIdentifierTypeExceptionMessage + " " + invIdentTypexc.Message); } catch (Exception exc) { MessageBox.Show(exc.Message); } }
private void btnGetAccountNumber_Click(object sender, EventArgs e) { try { AccountService.credential accountcredential = null; accountcredential = GetAccountCredential(); string[] accountNumbersList = new string[] { }; if (accountcredential != null) { accountNumbersList = accountClient.getAccountNumbers(accountcredential); } lstAccountNumbers.DataSource = accountNumbersList; } 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); } }
private AccountService.credential GetAccountCredential() { AccountService.credential accountCredential = new AccountService.credential(); accountCredential.username = System.Configuration.ConfigurationManager.AppSettings.Get("UserName"); accountCredential.password = System.Configuration.ConfigurationManager.AppSettings.Get("Password"); return(accountCredential); }
private void btnSetAccountControlType_Click(object sender, EventArgs e) { try { AccountService.credential accountcredential = null; accountcredential = GetAccountCredential(); AccountService.accountControlCreateModel createModel = new AccountService.accountControlCreateModel() { accountNumber = txtSetAccounNumberControlType.Text, controlType = txtSetControlType.Text, identifierType = txtSetIdentifierControlType.Text, toDate = txtSetToDateControlType.Text }; if (accountcredential != null) { accountClient.setAccountControlType(accountcredential, createModel); } } catch (FaultException <AccountService.UnableToAuthenticateException> unableAutExcp) { MessageBox.Show(Messages.UnableToAuthenticateExceptionMessage + " " + unableAutExcp.Message); } catch (FaultException <AccountService.InvalidCredentialException> invCredExc) { MessageBox.Show(Messages.InvalidCredentialExceptionMesssage + " " + invCredExc.Message); } catch (FaultException <AccountService.InvalidIdentifierControlTypeException> invIndtfCntrltypExc) { MessageBox.Show(Messages.InvalidIdentifierControlTypeExceptionMessage + " " + invIndtfCntrltypExc.Message); } catch (Exception exc) { MessageBox.Show(exc.Message); } }
private void btnGetBankTransactionDetail_Click(object sender, EventArgs e) { try { AccountService.credential accountcredential = null; accountcredential = GetAccountCredential(); bool recordCountSpecified = false; if (txtGetBankTransDetailRecordCount.Text != string.Empty) { recordCountSpecified = true; } else { recordCountSpecified = false; } bool pageNumberSpecified = false; if (txtGetBankTransDetailPageNumber.Text != string.Empty) { pageNumberSpecified = true; } else { pageNumberSpecified = false; } int convertPageNumber = 0; bool convertPageNumberResult = false; int convertRecorcount = 0; bool ConvertRecordcountResult = false; convertPageNumberResult = Int32.TryParse(txtGetBankTransDetailPageNumber.Text, out convertPageNumber); ConvertRecordcountResult = Int32.TryParse(txtGetBankTransDetailRecordCount.Text, out convertRecorcount); if (convertPageNumberResult && convertPageNumberResult) { AccountService.paging objPaging = new AccountService.paging() { pageNumber = convertPageNumber, recordCount = convertRecorcount, pageNumberSpecified = pageNumberSpecified, recordCountSpecified = recordCountSpecified }; AccountService.accountTransactionFilter transactionFilter = new AccountService.accountTransactionFilter() { accountNumber = txtGetBankTransDetailAccountNumber.Text, fromDateTime = txtGetBankTransDetailFrom.Text, toDateTime = txtGetBankTransDetailTo.Text, paymentIdentifier = txtGetBankTransDetailPaymentIdentifier.Text }; if (accountcredential != null) { AccountService.pagedData pagedData = null; pagedData = accountClient.getBankTransactionsDetails(accountcredential, transactionFilter, objPaging); if (pagedData != null) { grdViewBankTransDetail.DataSource = pagedData; } else { MessageBox.Show(Messages.EmptyDataSource); } } } } //TODO: Complete Exception List catch (Exception exc) { MessageBox.Show(exc.Message); } }
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); } }