Professional Documents
Culture Documents
V 3 Code
V 3 Code
DateTimePicker1.Format = DateTimePickerFormat.Custom
End Sub
e.Handled = True
End Sub
e.Handled = True
End Sub
Label5.Text = days
If days >= 1 And days <= 10 Then
presentRead = txtPresRead.Text
prevRead = txtPrevRead.Text
lblConsumpt.Visible = True
lblTotalAmount.Visible = True
Label5.Visible = True
txtPresRead.Clear()
txtPrevRead.Clear()
lblConsumpt.Visible = False
lblTotalAmount.Visible = False
Label5.Visible = False
Else
lblConsumpt.Text = consumption
If ComboBox2.Text = "1/2" Then
consumption = consumption - 40
total = 172.5 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
End If
ElseIf ComboBox2.Text = "3/4" Then
consumption = consumption - 40
total = 276.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
consumption = consumption - 40
total = 552.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
consumption = consumption - 40
total = 1380.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
consumption = consumption - 20
consumption = consumption - 10
Else
End If
consumption = consumption - 40
total = 3450.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
consumption = consumption - 40
total = 6210.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
consumption = consumption - 40
total = 12420.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
total = 12420.0 + (18.9 * consumption)
Else
End If
End If
End If
presentRead = txtPresRead.Text
prevRead = txtPrevRead.Text
lblConsumpt.Visible = True
lblTotalAmount.Visible = True
Label5.Visible = True
txtPresRead.Clear()
txtPrevRead.Clear()
lblConsumpt.Visible = False
lblTotalAmount.Visible = False
Label5.Visible = False
Else
lblConsumpt.Text = consumption
consumption = consumption - 40
total = 172.5 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
total = 172.5 + (37.8 * consumption)
Else
End If
consumption = consumption - 40
total = 552.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
lblTotalAmount.Text = 552.0 + 10 - (562 * 0.1)
End If
consumption = consumption - 40
total = 1104.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
ElseIf ComboBox2.Text = "1 1/2" Then
consumption = consumption - 40
total = 2760.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
total = 6900.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
consumption = consumption - 40
total = 12420.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
lblTotalAmount.Text = total + 10 - (total * 0.1)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
consumption = consumption - 40
total = 24840.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
consumption = consumption - 20
consumption = consumption - 10
Else
End If
End If
End If
End If
presentRead = txtPresRead.Text
prevRead = txtPrevRead.Text
lblConsumpt.Visible = True
lblTotalAmount.Visible = True
Label5.Visible = True
txtPresRead.Clear()
txtPrevRead.Clear()
lblConsumpt.Visible = False
lblTotalAmount.Visible = False
Label5.Visible = False
Else
lblConsumpt.Text = consumption
consumption = consumption - 40
total = 172.5 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
consumption = consumption - 40
total = 276.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
consumption = consumption - 40
total = 552.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
consumption = consumption - 40
total = 1380.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
consumption = consumption - 30
consumption = consumption - 20
total = 1380.0 + (21.4 * consumption) + (18.9 * 10)
consumption = consumption - 10
Else
End If
consumption = consumption - 40
total = 3450.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
consumption = consumption - 30
consumption = consumption - 20
Else
End If
consumption = consumption - 40
total = 6210.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
End If
consumption = consumption - 40
total = 12420.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
End If
presentRead = txtPresRead.Text
prevRead = txtPrevRead.Text
lblConsumpt.Visible = True
lblTotalAmount.Visible = True
Label5.Visible = True
txtPresRead.Clear()
txtPrevRead.Clear()
lblConsumpt.Visible = False
lblTotalAmount.Visible = False
Label5.Visible = True
Else
consumption = consumption - 40
total = 172.5 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
ElseIf ComboBox2.Text = "3/4" Then
consumption = consumption - 40
total = 552.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
total = 1104.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
consumption = consumption - 40
total = 2760.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
consumption = consumption - 40
total = 6900.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
consumption = consumption - 40
total = 12420.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
consumption = consumption - 30
consumption = consumption - 10
Else
End If
consumption = consumption - 40
total = 24840.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
consumption = consumption - 30
consumption = consumption - 20
consumption = consumption - 10
Else
End If
End If
End If
End If
Else
presentRead = txtPresRead.Text
prevRead = txtPrevRead.Text
lblConsumpt.Visible = True
lblTotalAmount.Visible = True
Label5.Visible = True
If prevRead > presentRead Then
txtPresRead.Clear()
txtPrevRead.Clear()
lblConsumpt.Visible = False
lblTotalAmount.Visible = False
Label5.Visible = False
Else
lblConsumpt.Text = consumption
consumption = consumption - 40
total = 172.5 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
lblTotalAmount.Text = total + 10
consumption = consumption - 30
consumption = consumption - 20
lblTotalAmount.Text = total + 10
consumption = consumption - 10
lblTotalAmount.Text = total + 10
Else
lblTotalAmount.Text = 172.5 + 10
End If
consumption = consumption - 40
total = 276.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
lblTotalAmount.Text = total + 10
consumption = consumption - 30
lblTotalAmount.Text = total + 10
lblTotalAmount.Text = total + 10
consumption = consumption - 10
lblTotalAmount.Text = total + 10
Else
lblTotalAmount.Text = 276.0 + 10
End If
consumption = consumption - 40
total = 552.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
lblTotalAmount.Text = total + 10
consumption = consumption - 30
lblTotalAmount.Text = total + 10
consumption = consumption - 20
lblTotalAmount.Text = total + 10
ElseIf consumption > 10 And consumption <= 20 Then
consumption = consumption - 10
lblTotalAmount.Text = total + 10
Else
lblTotalAmount.Text = 552.0 + 10
End If
consumption = consumption - 40
total = 1380.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
lblTotalAmount.Text = total + 10
consumption = consumption - 30
lblTotalAmount.Text = total + 10
consumption = consumption - 20
lblTotalAmount.Text = total + 10
consumption = consumption - 10
Else
lblTotalAmount.Text = 1380.0 + 10
End If
consumption = consumption - 40
total = 3450.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
lblTotalAmount.Text = total + 10
consumption = consumption - 30
lblTotalAmount.Text = total + 10
consumption = consumption - 20
lblTotalAmount.Text = total + 10
consumption = consumption - 10
lblTotalAmount.Text = total + 10
Else
lblTotalAmount.Text = 3450.0 + 10
End If
consumption = consumption - 40
total = 6210.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
lblTotalAmount.Text = total + 10
consumption = consumption - 30
lblTotalAmount.Text = total + 10
consumption = consumption - 20
lblTotalAmount.Text = total + 10
consumption = consumption - 10
lblTotalAmount.Text = total + 10
Else
lblTotalAmount.Text = 6210.0 + 10
End If
ElseIf ComboBox2.Text = "4" Then
consumption = consumption - 40
total = 12420.0 + (consumption * 28.8) + (24.65 * 10) + (21.4 * 10) + (18.9 * 10)
lblTotalAmount.Text = total + 10
consumption = consumption - 30
lblTotalAmount.Text = total + 10
consumption = consumption - 20
lblTotalAmount.Text = total + 10
consumption = consumption - 10
lblTotalAmount.Text = total + 10
Else
lblTotalAmount.Text = 12420.0 + 10
End If
End If
End If
ElseIf ComboBox1.Text = "Commercial/Industrial" Then
presentRead = txtPresRead.Text
prevRead = txtPrevRead.Text
lblConsumpt.Visible = True
lblTotalAmount.Visible = True
Label5.Visible = True
txtPresRead.Clear()
txtPrevRead.Clear()
lblConsumpt.Visible = False
lblTotalAmount.Visible = False
Label5.Visible = False
Else
lblTotalAmount.Text = consumption
total = 172.5 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
lblTotalAmount.Text = total + 10
consumption = consumption - 30
lblTotalAmount.Text = total + 10
consumption = consumption - 20
lblTotalAmount.Text = total + 10
consumption = consumption - 10
lblTotalAmount.Text = total + 10
Else
lblTotalAmount.Text = 345.0 + 10
End If
consumption = consumption - 40
total = 552.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
lblTotalAmount.Text = total + 10
ElseIf consumption > 30 And consumption <= 40 Then
consumption = consumption - 30
lblTotalAmount.Text = total + 10
consumption = consumption - 20
lblTotalAmount.Text = total + 10
consumption = consumption - 10
lblTotalAmount.Text = total + 10
Else
lblTotalAmount.Text = 552.0 + 10
End If
consumption = consumption - 40
total = 1104.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
lblTotalAmount.Text = total + 10
consumption = consumption - 30
consumption = consumption - 20
lblTotalAmount.Text = total + 10
consumption = consumption - 10
lblTotalAmount.Text = total + 10
Else
lblTotalAmount.Text = 1104.0 + 10
End If
consumption = consumption - 40
total = 2760.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
lblTotalAmount.Text = total + 10
consumption = consumption - 30
lblTotalAmount.Text = total + 10
consumption = consumption - 20
total = 2760.0 + (42.8 * consumption) + (37.8 * 10)
lblTotalAmount.Text = total + 10
consumption = consumption - 10
lblTotalAmount.Text = total + 10
Else
lblTotalAmount.Text = 2760.0 + 10
End If
consumption = consumption - 40
total = 6900.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
lblTotalAmount.Text = total + 10
consumption = consumption - 30
lblTotalAmount.Text = total + 10
consumption = consumption - 20
lblTotalAmount.Text = total + 10
lblTotalAmount.Text = total + 10
Else
lblTotalAmount.Text = 6900.0 + 10
End If
consumption = consumption - 40
total = 12420.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
lblTotalAmount.Text = total + 10
consumption = consumption - 30
lblTotalAmount.Text = total + 10
consumption = consumption - 20
lblTotalAmount.Text = total + 10
consumption = consumption - 10
Else
lblTotalAmount.Text = 12420.0 + 10
End If
consumption = consumption - 40
total = 24840.0 + (consumption * 57.6) + (49.3 * 10) + (42.8 * 10) + (37.8 * 10)
lblTotalAmount.Text = total + 10
consumption = consumption - 30
lblTotalAmount.Text = total + 10
consumption = consumption - 20
lblTotalAmount.Text = total + 10
consumption = consumption - 10
lblTotalAmount.Text = total + 10
Else
lblTotalAmount.Text = 24840.0 + 10
End If
End If
End If
End If
End If
End Sub
ComboBox1.Text = ""
ComboBox2.Text = ""
txtPresRead.Text = ""
txtPrevRead.Text = ""
lblConsumpt.Text = ""
lblTotalAmount.Text = ""
Label5.Text = ""
End Sub
Me.Close()
End Sub
End Class