Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.4 kB
2
Indexable
Never
Public Class Form1
    Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
        Const yearlyLicense As Double = 5000
        Const oneTimePurchase As Double = 20000
        Const techSupport As Double = 3500
        Const onsiteTraining As Double = 2000
        Const cloudBackup As Double = 300

        Dim licensingCost As Double = 0
        Dim optionalFeaturesCost As Double = 0

        If radYearlyLicense.Checked Then
            licensingCost = yearlyLicense
        ElseIf radOneTimePurchase.Checked Then
            licensingCost = oneTimePurchase
        End If

        If chkTechSupport.Checked Then
            optionalFeaturesCost += techSupport
        End If

        If chkOnsiteTraining.Checked Then
            optionalFeaturesCost += onsiteTraining
        End If

        If chkCloudBackup.Checked Then
            optionalFeaturesCost += cloudBackup
        End If

        lblLicensingCost.Text = "Cost of software licensing: " & licensingCost.ToString("C")
        lblOptionalFeaturesCost.Text = "Cost of optional features: " & optionalFeaturesCost.ToString("C")
    End Sub

    Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click
        radYearlyLicense.Checked = False
        radOneTimePurchase.Checked = False
        chkTechSupport.Checked = False
        chkOnsite