private void UpdateMarkTypes() { var markTypes = mtRepo.all(); markTypeGrid.DataSource = markTypes; FormatMarkTypeGrid(); }
private void MarkList_Load(object sender, EventArgs e) { IntPtr pIcon = Resources.five.GetHicon(); Icon = Icon.FromHandle(pIcon); LoadStudentList(); var mTypes = mtypeRepo.all(); CurrentMarkType.DisplayMember = "name"; CurrentMarkType.ValueMember = "id"; CurrentMarkType.DataSource = mTypes; var teachers = tRepo.all(); var teachersView = TeacherView.TeachersToView(teachers).OrderBy(tv => tv.fio).ToList(); MarkTeacherList.DisplayMember = "fio"; MarkTeacherList.ValueMember = "id"; MarkTeacherList.DataSource = teachersView; }