Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. Private Sub btn_exit_Click(sender As Object, e As EventArgs) Handles btn_exit.Click
  2. Me.Close()
  3. End Sub
  4.  
  5. Private Sub btn_clear_Click(sender As Object, e As EventArgs) Handles btn_clear.Click
  6. txt_avg.Clear()
  7. txt_begin.Clear()
  8. txt_end.Clear()
  9. txt_sold.Clear()
  10. txt_turn.Clear()
  11.  
  12. End Sub
  13.  
  14. Private Sub txt_sold_TextChanged(sender As Object, e As EventArgs) Handles txt_sold.TextChanged
  15.  
  16. End Sub
  17.  
  18. Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  19.  
  20. End Sub
  21.  
  22. Private Sub btn_calculate_Click(sender As Object, e As EventArgs) Handles btn_calculate.Click
  23. Dim begin_Inventory As Decimal = Decimal.Parse(txt_begin.Text)
  24. Dim end_Inventory As Decimal = Decimal.Parse(txt_end.Text)
  25. Dim cost As Decimal = Decimal.Parse(txt_sold.Text)
  26.  
  27. Dim avg As Decimal = (end_Inventory + begin_Inventory) / 2
  28. Dim turnover As Decimal = cost / avg
  29.  
  30. txt_avg.Text = avg.ToString("C")
  31. txt_turn.Text = txt_turn.ToString
  32.  
  33. End Sub
  34. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement