To Check whether Data set contains the particulate table===>>
If (dsXmlOutPut.Tables.Contains("MotorPolicy")) Then
End If
To Check whether particular (dsXmlDs) Dataset is exist or not===>>
f (dsXmlDs Is Nothing) Then
End IF
Set data set value in session====>>
Session("dsXmlDs") = dsXmlDs
Session("dsXmlOutPut") = dsXmlOutPut
Pass Value through QueryString===>>
Response.Redirect("Default.aspx?QuoteNo=" + "261214200")
Collect value from QueryString===>>
Dim V As String = Request.QueryString("QuoteNo")
To Collect data set value from session===>>
Dim dsXmlDs As New DataSet
Dim dsXmlOutPut As New DataSet
dsXmlDs = CType(Session("dsXmlDs"), DataSet)
dsXmlOutPut = CType(Session("dsXmlOutPut"), DataSet)
Concatinate more than one values table of dataset and display on Control===>>
lblFirstName.Text = Convert.ToString(dsXmlDs.Tables(1).Rows(0)("Salutation") + " " + Convert.ToString(dsXmlDs.Tables(1).Rows(0)("Forename")) + " " + Convert.ToString(dsXmlDs.Tables(1).Rows(0)("LastName")) + " " + Convert.ToString(dsXmlDs.Tables(1).Rows(0)("MidName").ToString()))
Collect XML from services===>>
Dim Quote As New QuationDetailsLMS.LmsServices() // (QuationDetailsLMS is folder name whare services is added and LmsServices is a method in that services)
Dim res As New QuationDetailsLMS.QuoteDetailEnt() //( QuoteDetailEnt is a method in service)
res = Quote.GetQuoteDetails(txtQuatationNo.Text, txtUserId.Text, txtPassword.Text)
Convert XML(string format) to dataset===>
//Pass parametor in method to convert
dsXmlDs = XmlString2DataSet(res.InputXML)
dsXmlOutPut = XmlString2DataSet(res.OutPutXML)
// function
Public Shared Function XmlString2DataSet(ByVal xmlString As String) As DataSet
Dim quoteDataSet As DataSet = Nothing
If [String].IsNullOrEmpty(xmlString) Then
Return quoteDataSet
End If
Try
Using stringReader As New System.IO.StringReader(xmlString)
quoteDataSet = New DataSet()
quoteDataSet.ReadXml(stringReader)
End Using
Catch
quoteDataSet = Nothing
End Try
Return quoteDataSet
End Function
If (dsXmlOutPut.Tables.Contains("MotorPolicy")) Then
End If
To Check whether particular (dsXmlDs) Dataset is exist or not===>>
f (dsXmlDs Is Nothing) Then
End IF
Set data set value in session====>>
Session("dsXmlDs") = dsXmlDs
Session("dsXmlOutPut") = dsXmlOutPut
Pass Value through QueryString===>>
Response.Redirect("Default.aspx?QuoteNo=" + "261214200")
Collect value from QueryString===>>
Dim V As String = Request.QueryString("QuoteNo")
To Collect data set value from session===>>
Dim dsXmlDs As New DataSet
Dim dsXmlOutPut As New DataSet
dsXmlDs = CType(Session("dsXmlDs"), DataSet)
dsXmlOutPut = CType(Session("dsXmlOutPut"), DataSet)
Concatinate more than one values table of dataset and display on Control===>>
lblFirstName.Text = Convert.ToString(dsXmlDs.Tables(1).Rows(0)("Salutation") + " " + Convert.ToString(dsXmlDs.Tables(1).Rows(0)("Forename")) + " " + Convert.ToString(dsXmlDs.Tables(1).Rows(0)("LastName")) + " " + Convert.ToString(dsXmlDs.Tables(1).Rows(0)("MidName").ToString()))
Collect XML from services===>>
Dim Quote As New QuationDetailsLMS.LmsServices() // (QuationDetailsLMS is folder name whare services is added and LmsServices is a method in that services)
Dim res As New QuationDetailsLMS.QuoteDetailEnt() //( QuoteDetailEnt is a method in service)
res = Quote.GetQuoteDetails(txtQuatationNo.Text, txtUserId.Text, txtPassword.Text)
Convert XML(string format) to dataset===>
//Pass parametor in method to convert
dsXmlDs = XmlString2DataSet(res.InputXML)
dsXmlOutPut = XmlString2DataSet(res.OutPutXML)
// function
Public Shared Function XmlString2DataSet(ByVal xmlString As String) As DataSet
Dim quoteDataSet As DataSet = Nothing
If [String].IsNullOrEmpty(xmlString) Then
Return quoteDataSet
End If
Try
Using stringReader As New System.IO.StringReader(xmlString)
quoteDataSet = New DataSet()
quoteDataSet.ReadXml(stringReader)
End Using
Catch
quoteDataSet = Nothing
End Try
Return quoteDataSet
End Function
No comments:
Post a Comment