Cis170A_iLabWK6_Ayala

PrivatenumberFloorsAsInteger

PrivaterequestedFloorAsInteger

PrivaterentList() AsInteger

 

PrivateSubNameValidatingEvent(ByVal sender AsSystem.Object, ByVal e AsSystem.ComponentModel.CancelEventArgs) HandlestxtName.Validating

e.Cancel = UtilityTools.ValidateStringInput("Apartment Name", txtName.Text)

EndSub

 

PrivateSubNumberValidatingEvent(ByVal sender AsSystem.Object, ByVal e AsSystem.ComponentModel.CancelEventArgs) HandlestxtNumFloors.Validating, txtFloorRequest.Validating

DimtxtBoxAsTextBox = CType(sender, TextBox)

If sender IstxtNumFloorsThen

e.Cancel = UtilityTools.ValidateNumberInput("Number of Floors", txtBox.Text, FLOOR_NUM_MIN, FLOOR_NUM_MAX, numberFloors)

btnRentData.Enabled = Note.Cancel

ElseIf sender IstxtFloorRequestThen

e.Cancel = UtilityTools.ValidateNumberInput("Number of Floors", txtBox.Text, 1, numberFloors, requestedFloor)

btnGetFloorRent.Enabled = Note.Cancel

EndIf

Ife.CancelThen

txtBox.Clear()

EndIf

EndSub
Powered by