The document contains code for two systems - a library processing system that calculates late return penalties and a marksheet processing system that calculates grades based on subject scores. The code handles user input, date calculations, and conditional logic for determining penalties, totals, percentages, results and grades.
The document contains code for two systems - a library processing system that calculates late return penalties and a marksheet processing system that calculates grades based on subject scores. The code handles user input, date calculations, and conditional logic for determining penalties, totals, percentages, results and grades.
The document contains code for two systems - a library processing system that calculates late return penalties and a marksheet processing system that calculates grades based on subject scores. The code handles user input, date calculations, and conditional logic for determining penalties, totals, percentages, results and grades.
The document contains code for two systems - a library processing system that calculates late return penalties and a marksheet processing system that calculates grades based on subject scores. The code handles user input, date calculations, and conditional logic for determining penalties, totals, percentages, results and grades.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click Dim submission As DateTime = DateTimePicker3.Value Dim d1 As DateTime = DateTime.Parse(returndate.Text).Date Dim d2 As DateTime = DateTime.Parse(submission).Date Dim days As Single = (d2 - d1).TotalDays If days <= 0 Then txtpenalty.Text = 0 ElseIf days > 0 And days <= 10 Then txtpenalty.Text = 50 Else txtpenalty.Text = 100 End If End Sub
Private Sub DateTimePicker1_CloseUp(sender As Object, e As EventArgs)
Handles DateTimePicker1.CloseUp issuedate.Text = DateTimePicker1.Value.ToString("dd MMM yyyy") End Sub
Private Sub DateTimePicker3_CloseUp(sender As Object, e As EventArgs)
Handles DateTimePicker3.CloseUp submissiondate.Text = DateTimePicker3.Value.ToString("dd MMM yyyy") End Sub
Private Sub returndate_Click(sender As Object, e As EventArgs) Handles
returndate.Click returndate.Text = DateTimePicker1.Value.AddDays(10).ToString("dd MMM yyyy") End Sub End Class MARKSHEET PROCESSING SYSTEM
Public Class Form1
Private Sub total_GotFocus(sender As Object, e As EventArgs) Handles
Private Sub percentage_GotFocus(sender As Object, e As EventArgs) Handles
percentage.GotFocus percentage.Text = total.Text / 4 End Sub
Private Sub result_GotFocus(sender As Object, e As EventArgs) Handles
result.GotFocus If txtcn.Text >= 30 And txtgraphics.Text >= 30 And txtos.Text >= 30 And txtrdbms.Text >= 30 Then result.Text = "PASS" Else result.Text = "FAIL" End If End Sub
Private Sub clear_Click(sender As Object, e As EventArgs) Handles clear.Click
Private Sub grade_GotFocus(sender As Object, e As EventArgs) Handles
grade.GotFocus If percentage.Text >= 75 Then grade.Text = "I CLASS WITH DISTINCTION" ElseIf percentage.Text > 60 And percentage.Text < 75 Then grade.Text = "I CLASS " End If End Sub