![]() |
MS Visual Basic Example Application: |
|
Introduction |
|
Solas Property Rental is a fictitious company that manages various types of real estate properties and rents them to customers. The types of properties include apartments, townhouses, and single families. In this application, we simulate various customer-oriented transactions, including registering the potential tenants, assigning the properties to them, and collecting payments. This application was created to illustrate the various techniques of performing operations on XML elements: creating the elements, locating the values, and displaying them. |
|
|
| (Name) | Text | TextAlign | Width |
| colAccountNumber | Account # | 65 | |
| colFullName | Full Name | 120 | |
| colMaritalStatus | Marital Status | 85 | |
| colPhoneNumber | Phone # | Center | 85 |
![]() |
||||||||||||||||
|
Imports System.IO Imports System.Xml Public Class Tenants End Class |
Private Sub ShowTenants()
Dim Filename As String = "C:\Solas Property Rental\tenants.xml"
Dim docTenants As XmlDocument = New XmlDocument
If File.Exists(Filename) Then
lvwTenants.Items.Clear()
docTenants.Load(Filename)
Dim TenantElement As XmlElement = docTenants.DocumentElement
Dim ListOfTenants As XmlNodeList = TenantElement.ChildNodes
For Each Node As XmlNode In ListOfTenants
Dim lviTenant As ListViewItem = New ListViewItem(Node.FirstChild.InnerText) ' Account Number
lviTenant.SubItems.Add(Node.FirstChild.NextSibling.InnerText) ' Full Name
lviTenant.SubItems.Add(Node.FirstChild.NextSibling.NextSibling.InnerText) ' Phone Number
lviTenant.SubItems.Add(Node.FirstChild.NextSibling.NextSibling.NextSibling.InnerText) ' Marital Status
lvwTenants.Items.Add(lviTenant)
Next
End If
End Sub
|
Private Sub Tenants_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles Me.Load
ShowTenants()
End Sub
|
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||
|
| (Name) | Text | TextAlign | Width |
| colPropertyCode | Prop Code | 65 | |
| colPropertyType | Property Type | 85 | |
| colBedrooms | Bedrooms | Right | 65 |
| colBathrooms | Bathrooms | Right | 65 |
| colMonthlyRent | Monthly Rent | Right | 75 |
| colStatus | Status | 65 |
![]() |
||||||||||||||||
|
Imports System.IO Imports System.Xml Public Class RentalProperties End Class |
Private Sub ShowProperties()
Dim DOMProperties As XmlDocument = New XmlDocument
Dim Filename As String = "C:\Solas Property Rental\properties.xml"
If File.Exists(Filename) Then
lvwProperties.Items.Clear()
DOMProperties.Load(Filename)
Dim RootProperty As XmlElement = DOMProperties.DocumentElement
Dim ListOfProperties As XmlNodeList = RootProperty.ChildNodes
For Each Node As XmlNode In ListOfProperties
Dim lviProperty As ListViewItem = New ListViewItem(Node.FirstChild.InnerText) ' Property Code
lviProperty.SubItems.Add(Node.FirstChild.NextSibling.InnerText) ' Property Type
lviProperty.SubItems.Add(Node.FirstChild.NextSibling.NextSibling.InnerText) ' Bedrooms
lviProperty.SubItems.Add(Node.FirstChild.NextSibling.NextSibling.NextSibling.InnerText) ' Bathrooms
lviProperty.SubItems.Add(Node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.InnerText) ' Monthly Rent
lviProperty.SubItems.Add(Node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText) ' Status
lvwProperties.Items.Add(lviProperty)
Next
End If
End Sub
|
Private Sub RentalProperties_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles Me.Load
ShowProperties()
End Sub
|
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Imports System.IO Imports System.Xml Public Class RentalAllocation End Class |
Private Sub txtTenantAcntNbr_Leave(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles txtTenantAcntNbr.Leave
Dim Filename As String = "C:\Solas Property Rental\tenants.xml"
Dim docTenants As XmlDocument = New XmlDocument
If File.Exists(Filename) Then
docTenants.Load(Filename)
Dim TenantElement As XmlElement = docTenants.DocumentElement
Dim ListOfTenants As XmlNodeList = TenantElement.ChildNodes
Dim TenantFound As Boolean = False
For i = 0 To ListOfTenants.Count - 1
Dim Node As XmlNode = ListOfTenants(i)
If Node.FirstChild.InnerText = txtTenantAcntNbr.Text Then
TenantFound = True
txtTenantName.Text = Node.FirstChild.NextSibling.InnerText
txtMaritalStatus.Text = Node.FirstChild.NextSibling.NextSibling.InnerText
End If
Next
If TenantFound = False Then
MsgBox("There is no tenant with that account number")
txtTenantAcntNbr.Text = ""
End If
Else
MsgBox("There is no list of tenants to check.")
End If
End Sub
|
Private Sub txtPropertyCode_Leave(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles txtPropertyCode.Leave
Dim Filename As String = "C:\Solas Property Rental\properties.xml"
Dim DOMProperties As XmlDocument = New XmlDocument
If File.Exists(Filename) Then
DOMProperties.Load(Filename)
Dim PropertyElement As XmlElement = DOMProperties.DocumentElement
Dim ListOfProperties As XmlNodeList = PropertyElement.ChildNodes
Dim PropertyFound As Boolean = False
For i = 0 To ListOfProperties.Count - 1
Dim Node As XmlNode = ListOfProperties(i)
If Node.FirstChild.InnerText = txtPropertyCode.Text Then
PropertyFound = True
txtPropertyType.Text = Node.FirstChild.NextSibling.InnerText
txtMonthlyRent.Text = Node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.InnerText
End If
Next
If PropertyFound = False Then
MsgBox("There is no Property with that code")
txtPropertyType.Text = ""
End If
Else
MsgBox("There is no list of properties to check.")
End If
End Sub
|
| (Name) | Text | TextAlign | Width |
| colAllocationCode | Alloc Code | 65 | |
| colDateAllocated | Date Allocated | Center | 85 |
| colTenantAccount | Tenant # | Center | 65 |
| colTenantName | Tenant Name | 100 | |
| colPropertyCode | Prop Code | Center | 65 |
| colPropertyType | Prop Type | 75 | |
| colContractLength | Contract Length | 88 | |
| colRentStartDate | Rent Start Date | Center | 88 |
| colMonthlyRent | Monthly Rent | Right | 76 |
Imports System.IO Imports System.Xml Public Class RentalAllocations End Class |
Private Sub ShowRentalAllocations()
Dim Filename As String = "C:\Solas Property Rental\contracts.xml"
Dim docAllocations As XmlDocument = New XmlDocument
If File.Exists(Filename) Then
lvwAllocations.Items.Clear()
docAllocations.Load(Filename)
Dim AllocationElement As XmlElement = docAllocations.DocumentElement
Dim ListOfAllocations As XmlNodeList = AllocationElement.ChildNodes
For Each Node As XmlNode In ListOfAllocations
Dim lviAllocation As ListViewItem = New ListViewItem(Node.FirstChild.InnerText) ' Allocation Code
lviAllocation.SubItems.Add(Node.FirstChild.NextSibling.InnerText) ' Date Allocated
lviAllocation.SubItems.Add(Node.FirstChild.NextSibling.NextSibling.InnerText) ' Tenant Account Number
lviAllocation.SubItems.Add(Node.FirstChild.NextSibling.NextSibling.NextSibling.InnerText) ' Tenant Name
lviAllocation.SubItems.Add(Node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText) ' Property Code
lviAllocation.SubItems.Add(Node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText) ' Property Type
lviAllocation.SubItems.Add(Node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText) ' Contract Length
lviAllocation.SubItems.Add(Node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText) ' Rent Start Date
lviAllocation.SubItems.Add(Node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText) ' Monthly Rent
lvwAllocations.Items.Add(lviAllocation)
Next
End If
End Sub
|
Private Sub RentalAllocations_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles Me.Load
ShowRentalAllocations()
End Sub
|
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Imports System.IO Imports System.Xml Public Class RentPayment End Class |
Private Sub txtAllocationCode_Leave(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles txtAllocationCode.Leave
Dim Filename As String = "C:\Solas Property Rental\contracts.xml"
Dim docAllocations As XmlDocument = New XmlDocument
If File.Exists(Filename) Then
docAllocations.Load(Filename)
Dim AllocationElement As XmlElement = docAllocations.DocumentElement
Dim ListOfAllocations As XmlNodeList = AllocationElement.ChildNodes
Dim ContractFound As Boolean = False
For i = 0 To ListOfAllocations.Count - 1
Dim Node As XmlNode = ListOfAllocations(i)
If Node.FirstChild.InnerText = txtAllocationCode.Text Then
ContractFound = True
txtTenantAcntNber.Text = Node.FirstChild.NextSibling.NextSibling.InnerText
txtTenantName.Text = Node.FirstChild.NextSibling.NextSibling.NextSibling.InnerText
txtPropertyCode.Text = Node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText
txtPropertyType.Text = Node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText
txtAmountReceived.Text = Node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText
End If
Next
If ContractFound = False Then
MsgBox("There is no rental contract with that number")
txtTenantAcntNber.Text = ""
End If
Else
MsgBox("There is no list of rental contracts to check.")
End If
End Sub
|
| (Name) | Text | TextAlign | Width |
| colReceiptNumber | Receipt # | Right | |
| colDateReceived | Date Received | Center | 85 |
| colAllocationCode | Alloc Code | Center | 65 |
| colTenantAccount | Tenant # | Center | 65 |
| colTenantName | Tenant Name | 100 | |
| colPropertyCode | Prop Code | Center | 65 |
| colPropertyType | Prop Type | 75 | |
| colPaymentFor | Payment For | 88 | |
| colAmountReceived | Amount | Right | 50 |
![]() |
||||||||||||||||
|
Imports System.IO Imports System.Xml Public Class RentPayments End Class |
Private Sub ShowRentPayments()
Dim Filename As String = "C:\Solas Property Rental\payments.xml"
Dim DocumentPayments As XmlDocument = New XmlDocument
If File.Exists(Filename) Then
lvwRentPayments.Items.Clear()
DocumentPayments.Load(Filename)
Dim AllocationElement As XmlElement = DocumentPayments.DocumentElement
Dim ListOfAllocations As XmlNodeList = AllocationElement.ChildNodes
For Each Node As XmlNode In ListOfAllocations
Dim lviPayment As ListViewItem = New ListViewItem(node.FirstChild.InnerText) ' Receipt Number
lviPayment.SubItems.Add(node.FirstChild.NextSibling.InnerText) ' Date Received
lviPayment.SubItems.Add(node.FirstChild.NextSibling.NextSibling.InnerText) ' Allocation Code
lviPayment.SubItems.Add(node.FirstChild.NextSibling.NextSibling.NextSibling.InnerText) ' Tenant Account Number
lviPayment.SubItems.Add(node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.InnerText) ' Tenant Name
lviPayment.SubItems.Add(node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText) ' Property Code
lviPayment.SubItems.Add(node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText) ' Property Type
lviPayment.SubItems.Add(node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText) ' Payment For
lviPayment.SubItems.Add(node.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.NextSibling.InnerText) ' Amount
lvwRentPayments.Items.Add(lviPayment)
Next
End If
End Sub
|
Private Sub RentPayments_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles Me.Load
ShowRentPayments()
End Sub
|
![]() |
|||||||||||||||
|
Private Sub btnRentPayments_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles btnRentPayments.Click
Dim frmPayment As RentPayments = New RentPayments
frmPayment.Show()
nd Sub
|
Private Sub btnRentalAllocations_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles btnRentalAllocations.Click
Dim frmAllocations As RentalAllocations = New RentalAllocations
frmAllocations.ShowDialog()
End Sub
|
Private Sub btnTenants_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles btnTenants.Click
Dim frmTenants As Tenants = New Tenants
frmTenants.ShowDialog()
End Sub
|
Private Sub btnRentalProperties_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles btnRentalProperties.Click
Dim frmProperties As RentalProperties = New RentalProperties
frmProperties.ShowDialog()
End Sub
|
Private Sub btnClose_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles btnClose.Click
End
End Sub
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Private Sub btnNewAllocation_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles btnNewAllocation.Click
Dim AllocationCode As String
Dim TenantAccountNumber As String
Dim TenantName As String
Dim MaritalStatus As String
Dim PropertyCode As String
Dim PropertyType As String
Dim ContractLength As String
Dim DateAllocated As DateTime
Dim RentStartDate As Date
Dim MonthlyRent As Double
Dim Editor As RentalAllocation = New RentalAllocation
Directory.CreateDirectory("C:\Solas Property Rental")
Dim Filename As String = "C:\Solas Property Rental\contracts.xml"
If Editor.ShowDialog() = DialogResult.OK Then
Dim DOMAllocation As XmlDocument = New XmlDocument
If Not File.Exists(Filename) Then
DOMAllocation.LoadXml( _
"<?xml version=""1.0"" encoding=""utf-8""?>" & _
"<Allocations></Allocations>")
DOMAllocation.Save(Filename)
End If
DOMAllocation.Load(Filename)
Dim nodRoot As XmlElement = DOMAllocation.DocumentElement
AllocationCode = Editor.txtAllocationCode.Text
DateAllocated = Editor.dtpDateAllocated.Value
TenantAccountNumber = Editor.txtTenantAcntNbr.Text
TenantName = Editor.txtTenantName.Text
MaritalStatus = Editor.txtMaritalStatus.Text
PropertyCode = Editor.txtPropertyCode.Text
PropertyType = Editor.txtPropertyType.Text
MonthlyRent = Double.Parse(Editor.txtMonthlyRent.Text)
ContractLength = Editor.cbxContractLengths.Text
RentStartDate = Editor.dtpRentStartDate.Value
Dim RootElement As XmlElement = DOMAllocation.DocumentElement
Dim AllocationElement As XmlElement = _
DOMAllocation.CreateElement("RentalAllocation")
RootElement.AppendChild(AllocationElement)
RootElement = DOMAllocation.DocumentElement
AllocationElement = DOMAllocation.CreateElement("AllocationCode")
Dim txtAllocation As XmlText = _
DOMAllocation.CreateTextNode(AllocationCode)
RootElement.LastChild.AppendChild(AllocationElement)
RootElement.LastChild.LastChild.AppendChild(txtAllocation)
AllocationElement = DOMAllocation.CreateElement("DateAllocated")
txtAllocation = _
DOMAllocation.CreateTextNode(DateAllocated.ToString("d"))
RootElement.LastChild.AppendChild(AllocationElement)
RootElement.LastChild.LastChild.AppendChild(txtAllocation)
AllocationElement = _
DOMAllocation.CreateElement("TenantAccountNumber")
txtAllocation = _
DOMAllocation.CreateTextNode(TenantAccountNumber)
RootElement.LastChild.AppendChild(AllocationElement)
RootElement.LastChild.LastChild.AppendChild(txtAllocation)
AllocationElement = DOMAllocation.CreateElement("TenantName")
txtAllocation = DOMAllocation.CreateTextNode(TenantName)
RootElement.LastChild.AppendChild(AllocationElement)
RootElement.LastChild.LastChild.AppendChild(txtAllocation)
AllocationElement = DOMAllocation.CreateElement("MaritalStatus")
txtAllocation = DOMAllocation.CreateTextNode(MaritalStatus)
RootElement.LastChild.AppendChild(AllocationElement)
RootElement.LastChild.LastChild.AppendChild(txtAllocation)
AllocationElement = DOMAllocation.CreateElement("PropertyCode")
txtAllocation = DOMAllocation.CreateTextNode(PropertyCode)
RootElement.LastChild.AppendChild(AllocationElement)
RootElement.LastChild.LastChild.AppendChild(txtAllocation)
AllocationElement = DOMAllocation.CreateElement("PropertyType")
txtAllocation = DOMAllocation.CreateTextNode(PropertyType)
RootElement.LastChild.AppendChild(AllocationElement)
RootElement.LastChild.LastChild.AppendChild(txtAllocation)
AllocationElement = DOMAllocation.CreateElement("ContractLength")
txtAllocation = DOMAllocation.CreateTextNode(ContractLength)
RootElement.LastChild.AppendChild(AllocationElement)
RootElement.LastChild.LastChild.AppendChild(txtAllocation)
AllocationElement = DOMAllocation.CreateElement("RentStartDate")
txtAllocation = _
DOMAllocation.CreateTextNode(RentStartDate.ToString("d"))
RootElement.LastChild.AppendChild(AllocationElement)
RootElement.LastChild.LastChild.AppendChild(txtAllocation)
AllocationElement = DOMAllocation.CreateElement("MonthlyRent")
txtAllocation = _
DOMAllocation.CreateTextNode(FormatNumber(MonthlyRent))
RootElement.LastChild.AppendChild(AllocationElement)
RootElement.LastChild.LastChild.AppendChild(txtAllocation)
DOMAllocation.Save(Filename)
ShowRentalAllocations()
End If
End Sub
|
Private Sub btnClose_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles btnClose.Click
Close()
End Sub
|
Private Sub btnNewPayment_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles btnNewPayment.Click
Dim ReceiptNumber As Integer
Dim AllocationCode As String
Dim TenantAccountNumber As String
Dim TenantName As String
Dim PaymentFor As String
Dim PropertyCode As String
Dim PropertyType As String
Dim DateReceived As DateTime
Dim AmountReceived As Double
Dim Editor As RentPayment = New RentPayment
Dim DOMPayment As XmlDocument = New XmlDocument
Directory.CreateDirectory("C:\Solas Property Rental")
Dim Filename As String = "C:\Solas Property Rental\payments.xml"
' If some payments were previously made
If File.Exists(Filename) Then
' Open the payments.xml file
DOMPayment.Load(Filename)
' Locate the root element
Dim AllocationElement As XmlElement = DOMPayment.DocumentElement
' Get a list of the child nodes
Dim ListOfAllocations As XmlNodeList = AllocationElement.ChildNodes
' Get the last receipt number
ReceiptNumber = _
CInt(ListOfAllocations(ListOfAllocations.Count _
- 1).FirstChild.InnerText) + 1
Editor.txtReceiptNumber.Text = ReceiptNumber.ToString()
Else
' If no payment has ever been made,
' create a new XML file for the payments
DOMPayment.LoadXml("<?xml version=""1.0"" encoding=""utf-8""?>" & _
"<RentPayments></RentPayments>")
' We will start the receipt numbers at 101
ReceiptNumber = 101
Editor.txtReceiptNumber.Text = ReceiptNumber
End If
' Display the Rent Payment dialog box
If Editor.ShowDialog() = DialogResult.OK Then
' If the user had clicked OK,
' Prepare the elements of the XML file
ReceiptNumber = CInt(Editor.txtReceiptNumber.Text)
DateReceived = Editor.dtpDateReceived.Value
AllocationCode = Editor.txtAllocationCode.Text
TenantAccountNumber = Editor.txtTenantAcntNber.Text
TenantName = Editor.txtTenantName.Text
PropertyCode = Editor.txtPropertyCode.Text
PropertyType = Editor.txtPropertyType.Text
PaymentFor = Editor.cbxMonths.Text + " " + Editor.txtYear.Text
AmountReceived = CDbl(Editor.txtAmountReceived.Text)
' Get a reference to the root element
Dim RootElement As XmlElement = DOMPayment.DocumentElement
' Create an element named Payment
Dim PaymentElement As XmlElement = DOMPayment.CreateElement("Payment")
' Add the new element as the last node of the root element
RootElement.AppendChild(PaymentElement)
' Get a reference to the root element
RootElement = DOMPayment.DocumentElement
' Create an element
PaymentElement = DOMPayment.CreateElement("ReceiptNumber")
' Create the value of the new element
Dim TextPayment As XmlText = DOMPayment.CreateTextNode(ReceiptNumber)
' Add the new element as a child of the Payment element
RootElement.LastChild.AppendChild(PaymentElement)
' Specify the value of the new element
RootElement.LastChild.LastChild.AppendChild(TextPayment)
' Follow the same logic for the other elements
PaymentElement = DOMPayment.CreateElement("DateReceived")
TextPayment = DOMPayment.CreateTextNode(DateReceived.ToString("d"))
RootElement.LastChild.AppendChild(PaymentElement)
RootElement.LastChild.LastChild.AppendChild(TextPayment)
PaymentElement = DOMPayment.CreateElement("AllocationCode")
Dim TextAllocation As XmlText = DOMPayment.CreateTextNode(AllocationCode)
RootElement.LastChild.AppendChild(PaymentElement)
RootElement.LastChild.LastChild.AppendChild(TextAllocation)
PaymentElement = DOMPayment.CreateElement("TenantAccountNumber")
TextAllocation = DOMPayment.CreateTextNode(TenantAccountNumber)
RootElement.LastChild.AppendChild(PaymentElement)
RootElement.LastChild.LastChild.AppendChild(TextAllocation)
PaymentElement = DOMPayment.CreateElement("TenantName")
TextAllocation = DOMPayment.CreateTextNode(TenantName)
RootElement.LastChild.AppendChild(PaymentElement)
RootElement.LastChild.LastChild.AppendChild(TextAllocation)
PaymentElement = DOMPayment.CreateElement("PropertyCode")
TextAllocation = DOMPayment.CreateTextNode(PropertyCode)
RootElement.LastChild.AppendChild(PaymentElement)
RootElement.LastChild.LastChild.AppendChild(TextAllocation)
PaymentElement = DOMPayment.CreateElement("PropertyType")
TextAllocation = DOMPayment.CreateTextNode(PropertyType)
RootElement.LastChild.AppendChild(PaymentElement)
RootElement.LastChild.LastChild.AppendChild(TextAllocation)
PaymentElement = DOMPayment.CreateElement("PaymentFor")
TextAllocation = DOMPayment.CreateTextNode(PaymentFor)
RootElement.LastChild.AppendChild(PaymentElement)
RootElement.LastChild.LastChild.AppendChild(TextAllocation)
PaymentElement = DOMPayment.CreateElement("AmountReceived")
TextAllocation = DOMPayment.CreateTextNode(FormatNumber(AmountReceived))
RootElement.LastChild.AppendChild(PaymentElement)
RootElement.LastChild.LastChild.AppendChild(TextAllocation)
DOMPayment.Save(Filename)
ShowRentPayments()
End If
End Sub
|
Private Sub btnClose_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles btnClose.Click
Close()
End Sub
|
| Allocation 1 | Allocation 2 | Allocation 3 | Allocation 4 | |
| Allocation Code | 4205-8274 | 5920-9417 | 2792-4075 | 7957-7294 |
| Date Allocated | 8/12/2002 | 2/18/2004 | 3/24/2004 | 10/26/2007 |
| Account # | 24-68-84 | 57-97-15 | 19-38-84 | 20-48-46 |
| Prop Code | 726-454 | 625-936 | 371-801 | 727-768 |
| Contract Length | 12 Months | 3 Months | 12 Months | 6 Months |
| Start Date | 10/1/2002 | 4/1/2004 | 6/1/2004 | 2/1/2008 |
![]() |
![]() |
| Date Received | Allocation Code | Payment For | Amount | ||
| Month | Year | ||||
| Payment 1 | 10/25/2002 | 4205-8274 | October | 2002 | 1150.50 |
| Payment 2 | 11/28/2002 | 4205-8274 | November | 2002 | 1150.50 |
| Payment 3 | 4/28/2004 | 5920-9417 | April | 2004 | 1750.00 |
| Payment 4 | 7/5/2004 | 2792-4075 | June | 2004 | 1250.25 |
| Payment 5 | 6/3/2004 | 5920-9417 | May | 2004 | 1750.00 |
| Payment 6 | 7/30/2004 | 2792-4075 | July | 2004 | 1250.25 |
| Payment 7 | 7/5/2004 | 5920-9417 | June | 2004 | 1750.00 |
| Payment 8 | 12/30/2002 | 4205-8274 | December | 2002 | 1150.50 |
![]() |
![]() |
|
|
|
||
| Home | Copyright © 2008 FunctionX, Inc. | |
|
|
||