|
Imports System.Collections.Specialized
Namespace LightSwitchApplication
Public Class SelectPeopleToMail
Private Sub SelectPeopleToMail_InitializeDataWorkspace(saveChangesTo As System.Collections.Generic.List(Of Microsoft.LightSwitch.IDataService))
If Me.MailListName Is Nothing = False Then
prmMailListName = Me.MailListName
End If
If Me.IncludeSecondary = True Then
prmIncludeSecondaries = True
Else
prmIncludeSecondaries = False
End If
If Me.IncludeExternal = True Then
prmIncludeExternals = True
Else
prmIncludeExternals = False
End If
End Sub
Private Sub GetPeopleToMailSelected_Changed(e As System.Collections.Specialized.NotifyCollectionChangedEventArgs)
Me.ptyRecordCount = Me.GetPeopleToMailSelected.Count
End Sub
Private Sub CreateFileForMailService_Execute()
Dim props As New List(Of String)()
For Each prop In Me.GetPeopleToMailSelected.SelectedItem.Details.Properties.All.OfType(Of Details.IEntityStorageProperty)()
Select Case prop.Name
Case "ID", "MailListName", "MailCodeName", "IsSecondary", "Salutation", "NameSuffix"
'Skip these fields
'Note that the initial users of PeopleTrac chose to ignore Salutation and NameSuffix
Case Else
props.Add(prop.Name)
End Select
Next
GeneralImportExport.EntityImportExport.PromptAndExportEntities(Me.DataWorkspace.WCF_RIA_ServiceData.GetPeopleToMailSelected(Me.MailListName, IncludeSecondary, IncludeExternal), props.ToArray())
End Sub
End Class
End Namespace
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.