1 to 30 - 1.00Rs.
31 to 100 - 2.55Rs.
101 to 300 - 2.95Rs.
301 onwards - 4.55Rs.
Industrial:
1 to 1000 - 2.40Rs.
1001 to 1500 - 3.00Rs.
1501 onwards - 3.40Rs.
Non Household:
1 to 100 - 2.56RS.
101 to 200 - 4.10Rs.
201 onwards - 5.00Rs.
Urban water supply - 2.25 Rs.
Rural, water supply - 1.40 Rs .
Agriculture - 0.90Rs.
Rural Lighting - 1.70Rs.
Urban Lighting - 2.50Rs.
Poultry Farm - 0.90Rs.
Total Reading = Current Reading - Last Reading
Ans:
Dim c, r1, a, b, p As Integer
Private Sub Form_Load()
cboOptions.Addltem "HOUSEHOLD", 0
cboOptions. Addltem "NONHOUSEHOLD",1
cboOptions.Addltem " IDNUSTRIAL", 2
cboOptions.Addltem "URBAN WTAER SUPPLY", 3
cboOptions. Addltem "RURAL WATER SUPPLY", 4
cboOptions.Addltem "AGRICULTURE", 5
cboOptions.Addltem "RURAL LIGHTING", 6
cboOptions.Addltem "URBAN LIGHTING", 7
cboOptions.Addltem "POULTRY FARM", 8
End Sub
Private Sub cmdCalculate_Click ()
p2 = 0
t1 = cboOptions.Text
c = Clnt(txtCMR.Text) - CInt (txtLMR. Text)
If t1 = "HOUSEHOLD" Then for Household purpose
If c > 300 Then
r1 = c - 300
p = rl * 4.55
p2 = p + 798.5
End If
If c > 100 And c <= 300 Then
r1 = c - 100
p = r1 * 2.95
p2 = p + 208.5
End If
If c > 30 And c <= 100 Then
r1 = c - 30
p = r1 * 2.55
p2 = p + 30
End If
If c <= 30 Then
r1 = c - 0
p = r1 * 1
p2 = p
End If
Elself t1 = "NONHOUSEHOLD" Then for non household
If c > 200 Then
r1 = c - 200
p= r1 * 5
p2 = p + 660
End If
If c > 100 And c <= 200 Then
r1 = c - 100
p = r1 * 4.1
p2 = p + 250
End If
If c <= 100 Then
r1 = c - 0
p = r1 * 2.5
p2 = p
End If
Elself t1 = "IDNUSTRIAL" Then for Industrial
If c > 15000 Then
r1 = c - 15000
p = r1 * 3.4
p2 = p + 44400
End If
If c > 1000 And c <= 15000 Then
r1 = c - 1000
p = r1 * 3
p2 = p + 2400
End If
If c <= 1000 Then
r1 = c - 0
p = r1 * 2.4
p2 = p
End If
Elself t1 = "URBAN WTABR SUPPLY" Then
p2 = c * 2.25
Elself t1 = "RURAL WATER SUPPLY" Then
p2 = c * 1.4
Elself t1 = "AGRICULTURE" Then
p2 = c * 0.9
Elself t1 = "RURAL LIGHTING" Then
p2 = c * 1.7
Elself t1 = "URBAN LIGHTING" Then
p2 = c * 2.5
Else
p2 = c * 0.9
End If
txtTAmt.Text = CStr(p2)
End Sub
Private Sub cmdClear_Click()
txtName.Text = Clear
txtNumber.Text = Clear
txtMOB.Text = Clear
txtLMR.Text = Clear
txtCMR.Text = Clear
cboOptions. Text = Clear
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
No comments:
Post a Comment