我已经能够限制发送到应用程序的数据数量,但是我需要帮助设置应用程序以显示获取下一个按钮。
数据检索代码 - 我只使用show 2行,因为我在测试数据库中有少量数据
<WebMethod(Description:="Retrieve members of a Client List"), SoapHeader("MessageSoapHeader", direction:=SoapHeaderDirection.In)> _
Public Function GetClientListMembers() As DataSet
Dim RS As SqlDataReader
RS = objApp.ConnectUser(MessageSoapHeader.UID, MessageSoapHeader.PWD, MessageSoapHeader.Campaign, MessageSoapHeader.Keyword, LocalCommon.apSOAPAdvanced)
RS.Close()
If objApp.ClassErrorsCount > 0 Then
objApp.DB.Close()
Dim NX As New Exception
LLIB.ThrowSOAPException(objApp.Errors(1).Number, NX, objApp.DB, objApp.Errors(1).ErrorType, objApp.Errors(1).Description)
GetClientListMembers = New DataSet
Exit Function
End If
LLIB.FunctionCount(objApp, "GetClientListMembers") 'This must be placed after the close of RS
GetClientListMembers = LLIB.GetDataSet("SELECT CellNumber,Carrier,Keyword, dbo.fn_ToUTC(ActualOptInDate) AS ActualOptInDate FROM Optins WHERE ShortCode='" & objApp.ShortCode & "' AND Keyword='" & objApp.Keyword & "' AND OptInState=2 ORDER BY CellNumber ASC Offset 2 ROWS FETCH NEXT 2 ROWS ONLY", objApp)
GetClientListMembers.Tables(0).TableName = "Cell Numbers"
LLIB.RecordRowTransfer(GetClientListMembers.Tables(0).Rows.Count, LLIB.RowTransferDirection.ToClient, objApp)
'Now get the email stuff
LLIB.AddDataTable(GetClientListMembers, "Email Addresses", "SELECT EmailAddress,Keyword, dbo.fn_ToUTC(ActualOptInDate) AS ActualOptInDate FROM EmailOptins WHERE ShortCode='" & objApp.ShortCode & "' AND Keyword='" & objApp.Keyword & "' AND OptInState=2 ORDER BY EmailAddress", objApp)
If GetClientListMembers.Tables.Count > 1 Then LLIB.RecordRowTransfer(GetClientListMembers.Tables(1).Rows.Count, LLIB.RowTransferDirection.ToClient, objApp)
objApp.DB.Close()
End Function
用户视图(我需要添加“下一个”链接的地方是
Private Sub DisplayDS(ByRef ThisDS As DataSet, ByVal tblNumber As Integer)
Dim i As Integer
Me.txtDisplay.Text = ThisDS.ToString
Me.comboDSTables.Items.Clear()
For i = 0 To ThisDS.Tables.Count - 1
Me.comboDSTables.Items.Add(i.ToString & "_" & ThisDS.Tables(i).TableName)
Next
Me.comboDSTables.SelectedIndex = tblNumber
Me.lblNumberOfTables.Text = ThisDS.Tables.Count
Dim myBindingSource As BindingSource = New BindingSource
myBindingSource.DataSource = ThisDS.Tables(tblNumber)
Me.AdvDataGrid.DataSource = myBindingSource
End Sub
“点击”或按钮代码为
'Private Sub cmdDeleteSLMembersDifferential_Click(sender As Object, e As EventArgs) Handles cmdDeleteSLMembersDifferential.Click
' Dim xmlNodeResult As Xml.XmlNode
' LoadHeader()
' Try
' xmlNodeResult = AdvServer.DeleteSendListMembersDifferential(Me.txtListName.Text, TestDB())
' Catch SoapEx As Exception
' MsgBox(SoapEx.Message)
' Exit Sub
' End Try
' Me.txtDisplay.Text = xmlNodeResult.OuterXml
'End Sub
Private Sub cmdSendToList_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdSendToList.Click
Dim xmlNodeResult As Xml.XmlNode, ThisTime As Date
LoadHeader()
If Me.chkDelay.Checked Then
If IsDate(Me.txtDelayTime.Text) Then
ThisTime = CDate(Me.txtDelayTime.Text)
ThisTime = ThisTime.ToUniversalTime 'Input is in local time.
Else
MsgBox("Delay set but Delay Time is not a date")
Exit Sub
End If
Else
ThisTime = Now()
End If
Try
xmlNodeResult = AdvServer.SendToSendList(Me.txtListName.Text, Me.txtMsg.Text, Me.chkDelay.Checked, ThisTime)
Catch SoapEx As Exception
MsgBox(SoapEx.Message)
Exit Sub
End Try
Me.txtDisplay.Text = xmlNodeResult.OuterXml
End Sub
非常感谢任何帮助 - 我已经在这方面工作了大约一个星期,它正在逃避我!
谢谢!