62 lines
3.2 KiB
C#
62 lines
3.2 KiB
C#
using CoreModels.Enums.Department;
|
|
using CoreModels.ModelsDepartment;
|
|
using System;
|
|
using ToolsModule.ManagmentEntity;
|
|
using ToolsModule.ManagmentMapping;
|
|
|
|
namespace DepartmentContract.ViewModels
|
|
{
|
|
/// <summary>
|
|
/// Список оценок студентов за дисциплины
|
|
/// </summary>
|
|
public class StudentMarkPassedDisciplineListViewModel : ListViewModel<StudentMarkPassedDisciplineViewModel> { }
|
|
|
|
/// <summary>
|
|
/// Элемент оценка студента за дисциплину
|
|
/// </summary>
|
|
[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 = false, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlStudentList, DepartmentWindowsDesktop")]
|
|
public Guid DisciplineId { 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 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 ? "Да" : "Нет";
|
|
}
|
|
} |