public Grades()
        {
            InitializeComponent();

            _lessonRecordService     = InstanceFactory.GetInstance <ILessonRecordService>();
            _departmentRecordService = InstanceFactory.GetInstance <IDepartmentRecordService>();
            _studentService          = InstanceFactory.GetInstance <IStudentService>();
            _departmentService       = InstanceFactory.GetInstance <IDepartmentService>();
        }
예제 #2
0
        public LessonRecords(string departmentCode, string lessonCode)
        {
            InitializeComponent();

            _departmentRecordService = InstanceFactory.GetInstance <IDepartmentRecordService>();
            _lessonRecordService     = InstanceFactory.GetInstance <ILessonRecordService>();

            _lessonCode     = lessonCode;
            _departmentCode = departmentCode;


            _studentNoList = _departmentRecordService.GetAll().Where(p => p.DepartmentCode.Equals(departmentCode)).Select(p => p.StudentNo).ToList();

            ((ListBox)(checkStudentNoList)).DataSource = _studentNoList;


            for (int i = 0; i < checkStudentNoList.Items.Count; i++)
            {
                bool isThere = _lessonRecordService.GetAll().Any(p => p.StudentNo.Equals(checkStudentNoList.Items[i].ToString()) && p.LessonCode.Equals(lessonCode));
                checkStudentNoList.SetItemChecked(i, isThere);
            }
        }
 public StudentManager(IStudentDal studentDal)
 {
     _studentDal = studentDal;
     _departmentRecordService = InstanceFactory.GetInstance <IDepartmentRecordService>();
     _lessonRecordService     = InstanceFactory.GetInstance <ILessonRecordService>();
 }