2021-04-12 10:01:42 +04:00
|
|
|
|
using ModuleTools.Attributes;
|
|
|
|
|
using ModuleTools.Enums;
|
|
|
|
|
using ModuleTools.ViewModels;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace DepartmentBusinessLogic.ViewModels
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2021-04-12 16:57:29 +04:00
|
|
|
|
/// Список учебных групп
|
2021-04-12 10:01:42 +04:00
|
|
|
|
/// </summary>
|
|
|
|
|
public class StudentGroupListViewModel : ListViewModel<StudentGroupViewModel> { }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2021-04-12 16:57:29 +04:00
|
|
|
|
/// Элемент учебная группа
|
2021-04-12 10:01:42 +04:00
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
|
2021-04-12 16:57:29 +04:00
|
|
|
|
[ViewModelControlElementDependenceEntity(Title = "Студенты", Order = 1, ParentPropertyName = "StudentGroupId",
|
|
|
|
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlStudentList, DepartmentWindowsDesktop")]
|
2021-04-13 12:52:45 +04:00
|
|
|
|
[ViewModelControlElementDependenceEntity(Title = "Приказы", Order = 1, ParentPropertyName = "StudentGroupId",
|
|
|
|
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlOrderStudentRecordList, DepartmentWindowsDesktop")]
|
2021-04-12 10:01:42 +04:00
|
|
|
|
public class StudentGroupViewModel : ElementViewModel
|
|
|
|
|
{
|
|
|
|
|
[ViewModelControlElementProperty("Учебный план", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlAcademicPlanList, DepartmentWindowsDesktop")]
|
|
|
|
|
[MapConfiguration("AcademicPlanId")]
|
|
|
|
|
public Guid AcademicPlanId { get; set; }
|
|
|
|
|
|
2021-04-12 16:57:29 +04:00
|
|
|
|
[ViewModelControlListProperty("Шифр", ColumnWidth = 80)]
|
2021-04-12 10:01:42 +04:00
|
|
|
|
[MapConfiguration("AcademicPlan.EducationDirection.Cipher", IsDifficle = true)]
|
|
|
|
|
public string AcademicPlanEducationDirectionCipher { get; set; }
|
|
|
|
|
|
2021-04-12 16:57:29 +04:00
|
|
|
|
[ViewModelControlListProperty("Профиль")]
|
|
|
|
|
[MapConfiguration("AcademicPlan.EducationDirection.Profile", IsDifficle = true)]
|
|
|
|
|
public string AcademicPlanEducationDirectionProfile { get; set; }
|
|
|
|
|
|
2021-04-12 10:01:42 +04:00
|
|
|
|
[MapConfiguration("AcademicPlan.EducationDirection.ShortName", IsDifficle = true)]
|
|
|
|
|
public string AcademicPlanEducationDirectionShortName { get; set; }
|
|
|
|
|
|
2021-04-12 16:57:29 +04:00
|
|
|
|
[ViewModelControlListProperty("Группа")]
|
|
|
|
|
public string GroupName => $"{AcademicPlanEducationDirectionShortName}({EnrollmentYear})-{GroupNumber}";
|
|
|
|
|
|
2021-04-12 10:01:42 +04:00
|
|
|
|
[ViewModelControlListProperty("Номер группы")]
|
|
|
|
|
[ViewModelControlElementProperty("Номер группы", ControlType.ControlInt, MustHaveValue = true, MinValue = 1, MaxValue = 4)]
|
|
|
|
|
[MapConfiguration("GroupNumber")]
|
|
|
|
|
public int GroupNumber { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Год зачисления")]
|
|
|
|
|
[ViewModelControlElementProperty("Год зачисления", ControlType.ControlInt, MustHaveValue = true)]
|
|
|
|
|
[MapConfiguration("EnrollmentYear")]
|
|
|
|
|
public int EnrollmentYear { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Куратор", ControlType.ControlGuid, MustHaveValue = false, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerList, DepartmentWindowsDesktop")]
|
|
|
|
|
[MapConfiguration("LecturerId")]
|
|
|
|
|
public Guid? CuratorId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Куратор")]
|
2021-04-13 12:52:45 +04:00
|
|
|
|
[MapConfiguration("Lecturer.ToString", IsDifficle = true)]
|
|
|
|
|
public string Lecturer { get; set; }
|
2021-04-12 10:01:42 +04:00
|
|
|
|
}
|
|
|
|
|
}
|