Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim weeklySales As Double = TextBox1.Text
Dim expYrs As Integer = TextBox2.Text
Dim comRate As Double
Dim comAmount As Double
'This is about sales commission. If weeklySales >= 100000 Then If expYrs > 5 Then comRate = 0.06 comAmount = (weeklySales) * (comRate) Label6.Text = 6 Label7.Text = comAmount Label7.Text = FormatCurrency(comAmount) End If ElseIf weeklySales >= 100000 Then If expYrs <= 5 Then comRate = 0.04 comAmount = (weeklySales) * (comRate) Label6.Text = 4 Label7.Text = comAmount Label7.Text = FormatCurrency(comAmount) End If ElseIf weeklySales < 100000 Then If expYrs > 5 Then comRate = 0.05 comAmount = (weeklySales) * (comRate) Label6.Text = 5 Label7.Text = comAmount Label7.Text = FormatCurrency(comAmount) End If ElseIf weeklySales < 100000 Then If expYrs <= 5 Then comRate = 0.03 comAmount = (weeklySales) * (comRate) Label6.Text = 3 Label7.Text = comAmount Label7.Text = FormatCurrency(comAmount) End If End If
End Sub
Aucun commentaire:
Enregistrer un commentaire