DepartmentProject/DepartmentPortal/Department/DepartmentContract/ViewModels/StudentMarkPassedDisciplineViewModels.cs

75 lines
4.1 KiB
C#
Raw Normal View History

2022-12-21 09:32:44 +04:00
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 = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlStudentList, DepartmentWindowsDesktop")]
2022-12-21 09:32:44 +04:00
public Guid DisciplineId { get; set; }
[ViewModelControlElementProperty("Преподаватель", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerList, DepartmentWindowsDesktop")]
public Guid? LecturerId { get; set; }
2022-12-21 09:32:44 +04:00
[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");
2022-12-21 09:32:44 +04:00
[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; }
2022-12-21 09:32:44 +04:00
}
}