Untitled

 avatar
unknown
plain_text
2 years ago
1.4 kB
4
Indexable
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
Editor is loading...