private void btnPrint_Click(object sender, EventArgs e) { calculate.Visible = false; IRegistrationService registrationService = new RegistrationService(); ILogService logService = new LogService(); var assessments = registrationService.AssessMe(StudentAssessed); if (assessments.Count > 0) { string json = JsonConvert.SerializeObject(StudentAssessed); Log log = new Log { CLUD = "C", LogDate = DateTime.Now, TableName = "StudentAssessment", UserId = GlobalClass.user.UserId, UserName = GlobalClass.user.UserName, PassedData = json }; logService.AddLogs(log); PrintPane(); if (listStudentAssessed.Count <= 0) registrationService.UpdateStudentBalance(StudentAssessed.StudentSY, StudentAssessed.StudentId, float.Parse(Total.Text)); calculate.Visible = true; labelVisibility(false); TuitionDet.Visible = true; } }