using CoreModels.Enums.Department; using CoreModels.ModelsDepartment; using System; using ToolsModule.ManagmentEntity; using ToolsModule.ManagmentMapping; namespace DepartmentContract.ViewModels { /// /// Список оценок студентов за дисциплины /// public class StudentMarkPassedDisciplineListViewModel : ListViewModel { } /// /// Элемент оценка студента за дисциплину /// [ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)] public class StudentMarkPassedDisciplineViewModel : ElementViewModel, IStudentMarkPassedDisciplineModel { [ViewModelControlElementProperty("Студент", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlStudentList, SecurityWindowsDesktop")] public Guid StudentId { get; set; } [ViewModelControlElementProperty("Дисциплина", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlStudentList, DepartmentWindowsDesktop")] public Guid DisciplineId { get; set; } [ViewModelControlElementProperty("Преподаватель", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerList, DepartmentWindowsDesktop")] public Guid? LecturerId { get; set; } [ViewModelControlListProperty("Студент", ColumnWidth = 120)] [MapConfiguration("Student.ToString")] public string Student { get; set; } [ViewModelControlListProperty("Дисциплина", ColumnWidth = 120)] [MapConfiguration("Discipline.ToString")] public string Discipline { get; set; } [ViewModelControlElementProperty("Семестр", ControlType.ControlEnum, MustHaveValue = true)] public Semester Semester { get; set; } [ViewModelControlListProperty("Семестр", ColumnWidth = 120)] public string SemesterTitle => Semester.ToString("G"); [ViewModelControlElementProperty("Тип отчетности", ControlType.ControlEnum, MustHaveValue = true)] public DisciplineReportingType DisciplineReportingType { get; set; } [ViewModelControlListProperty("Тип отчетности", ColumnWidth = 120)] public string DisciplineReportingTypeTitle => DisciplineReportingType.ToString("G"); [ViewModelControlElementProperty("Оценка", ControlType.ControlEnum, MustHaveValue = true)] public MarkDisciplinePassedType Mark { get; set; } [ViewModelControlListProperty("Оценка", ColumnWidth = 120)] public string MarkTitle => Mark.ToString("G"); [ViewModelControlListProperty("Дата сдачи", ColumnWidth = 120, DefaultCellStyleFormat = "dd.MM.yyyy")] [ViewModelControlElementProperty("Дата сдачи", ControlType.ControlDateTime, MustHaveValue = true)] public DateTime DateAffixing { get; set; } [ViewModelControlElementProperty("Повышение оценки", ControlType.ControlBool, MustHaveValue = true)] public bool IsIncreaseMark { get; set; } [ViewModelControlListProperty("Повышение оценки", ColumnWidth = 100)] public string IsIncreaseMarkValue => IsIncreaseMark ? "Да" : "Нет"; [ViewModelControlElementProperty("По направлению", ControlType.ControlBool, MustHaveValue = true)] public bool IsDirection { get; set; } [ViewModelControlListProperty("По направлению", ColumnWidth = 100)] public string IsDirectionValue => IsDirection ? "Да" : "Нет"; [ViewModelControlListProperty("Доп. информация", ColumnWidth = 120)] [ViewModelControlElementProperty("Доп. информация", ControlType.ControlText, MustHaveValue = false)] public string AddiionalInfo { get; set; } } }