using AcademicProgressBusinessLogic.BindingModels; using AcademicProgressBusinessLogic.BusinessLogics; using AcademicProgressBusinessLogic.ViewModels; using DesktopTools.Controls; using ModuleTools.Enums; using DesktopTools.Interfaces; using DesktopTools.Models; using System; using System.Collections.Generic; using DesktopTools.Enums; using System.Windows.Forms; namespace AcademicProgressWindowsDesktop.EntityControls.StudentAcademicProgress { /// /// Реализация контрола для списка успеваемости студентов /// public partial class ControlStudentAcademicProgressList : GenericControlEntityList, IGenericControlEntityList { public ControlStudentAcademicProgressList() { InitializeComponent(); Title = "Учет успеваемости студентов"; ControlId = new Guid("9879dbb5-3b29-4971-9574-b4c13d5470c6"); AccessOperation = AccessOperation.Учет_успеваемости; ControlViewEntityElement = new ControlStudentAcademicProgressElement(); _genericControlViewEntityList = this; } public IControl GetInstanceGenericControl() => new ControlStudentAcademicProgressList() { ControlId = Guid.NewGuid() }; public ControlViewEntityListConfiguration GetConfigControl() => new() { PaginationOn = false, HideToolStripButton = new List { ToolStripButtonListNames.toolStripButtonSearch }, ControlOnMoveElem = new Dictionary { { "ToolStripMenuItemLoadScore", ("Выгрузить оценки из 1С:Университет", (object sender, EventArgs e) => { LoadScore(); }) } } }; private void LoadScore() { MessageBox.Show("Оценки успешно выгружены!", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }