<?xml version="1.0" encoding="utf-8"?><finPageSet version="1.00" exportedUtcDate="2021-07-27T21:45:54.0000000"><CreatedUserId>ADMIN</CreatedUserId><CreatedUtcDate>2018-11-23T02:54:28.2030000</CreatedUtcDate><UpdatedUserId>ADMIN</UpdatedUserId><UpdatedUtcDate>2021-07-27T21:44:53.4330000</UpdatedUtcDate><PageSetId>SMPL.CMK</PageSetId><Active>true</Active><Beta>true</Beta><Code>Option Explicit On
Option Strict On

' #################################################################
' Wizard to list Clients to market to
'
' Version: 1.01 (28/07/2021)
'
' Usage: Sample Page Set
' #################################################################

' Objects
Private mMarketingClients As List(Of MarketingClient)

' Other
Private mLastRefreshSql As String

' Reporting and User Interface Objects
Public mReports As ISfinReports
Public mUI As ISUserInterfaceBL

Public Overrides Function Initialise() As Boolean

  ' Assume Success
  Initialise = True

  ' Initialise
  mReports = DirectCast(psh.Reports, ISfinReports)
  mUI = DirectCast(psh.UserInterface, ISUserInterfaceBL)

  ' Grids
  With gridClients
    ' Grid
    .ShowRowNumbering = True

    ' Columns
    With .Columns
      .AddDrilldown("Drilldown")
      .AddBoolean("Selected", "Selected", 60)
      .AddString("ClientId", "Client", 80, True)
      .AddString("Name", "Name", 150, True)
      .AddString("Gender", "Gender", 48, True)
      .AddInteger("Age", "Age", 40, True)
      .AddString("Address", "Address for Letters", 150, True)
      .AddString("Addressee", "Addressee", 100, True).Visible = False
      .AddString("Salutation", "Salutation", 100, True).Visible = False
      .AddString("Email", "Email", 120, True)
      .AddString("Phone", "Phone", 100, True)
      .AddString("Mobile", "Mobile", 100, True)
    End With

    ' Buttons
    With .Buttons
      .Add(isefinPageObjectButtonType.Refresh)
      .AddSeparator()
      .Add(isefinPageObjectButtonType.Custom, "SelectAll", "Select_All", "Select all rows")
      .Add(isefinPageObjectButtonType.Custom, "SelectNone", "Select_None", "Select no rows")
      .Add(isefinPageObjectButtonType.Custom, "SelectUp", "Select_Up", "Select all rows above and including the current row")
      .Add(isefinPageObjectButtonType.Custom, "SelectDown", "Select_Down", "Select all rows below and including the current row")
      .AddSeparator()
      .Add(isefinPageObjectButtonType.Custom, "Check", "Checkbox_Checked", "Check selected row(s)")
      .Add(isefinPageObjectButtonType.Custom, "Uncheck", "Checkbox_Unchecked", "Uncheck selected row(s)")
      .AddSeparator()
      .Add(isefinPageObjectButtonType.Custom, "Email", "Email", "Send an Email document to all 'Selected' Clients with an Email address")
      If finBL.Settings.AddOns.Messaging OrElse finBL.Settings.AddOns.MessagingAdvanced Then
        .Add(isefinPageObjectButtonType.Custom, "SMS", "Sms", "Send an SMS document to all 'Selected' Clients with an SMS capable phone number")
      End If
      .Add(isefinPageObjectButtonType.Custom, "DocumentWordVba", "DocumentType_Word", "Send an MS Word document to all 'Selected' Clients with an Address for Letters")
      .AddSeparator()
      .Add(isefinPageObjectButtonType.Custom, "ExportCsv", "Export", "Export all 'Selected' Clients to a CSV file, e.g., for an MS Word Mail Merge")
    End With
  End With

  ' Create Objects
  mMarketingClients = New List(Of MarketingClient)
  gridClients.VirtualDataBind(mMarketingClients)

  ' Licensing
  If Not finBL.Settings.AddOns.ClientAdvanced Then
    chkMarketingLetter.Visible = False
    chkMarketingEmail.Visible = False
    chkMarketingSms.Visible = False
    chkMarketingPhone.Visible = False
  End If

  ' Reset Form
  Form_Reset()

End Function

Private Sub Form_Reset()

  ' Defaults
  chkMarketing.Value = True
  numClientAgeFrom.Value = 18
  numClientAgeTo.Value = 99

  ' Other
  mLastRefreshSql = ""

End Sub

Public Sub PageSet_WizardRefresh(sender As Object, e As finPageSetHandlerWizardRefreshEventArgs) Handles Me.WizardRefresh

  Select Case e.PageId
    Case "CLIENTS"
      ' Refresh Grid
      gridClients_Refresh()
  End Select

End Sub

Private Sub gridClients_Refresh()

  Dim Cancelled As Boolean
  Dim Client As finClient
  Dim Date1 As Date
  Dim Date2 As Date
  Dim dt As DataTable
  Dim i As Integer
  Dim Include As Boolean
  Dim JoinAccounts As Boolean
  Dim JoinContactAddresses As Boolean
  Dim Ok As Boolean
  Dim sqb As ISSelectQueryBuilder
  Dim sqbSub As ISSelectQueryBuilder
  Dim sql As String
  Dim strTemp As String

  ' Assume Success
  Ok = True

  ' Create Objects
  sqb = finBL.Database.CreateSelectQueryBuilder()

  ' Build Query
  With sqb
    .Table = "Client"
    .DistinctType = iseSelectQueryDistinctType.Distinct
    .Fields.AddList("Client.Pk,Client.ClientId")

    ' SQL Where
    With .SqlWhere
      ' Active Clients only
      .AppendComparisonIntegerBoolean("Client.Active", "=", True)

      ' Individual Clients only
      strTemp = finBL.ClientTypes.GetIndividualPksList().ToCsvString()
      If Len(strTemp) = 0 Then
        ' Exclude all Clients since there are no 'Individual' Clients in this database
        strTemp = "-1"
      End If
      .AppendRange("Client.ClientTypePk", strTemp, iseRangeDataType.Integer)

      ' Marketing Flags
      If chkMarketing.Value Then
        .AppendComparisonIntegerBoolean("Client.CommunicationMarketing", "=", chkMarketing.Value)
      End If
      If finBL.Settings.AddOns.ClientAdvanced Then
        If chkMarketingLetter.Value Then
          .AppendComparisonIntegerBoolean("Client.CommunicationMarketingL", "=", chkMarketingLetter.Value)
        End If
        If chkMarketingSms.Value Then
          .AppendComparisonIntegerBoolean("Client.CommunicationMarketingS", "=", chkMarketingSms.Value)
        End If
        If chkMarketingPhone.Value Then
          .AppendComparisonIntegerBoolean("Client.CommunicationMarketingV", "=", chkMarketingPhone.Value)
        End If
        If chkMarketingEmail.Value Then
          .AppendComparisonIntegerBoolean("Client.CommunicationMarketingE", "=", chkMarketingEmail.Value)
        End If
      End If

      ' Ranges
      .AppendRange("Client.ClientId", txtRangeClients.Text)
      .AppendRangeWithPk("Client.ClientTypePk", "ClientType", "ClientTypeId", "Pk", txtRangeClientTypes.Text)
      .AppendRangeWithPk("Client.ClientGroupPk", "ClientGroup", "ClientGroupId", "Pk", txtRangeClientGroups.Text)

      ' Cities
      If Len(txtRangeCities.Text) &lt;&gt; 0 Then
        JoinContactAddresses = True
        .AppendRange("ClientContactAddress.City", txtRangeCities.Text)
      End If

      ' Suburbs
      If Len(txtRangeSuburbs.Text) &lt;&gt; 0 Then
        JoinContactAddresses = True
        .AppendRange("ClientContactAddress.Suburb", txtRangeSuburbs.Text)
      End If

      ' Age (only filter if not using default range)
      If numClientAgeFrom.Value &lt;&gt; 18 OrElse numClientAgeTo.Value &lt;&gt; 99 Then
        ' Calculate Date Of Birth date range
        Date1 = Now.Date.AddYears(CInt(-numClientAgeTo.Value) - 1).AddDays(1) ' From Date
        Date2 = Now.Date.AddYears(CInt(-numClientAgeFrom.Value)) ' To Date
        .AppendDateRange("Client.DateOfBirth", New ISDateRange(Date1, Date2), False, False)
      End If

      ' Gender
      If Len(cboGender.Text) &lt;&gt; 0 Then
        .AppendComparisonInteger("Client.Gender", "=", finBL.Enums.isefinGender_FromString(cboGender.Text))
      End If

      ' Account Maturing
      If Len(cboAccountsMaturingWithin.Text) &lt;&gt; 0 Then
        JoinAccounts = True

        ' Calculate date up to which Accounts can Mature
        Date1 = finBL.Utilities.DateCycleGetInclusiveEndDate(cboAccountsMaturingWithin.Text, Now.Date)

        ' If no Maturity Date then still include
        .BlockBegin(iseSqlWhereBuilderNestedBlockType.OrBlock)
        .AppendComparisonNull("Account.DateMaturity")
        .AppendComparisonDate("Account.DateMaturity", "&lt;=", Date1)
        .BlockEnd()

        ' Ensure Accounts are 'Open'
        .AppendComparisonInteger("Account.Status", "=", isefinAccountStatus.Open)
      End If

      ' Exclude Clients with ANY Overdue Accounts
      If chkAccountsExcludeOverdue.Value Then
        ' Sub-Query
        sqbSub = finBL.Database.CreateSelectQueryBuilder()
        With sqbSub
          .Table = "Account"
          .TableAlias = "AccountOD"
          .Fields.Add("AccountOD.Pk")

          ' SQL Where
          With .SqlWhere
            .AppendComparisonField("AccountClientOD.ClientPk", "=", "Client.Pk")

            .AppendComparisonInteger("AccountOD.Status", "=", isefinAccountStatus.Open)
            .AppendComparisonInteger("AccountOD.BalanceOverdue", "&gt;", 0)

            .AppendComparisonInteger("AccountClientOD.RoleType", "=", isefinAccountRoleType.Owner)
          End With

          ' Joins
          .Joins.Add("AccountClient", "AccountOD.Pk", "AccountClientOD.AccountPk", iseSelectQueryJoinType.Inner, "AccountClientOD")
        End With

        ' Use NOT EXISTS to check for Overdue Accounts
        .AppendNotExists(sqbSub)
      End If

      ' If joining on Accounts, ensure the Client is an 'Owner'
      If JoinAccounts Then
        .AppendComparisonInteger("AccountClient.RoleType", "=", isefinAccountRoleType.Owner)
      End If

      ' -----------------------------------------
      ' IMPORTANT: Apply User Filters for Clients
      ' -----------------------------------------
      .Append(finBL.CurrentUserInformation.FilterClientSqlWhere)
    End With

    ' Joins
    With .Joins
      If JoinContactAddresses Then
        .Add("ClientContactAddress", "Client.Pk", "ClientContactAddress.ClientPk", iseSelectQueryJoinType.Inner)
      End If
      If JoinAccounts Then
        .Add("AccountClient", "Client.Pk", "AccountClient.ClientPk", iseSelectQueryJoinType.Inner)
        .Add("Account", "AccountClient.AccountPk", "Account.Pk", iseSelectQueryJoinType.Inner)
      End If
    End With

    ' Order By
    .OrderByFields.Add("Client.ClientId")
  End With

  ' Execute Query
  sql = sqb.GetSql()
  If sql = mLastRefreshSql Then
    ' Nothing has changed so do not requery database
  Else
    ' Initialise
    mMarketingClients.Clear()
    mLastRefreshSql = sql

    ' Start Progress
    finBL.StatusProcessBegin("Generating Client List", "Querying Database", True)

    If sqb.ExecuteDataTable(dt) Then
      ' Progress
      finBL.StatusProcess(0, "Processing Clients", Cancelled)

      For i = 0 To dt.Rows.Count - 1
        ' Initialise
        Client = finBL.CreateClient()
        Include = True

        ' Load Client (ignore errors)
        Client.LoadPk(finBL.Database.GetFieldInteger(dt.Rows(i)!Pk))

        ' Include?
        If Client.IsIndividualDeceased Then
          ' Never include deceased Clients!
          Include = False
        Else

        End If

        ' Add
        If Include Then
          mMarketingClients.Add(New MarketingClient(Client))
        End If

        ' Progress
        finBL.StatusProcess((i / dt.Rows.Count) * 100, "", Cancelled)

        ' Cancelled
        If Cancelled Then Exit For
      Next
    Else
      Ok = False
    End If

    ' End Progress
    finBL.StatusProcessEnd()
  End If

  ' Refresh Grid
  gridClients.VirtualDataRefresh(0)

  ' Preview
  htmlPreview_Preview()

  ' Cancelled Warning
  If Ok AndAlso Cancelled Then
    mUI.MsgBox("WARNING: Generation of the Client List was cancelled and is therefore incomplete.", MsgBoxStyle.Exclamation)
  End If

  ' Error
  If Not Ok Then
    mUI.ErrorMessageShow()
  End If

End Sub

Public Sub gridClients_InitialiseRow(sender As Object, e As finPageObjectInitialiseRowEventArgs) Handles gridClients.InitialiseRow

  If e.ListIndex &gt;= 0 AndAlso e.ListIndex &lt; mMarketingClients.Count Then
    With mMarketingClients(e.ListIndex)
      ' Update Values
      e.Row.Cells("Selected").Value = .Selected
      e.Row.Cells("ClientId").Value = .ClientId
      e.Row.Cells("Name").Value = .Name
      e.Row.Cells("Gender").Value = .Gender
      If .Age = 0 Then
        e.Row.Cells("Age").Value = DBNull.Value
      Else
        e.Row.Cells("Age").Value = .Age
      End If
      e.Row.Cells("Address").Value = Replace(.Address, vbNewLine, ", ")
      e.Row.Cells("Addressee").Value = .Addressee
      e.Row.Cells("Salutation").Value = .Salutation
      e.Row.Cells("Email").Value = .Email
      e.Row.Cells("Phone").Value = .Phone
      e.Row.Cells("Mobile").Value = .Mobile
    End With
  End If

End Sub

Public Sub gridClients_AfterRowActivate(sender As Object, e As finPageObjectAfterRowActivateEventArgs) Handles gridClients.AfterRowActivate

  ' Preview
  htmlPreview_Preview()

    ' Update Buttons
  gridClients_ButtonsUpdate()

End Sub

Public Sub gridClients_AfterSelectedRowsChanged(sender As Object, e As finPageObjectAfterSelectedRowsChangedEventArgs) Handles gridClients.AfterSelectedRowsChanged

  ' Update Buttons
  gridClients_ButtonsUpdate()

End Sub

Public Sub gridClients_ButtonClick(sender As Object, e As finPageObjectButtonClickEventArgs) Handles gridClients.ButtonClick

  Dim ApplicationShortcut As ISApplicationShortcut
  Dim FileName As String
  Dim i As Integer
  Dim List As ISList
  Dim MarketingClient As MarketingClient
  Dim sb As StringBuilder
  Dim strTemp As String

  Select Case e.ButtonId
    Case "Check", "Uncheck"
      ' Check/ Uncheck Selected Rows
      For Each i In gridClients.GetSelectedRowIndexes()
        mMarketingClients(i).Selected = (e.ButtonId = "Check")
      Next

      ' Refresh Grid (use -2 to preserve current Active Row)
      gridClients.VirtualDataRefresh(-2, , True)

    Case "DocumentWordVba"
      ' Letter (only if they have an Address for Letters)
      List = New ISList()
      For Each MarketingClient In mMarketingClients
        If MarketingClient.Selected AndAlso Len(MarketingClient.Address) &lt;&gt; 0 Then
          List.Add(MarketingClient.ClientId)
        End If
      Next

      If List.Count = 0 Then
        mUI.MsgBox("No selected Clients have a current Address for Letters.", MsgBoxStyle.Information)
      Else
        ' Confirm if large number
        If List.Count &gt; 1000 Then
          If mUI.MsgBox(String.Format("WARNING: You are attempting to send a Word document to {0} Clients. This may cause issues with the 'Client Documents' wizard.", List.Count) &amp; vbNewLine &amp; vbNewLine &amp; "Are you sure you want to continue?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo) &lt;&gt; MsgBoxResult.Yes Then Exit Sub
        End If

        ' Show Documents Execute form
        ApplicationShortcut = finBL.CreateApplicationShortcut()
        With ApplicationShortcut
          .Action = "FormShow"

          With .Parameters
            .SetString("form", "DocumentsClient")
            .SetString("primaryRange", List.ToCsvString())
            .SetString("fileType", iseDocumentFileType.WordVba.ToString())
          End With
        End With

        finBL.ExecuteApplicationShortcut(ApplicationShortcut)
      End If

    Case "Email"
      ' Email Selected Clients (only if they have an Email address)
      List = New ISList()
      For Each MarketingClient In mMarketingClients
        If MarketingClient.Selected AndAlso Len(MarketingClient.Email) &lt;&gt; 0 Then
          List.Add(MarketingClient.ClientId)
        End If
      Next

      If List.Count = 0 Then
        mUI.MsgBox("No selected Clients have a current Email address.", MsgBoxStyle.Information)
      Else
        ' Confirm if large number
        If List.Count &gt; 1000 Then
          If mUI.MsgBox(String.Format("WARNING: You are attempting to send an Email document to {0} Clients. This may cause issues with the 'Client Documents' wizard.", List.Count) &amp; vbNewLine &amp; vbNewLine &amp; "Are you sure you want to continue?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo) &lt;&gt; MsgBoxResult.Yes Then Exit Sub
        End If

        ' Show Documents Execute form
        ApplicationShortcut = finBL.CreateApplicationShortcut()
        With ApplicationShortcut
          .Action = "FormShow"

          With .Parameters
            .SetString("form", "DocumentsClient")
            .SetString("primaryRange", List.ToCsvString())
            .SetString("fileType", iseDocumentFileType.Email.ToString())
          End With
        End With

        finBL.ExecuteApplicationShortcut(ApplicationShortcut)
      End If

    Case "ExportCsv"
      ' Export to CSV
      strTemp = finBL.SettingsUser.ExportDataFolderResolved(True) &amp; String.Format("MarketingClients_{0}.csv", Format(Now, "yyyyMMddHHmmss"))
      If mUI.CommonDialog.GetFileSave(FileName, strTemp, "Save CSV File", "CSV Files (*.csv)|*.csv", "csv", False, True) Then
        ' Initialise
        sb = New StringBuilder()

        ' Header row (as per Grid)
        sb.AppendLine("ClientId,Name,Gender,Age,Address,Addressee,Salutation,Email,Phone,Mobile")

        ' Create CSV Lines
        For Each MarketingClient In mMarketingClients
          If MarketingClient.Selected Then
            sb.AppendLine(MarketingClient.ToCsvString())
          End If
        Next

        ' Write Text File
        If finBL.Runtime.FileUtilities.WriteTextFile(FileName, sb.ToString()) Then
          mUI.MsgBox(String.Format("Client data sucessfully exported to '{0}'.", FileName), MsgBoxStyle.Information)
        Else
          mUI.ErrorMessageShow()
        End If
      End If

    Case "Refresh"
      ' Refresh (forced)
      mLastRefreshSql = ""
      gridClients_Refresh()

    Case "SelectAll"
      gridClients.SelectAllRows()

    Case "SelectNone"
      gridClients.SelectedRowsClear()

    Case "SelectUp"
      gridClients.SelectRowsUp()

    Case "SelectDown"
      gridClients.SelectRowsDown()

    Case "SMS"
      ' SMS Selected Clients (only if they have a mobile phone number)
      List = New ISList()
      For Each MarketingClient In mMarketingClients
        If MarketingClient.Selected AndAlso Len(MarketingClient.Mobile) &lt;&gt; 0 Then
          List.Add(MarketingClient.ClientId)
        End If
      Next

      If List.Count = 0 Then
        mUI.MsgBox("No selected Clients have a current Mobile phone number.", MsgBoxStyle.Information)
      Else
        ' Confirm if large number
        If List.Count &gt; 1000 Then
          If mUI.MsgBox(String.Format("WARNING: You are attempting to send an SMS document to {0} Clients. This may cause issues with the 'Client Documents' wizard.", List.Count) &amp; vbNewLine &amp; vbNewLine &amp; "Are you sure you want to continue?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo) &lt;&gt; MsgBoxResult.Yes Then Exit Sub
        End If

        ' Show Documents Execute form
        ApplicationShortcut = finBL.CreateApplicationShortcut()
        With ApplicationShortcut
          .Action = "FormShow"

          With .Parameters
            .SetString("form", "DocumentsClient")
            .SetString("primaryRange", List.ToCsvString())
            .SetString("fileType", iseDocumentFileType.Sms.ToString())
          End With
        End With

        finBL.ExecuteApplicationShortcut(ApplicationShortcut)
      End If


    Case Else
      mUI.MsgBox(String.Format("Unhandled Grid Button '{0}'.", e.ButtonId), MsgBoxStyle.Exclamation)
  End Select

End Sub

Public Sub gridClients_BeforeCellUpdate(sender As Object, e As finPageObjectBeforeCellUpdateEventArgs) Handles gridClients.BeforeCellUpdate

  Select Case e.ColumnKey
    Case "Selected"
      mMarketingClients(e.ListIndex).Selected = CBool(e.NewValue)
  End Select

End Sub

Private Sub gridClients_ButtonsUpdate()

  Dim SelectedRowCount As Integer

  ' Initialise
  SelectedRowCount = gridClients.GetSelectedRowIndexes().Length

  With gridClients.Buttons
    .ItemById("Check").Enabled = SelectedRowCount &lt;&gt; 0
    .ItemById("Uncheck").Enabled = SelectedRowCount &lt;&gt; 0
  End With

End Sub

Public Sub gridClients_RowDrilldown(sender As Object, e As finPageObjectRowDrilldownEventArgs) Handles gridClients.RowDrilldown

  Select Case e.ColumnKey
    Case "Drilldown"
      ' Show Clients form
      finBL.ExecuteApplicationShortcutUrl("FormShow?form=Clients&amp;id=" &amp; finBL.Runtime.HtmlUtilities.UrlEncode(mMarketingClients(e.ListIndex).ClientId))
  End Select

End Sub

Private Sub htmlPreview_Preview()

  ' Preview Client
  If gridClients.ActiveDataRowIndex &gt;= 0 AndAlso gridClients.ActiveDataRowIndex &lt; mMarketingClients.Count Then
    ' Client Key Details
    htmlPreview.Text = finBL.ScriptFunctions.BuiltInClientGeneralSummaryScript2(mMarketingClients(gridClients.ActiveDataRowIndex).Client)
  Else
    ' Clear
    htmlPreview.Text = ""
  End If

End Sub

Public Sub txtRangeClients_ButtonClick(sender As Object, e As finPageObjectButtonClickEventArgs) Handles txtRangeClients.ButtonClick

  ' NOTE: The 'True' parameter at the end forces a true Range Lookup form to be displayed rather than the Client List or Client Search form
  psh.FormShowRangeLookupFromStandardRange(txtRangeClients, isefinStandardRange.ClientsIndividuals, "", True)

End Sub

Public Sub txtRangeClientTypes_ButtonClick(sender As Object, e As finPageObjectButtonClickEventArgs) Handles txtRangeClientTypes.ButtonClick

  psh.FormShowRangeLookupFromStandardRange(txtRangeClientTypes, isefinStandardRange.ClientTypes, "")

End Sub

Public Sub txtRangeClientGroups_ButtonClick(sender As Object, e As finPageObjectButtonClickEventArgs) Handles txtRangeClientGroups.ButtonClick

  psh.FormShowRangeLookupFromStandardRange(txtRangeClientGroups, isefinStandardRange.ClientGroups, "")

End Sub

Public Sub txtRangeCities_ButtonClick(sender As Object, e As finPageObjectButtonClickEventArgs) Handles txtRangeCities.ButtonClick

  Dim dt As DataTable
  Dim sqb As ISSelectQueryBuilder

  ' Build Query
  sqb = finBL.Database.CreateSelectQueryBuilder()
  With sqb
    .Table = "ClientContactAddress"
    .DistinctType = iseSelectQueryDistinctType.Distinct
    .Fields.Add("City")
    .SqlWhere.AppendComparisonNotNull("City")
    .OrderByFields.Add("City")
  End With

  ' Execute
  If sqb.ExecuteDataTable(dt) Then
    psh.FormShowRangeLookupFromDataView(txtRangeCities, dt.DefaultView, "City", "Cities")
  Else
    mUI.ErrorMessageShow()
  End If

End Sub

Public Sub txtRangeSuburbs_ButtonClick(sender As Object, e As finPageObjectButtonClickEventArgs) Handles txtRangeSuburbs.ButtonClick

  Dim dt As DataTable
  Dim sqb As ISSelectQueryBuilder

  ' Build Query
  sqb = finBL.Database.CreateSelectQueryBuilder()
  With sqb
    .Table = "ClientContactAddress"
    .DistinctType = iseSelectQueryDistinctType.Distinct
    .Fields.AddList("Suburb,City")
    With .SqlWhere
      .AppendComparisonNotNull("Suburb")

      ' Restrict to City range
      If Len(txtRangeCities.Text) &lt;&gt; 0 Then
        .AppendRange("City", txtRangeCities.Text)
      End If
    End With
    .OrderByFields.Add("Suburb")
  End With

  ' Execute
  If sqb.ExecuteDataTable(dt) Then
    psh.FormShowRangeLookupFromDataView(txtRangeSuburbs, dt.DefaultView, "Suburb", "Suburbs")
  Else
    mUI.ErrorMessageShow()
  End If

End Sub



Private Class MarketingClient

  ' Read-Only Properties
  Public ReadOnly Address As String
  Public ReadOnly Addressee As String
  Public ReadOnly Age As Integer
  Public ReadOnly Client As finClient
  Public ReadOnly ClientId As String
  Public ReadOnly Email As String
  Public ReadOnly Gender As String
  Public ReadOnly Mobile As String
  Public ReadOnly Name As String
  Public ReadOnly Phone As String
  Public ReadOnly Salutation As String

  ' Properties
  Public Selected As Boolean

  Public Sub New(client As finClient)

    Me.Client = client
    Me.ClientId = client.clientId
    Me.Name = client.name
    Me.Age = client.Age
    If client.Gender = isefinGender.Unknown Then
      Me.Gender = ""
    Else
      Me.Gender = client.GenderText
    End If
    Me.Address = client.ContactAddresses.GetAddressForLetters(False)
    Me.Addressee = client.AddresseeNameResolved2
    Me.Email = client.ContactMethods.GetCurrentEmail().Value
    Me.Phone = client.ContactMethods.GetCurrentPhoneHome().Value
    Me.Mobile = client.ContactMethods.GetCurrentMobile().Value
    Me.Salutation = client.SalutationResolved

    ' Selected by default
    Me.Selected = True

  End Sub

  Public Function ToCsvString() As String

    Dim List As ISList

    List = New ISList()

    ' Order as per Grid
    With List
      .Add(Me.ClientId)
      .Add(Me.Name)
      .Add(Me.Gender)
      If Me.Age = 0 Then
        .Add("")
      Else
        .Add(CStr(Me.Age))
      End If
      .Add(Me.Address)
      .Add(Me.Addressee)
      .Add(Me.Salutation)
      .Add(Me.Email)
      .Add(Me.Phone)
      .Add(Me.Mobile)
    End With

    Return List.ToCsvString()

  End Function

End Class</Code><CommandButtonCancelCaption /><CommandButtonOkCaption /><CommandButtonPrintCaption /><CommandButtonSaveCaption /><CommandButtonsShowCancel>true</CommandButtonsShowCancel><CommandButtonsShowOk>true</CommandButtonsShowOk><CommandButtonsShowPrint>false</CommandButtonsShowPrint><CommandButtonsShowSave>false</CommandButtonsShowSave><Description>Client Marketing Wizard</Description><FormMinimumHeight>600</FormMinimumHeight><FormMinimumWidth>680</FormMinimumWidth><FormShowHeading>true</FormShowHeading><Icon>Client_Relationship</Icon><Language>VisualBasic</Language><NavigationMethod>Wizard</NavigationMethod><Notes>Sample Page Set to list Clients for marketing.

Detailed in the finPOWER Connect 2 Page Sets document.</Notes><PermissionKeyExecute /><Pages><finPageSetPages version="1.00"><PageSetPage version="1.00"><Active>true</Active><Code>FILTERS</Code><LayoutMode>Flow</LayoutMode><Summary>Specify criteria by which to filter Clients.</Summary><Title>Filters</Title><PageObjects><finPageObjects version="1.00"><PageObject name="lblClientMarketingFlags"><AutoSize>true</AutoSize><Caption>Specify Client Marketing flags.</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>16</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>0</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>Label</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText>If any of these options are checked then Clients without these marketing options checked will be excluded.</TooltipText><Top>0</Top><Visible>true</Visible><Width>200</Width><FontBold>false</FontBold><FontItalic>false</FontItalic><FontName /><FontSize>9</FontSize><FontUnderline>false</FontUnderline><HeightFill>false</HeightFill><LabelStyle>Heading4</LabelStyle></PageObject><PageObject name="chkMarketing"><AutoSize>true</AutoSize><Caption>Marketing</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>20</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>0</PaddingBottom><PaddingLeft>8</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>CheckBox</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>200</Width><CheckBoxStyleAsOptionButton>false</CheckBoxStyleAsOptionButton><FontBold>false</FontBold></PageObject><PageObject name="chkMarketingLetter"><AutoSize>true</AutoSize><Caption>Letter</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>20</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>0</PaddingBottom><PaddingLeft>30</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>CheckBox</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>200</Width><CheckBoxStyleAsOptionButton>false</CheckBoxStyleAsOptionButton><FontBold>false</FontBold></PageObject><PageObject name="chkMarketingEmail"><AutoSize>true</AutoSize><Caption>Email</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>20</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>0</PaddingBottom><PaddingLeft>30</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>CheckBox</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>200</Width><CheckBoxStyleAsOptionButton>false</CheckBoxStyleAsOptionButton><FontBold>false</FontBold></PageObject><PageObject name="chkMarketingSms"><AutoSize>true</AutoSize><Caption>SMS</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>20</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>0</PaddingBottom><PaddingLeft>30</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>CheckBox</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>200</Width><CheckBoxStyleAsOptionButton>false</CheckBoxStyleAsOptionButton><FontBold>false</FontBold></PageObject><PageObject name="chkMarketingPhone"><AutoSize>true</AutoSize><Caption>Phone (Voice)</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>20</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>0</PaddingBottom><PaddingLeft>30</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>CheckBox</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>200</Width><CheckBoxStyleAsOptionButton>false</CheckBoxStyleAsOptionButton><FontBold>false</FontBold></PageObject><PageObject name="lblClientLocation"><AutoSize>true</AutoSize><Caption>Optionally, restrict to Clients at the specified Locations.</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>16</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>0</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>8</PaddingTop><PageObjectType>Label</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>200</Width><FontBold>false</FontBold><FontItalic>false</FontItalic><FontName /><FontSize>9</FontSize><FontUnderline>false</FontUnderline><HeightFill>false</HeightFill><LabelStyle>Heading4</LabelStyle></PageObject><PageObject name="txtRangeCities"><AutoSize>true</AutoSize><Caption>Cities:</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>20</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>8</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>TextBox</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>0</Width><FontBold>false</FontBold><Mandatory>false</Mandatory><MaxLength>0</MaxLength><SpecialFormatting>None</SpecialFormatting><TextBoxMultiLine>false</TextBoxMultiLine><ButtonType1>Find</ButtonType1><ButtonType2>None</ButtonType2><ButtonType3>None</ButtonType3></PageObject><PageObject name="txtRangeSuburbs"><AutoSize>true</AutoSize><Caption>Suburbs:</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>20</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>8</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>TextBox</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>0</Width><FontBold>false</FontBold><Mandatory>false</Mandatory><MaxLength>0</MaxLength><SpecialFormatting>None</SpecialFormatting><TextBoxMultiLine>false</TextBoxMultiLine><ButtonType1>Find</ButtonType1><ButtonType2>None</ButtonType2><ButtonType3>None</ButtonType3></PageObject><PageObject name="lblClientAge"><AutoSize>true</AutoSize><Caption>Optionally, restrict to Clients of a certain Age or Gender.</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>16</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>0</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>8</PaddingTop><PageObjectType>Label</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>200</Width><FontBold>false</FontBold><FontItalic>false</FontItalic><FontName /><FontSize>9</FontSize><FontUnderline>false</FontUnderline><HeightFill>false</HeightFill><LabelStyle>Heading4</LabelStyle></PageObject><PageObject name="numClientAgeFrom"><AutoSize>true</AutoSize><Caption>Aged:</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>20</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>8</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>NumberBox</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>0</Width><FontBold>false</FontBold><Mandatory>false</Mandatory><MaxValue>99</MaxValue><MinValue>0</MinValue><NumberBoxAllowBlank>false</NumberBoxAllowBlank><NumberBoxBlankIfZero>false</NumberBoxBlankIfZero><NumberBoxDecimals>0</NumberBoxDecimals><NumberBoxGroupDigits>false</NumberBoxGroupDigits><NumberBoxSpecialType>None</NumberBoxSpecialType><ShowSpin>true</ShowSpin><ButtonType1>None</ButtonType1><ButtonType2>None</ButtonType2><ButtonType3>None</ButtonType3></PageObject><PageObject name="numClientAgeTo"><AutoSize>true</AutoSize><Caption>to</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>20</Height><KeepWithPrevious>true</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>0</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>NumberBox</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>0</Width><FontBold>false</FontBold><Mandatory>false</Mandatory><MaxValue>99</MaxValue><MinValue>0</MinValue><NumberBoxAllowBlank>false</NumberBoxAllowBlank><NumberBoxBlankIfZero>false</NumberBoxBlankIfZero><NumberBoxDecimals>0</NumberBoxDecimals><NumberBoxGroupDigits>false</NumberBoxGroupDigits><NumberBoxSpecialType>None</NumberBoxSpecialType><ShowSpin>true</ShowSpin><ButtonType1>None</ButtonType1><ButtonType2>None</ButtonType2><ButtonType3>None</ButtonType3></PageObject><PageObject name="cboGender"><AutoSize>true</AutoSize><Caption>Gender:</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>20</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>8</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>ComboBox</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>84</Width><FontBold>false</FontBold><LimitToList>true</LimitToList><List>,Female,Male</List><Mandatory>false</Mandatory><MaxLength>6</MaxLength><ButtonType1>None</ButtonType1><ButtonType2>None</ButtonType2><ButtonType3>None</ButtonType3></PageObject><PageObject name="lblAccountFilters"><AutoSize>true</AutoSize><Caption>Specify Account filters.</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>16</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>0</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>8</PaddingTop><PageObjectType>Label</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText>Only Clients with Accounts matching these criteria will be included.</TooltipText><Top>0</Top><Visible>true</Visible><Width>200</Width><FontBold>false</FontBold><FontItalic>false</FontItalic><FontName /><FontSize>9</FontSize><FontUnderline>false</FontUnderline><HeightFill>false</HeightFill><LabelStyle>Heading4</LabelStyle></PageObject><PageObject name="cboAccountsMaturingWithin"><AutoSize>true</AutoSize><Caption>Maturing Within:</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>20</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>8</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>DateCycleComboBox</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>0</Width><DateCycleIsFrequency>false</DateCycleIsFrequency><FontBold>false</FontBold><LimitToList>false</LimitToList><List>1 Week,2 Weeks,1 Month,3 Months</List><Mandatory>false</Mandatory><MaxLength>0</MaxLength></PageObject><PageObject name="chkAccountsExcludeOverdue"><AutoSize>true</AutoSize><Caption>Exclude Clients with ANY Overdue Accounts?</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>20</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>8</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>CheckBox</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>200</Width><CheckBoxStyleAsOptionButton>false</CheckBoxStyleAsOptionButton><FontBold>false</FontBold></PageObject><PageObject name="lblClientFilters"><AutoSize>true</AutoSize><Caption>Other Client filters.</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>16</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>0</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>12</PaddingTop><PageObjectType>Label</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>200</Width><FontBold>false</FontBold><FontItalic>false</FontItalic><FontName /><FontSize>8.5</FontSize><FontUnderline>false</FontUnderline><HeightFill>false</HeightFill><LabelStyle>Heading4</LabelStyle></PageObject><PageObject name="txtRangeClients"><AutoSize>true</AutoSize><Caption>Clients:</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>20</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>8</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>TextBox</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>0</Width><FontBold>false</FontBold><Mandatory>false</Mandatory><MaxLength>0</MaxLength><SpecialFormatting>None</SpecialFormatting><TextBoxMultiLine>false</TextBoxMultiLine><ButtonType1>Find</ButtonType1><ButtonType2>None</ButtonType2><ButtonType3>None</ButtonType3></PageObject><PageObject name="txtRangeClientTypes"><AutoSize>true</AutoSize><Caption>Clients Types:</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>20</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>8</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>TextBox</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>0</Width><FontBold>false</FontBold><Mandatory>false</Mandatory><MaxLength>0</MaxLength><SpecialFormatting>None</SpecialFormatting><TextBoxMultiLine>false</TextBoxMultiLine><ButtonType1>Find</ButtonType1><ButtonType2>None</ButtonType2><ButtonType3>None</ButtonType3></PageObject><PageObject name="txtRangeClientGroups"><AutoSize>true</AutoSize><Caption>Clients Groups:</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>20</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>8</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>TextBox</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>0</Width><FontBold>false</FontBold><Mandatory>false</Mandatory><MaxLength>0</MaxLength><SpecialFormatting>None</SpecialFormatting><TextBoxMultiLine>false</TextBoxMultiLine><ButtonType1>Find</ButtonType1><ButtonType2>None</ButtonType2><ButtonType3>None</ButtonType3></PageObject></finPageObjects></PageObjects></PageSetPage><PageSetPage version="1.00"><Active>true</Active><Code>CLIENTS</Code><LayoutMode>Flow</LayoutMode><Summary>Select the Clients to market to and use the buttons below the grid to action.</Summary><Title>Clients</Title><PageObjects><finPageObjects version="1.00"><PageObject name="lblClients"><AutoSize>true</AutoSize><Caption>Clients.</Caption><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>16</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>0</PaddingBottom><PaddingLeft>0</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>Label</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>200</Width><FontBold>false</FontBold><FontItalic>false</FontItalic><FontName /><FontSize>9</FontSize><FontUnderline>false</FontUnderline><HeightFill>false</HeightFill><LabelStyle>Heading4</LabelStyle></PageObject><PageObject name="gridClients"><AutoSize>true</AutoSize><Caption /><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>80</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>4</PaddingBottom><PaddingLeft>8</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>Grid</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>0</Width><HeightFill>true</HeightFill><ButtonType1>None</ButtonType1><ButtonType2>None</ButtonType2><ButtonType3>None</ButtonType3></PageObject><PageObject name="htmlPreview"><AutoSize>true</AutoSize><Caption /><CaptionWidth>-1</CaptionWidth><ColourBackground /><ColourForeground /><Enabled>true</Enabled><FieldHint /><GroupTags /><Height>200</Height><KeepWithPrevious>false</KeepWithPrevious><Left>0</Left><LeftAlignPageObjectName /><PaddingBottom>0</PaddingBottom><PaddingLeft>8</PaddingLeft><PaddingRight>0</PaddingRight><PaddingTop>0</PaddingTop><PageObjectType>HtmlPanel</PageObjectType><ReadOnly>false</ReadOnly><TabIndex>0</TabIndex><TabStop>true</TabStop><TextBoxWidth>0</TextBoxWidth><TooltipText /><Top>0</Top><Visible>true</Visible><Width>0</Width><HeightFill>true</HeightFill><HtmlPanelDisabledCaption /><HtmlPanelShowBorder>true</HtmlPanelShowBorder></PageObject></finPageObjects></PageObjects></PageSetPage></finPageSetPages></Pages></finPageSet>