private void btnLock_Click(object sender, EventArgs e)
        {
            foreach (StudentTrait ss in classList)
            {
                if (ss.FirstPeriodicRating > 0 && ss.FirstEntered.HasValue && ss.LockFirst == false && !ss.FirstLocked.HasValue)
                {
                    ss.FirstLocked = DateTime.Now;
                    ss.LockFirst = true;
                }
                if (ss.SecondPeriodicRating > 0 && ss.SecondEntered.HasValue && ss.LockSecond == false && !ss.SecondLocked.HasValue)
                {
                    ss.SecondLocked = DateTime.Now;
                    ss.LockSecond = true;
                }
                if (ss.ThirdPeriodicRating > 0 && ss.ThirdEntered.HasValue && ss.LockThird == false && !ss.ThirdLocked.HasValue)
                {
                    ss.ThirdLocked = DateTime.Now;
                    ss.LockThird = true;
                }
                if (ss.FourthPeriodicRating > 0 && ss.FourthEntered.HasValue && ss.LockFourth == false && !ss.FourthLocked.HasValue)
                {
                    ss.FourthLocked = DateTime.Now;
                    ss.LockFourth = true;
                }
            }
            IGradingService gradingService = new GradingService();
            if (gradingService.SaveTraitsGrade(classList))
            {
                foreach (StudentTrait ss in classList)
                    Log("U", "StudentSubjects", ss);


                MessageBox.Show("Grades Locked Successfully");
                this.Close();
            }
            else
            {
                MessageBox.Show("Failed Locking Grades");

            }
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            IGradingService gradingService = new GradingService();
            if (gradingService.SaveTraitsGrade(classList))
            {
                foreach (StudentTrait ss in classList)
                    Log("U", "StudentTraits", ss);

                MessageBox.Show("Grades Saved Successfully");
                this.Close();

            }
            else
            {
                MessageBox.Show("Failed Saving Grades");

            }
        }