2022-03-18 21:54:25 +04:00
|
|
|
|
using CoreModels.ModelsDepartment;
|
2021-04-03 22:04:11 +04:00
|
|
|
|
using System;
|
2022-03-20 10:10:44 +04:00
|
|
|
|
using ToolsModule.ManagmentEntity;
|
|
|
|
|
using ToolsModule.ManagmentMapping;
|
2021-04-03 22:04:11 +04:00
|
|
|
|
|
2022-03-19 22:48:13 +04:00
|
|
|
|
namespace DepartmentContract.ViewModels
|
2021-04-03 22:04:11 +04:00
|
|
|
|
{
|
2022-03-20 10:10:44 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Список преподавателей
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class LecturerListViewModel : ListViewModel<LecturerViewModel> { }
|
2021-04-03 22:04:11 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Элемент преподаватель
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 700)]
|
|
|
|
|
[ViewModelControlElementDependenceEntity(Title = "Должности", Order = 1, ParentPropertyName = "LecturerId",
|
2021-04-05 12:25:10 +04:00
|
|
|
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerPostList, DepartmentWindowsDesktop")]
|
2021-04-05 14:20:07 +04:00
|
|
|
|
[ViewModelControlElementDependenceEntity(Title = "Напрвления обучения", Order = 2, ParentPropertyName = "LecturerId",
|
|
|
|
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlEducationDirectionList, DepartmentWindowsDesktop")]
|
2021-04-12 10:01:42 +04:00
|
|
|
|
[ViewModelControlElementDependenceEntity(Title = "Кураторство групп", Order = 3, ParentPropertyName = "LecturerId",
|
|
|
|
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlStudentGroupList, DepartmentWindowsDesktop")]
|
2022-03-18 21:54:25 +04:00
|
|
|
|
public class LecturerViewModel : ElementViewModel, ILecturerModel
|
2021-04-03 22:04:11 +04:00
|
|
|
|
{
|
|
|
|
|
[ViewModelControlElementProperty("Пользователь", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlUserList, SecurityWindowsDesktop")]
|
|
|
|
|
public Guid UserId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Уч. степень", ControlType.ControlGuid, MustHaveValue = false, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerAcademicDegreeList, DepartmentWindowsDesktop")]
|
|
|
|
|
public Guid? LecturerAcademicDegreeId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Уч. степень")]
|
2022-03-20 19:27:50 +04:00
|
|
|
|
[MapConfiguration("LecturerAcademicDegree.LecturerAcademicDegreeName")]
|
2021-04-03 22:04:11 +04:00
|
|
|
|
public string LecturerAcademicDegree { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Уч. звание", ControlType.ControlGuid, MustHaveValue = false, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerAcademicRankList, DepartmentWindowsDesktop")]
|
|
|
|
|
public Guid? LecturerAcademicRankId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Уч. звание")]
|
2022-03-20 19:27:50 +04:00
|
|
|
|
[MapConfiguration("LecturerAcademicRank.LecturerAcademicRankName")]
|
2021-04-03 22:04:11 +04:00
|
|
|
|
public string LecturerAcademicRank { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Фамилия")]
|
|
|
|
|
[ViewModelControlElementProperty("Фамилия", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
public string LastName { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Имя")]
|
|
|
|
|
[ViewModelControlElementProperty("Имя", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
public string FirstName { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Отчество")]
|
|
|
|
|
[ViewModelControlElementProperty("Отчество", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
public string Patronymic { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Аббревиатура", ControlType.ControlString)]
|
|
|
|
|
public string Abbreviation { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Дата рожд.", ColumnWidth = 100, DefaultCellStyleFormat = "dd.MM.yyyy")]
|
|
|
|
|
[ViewModelControlElementProperty("Дата рожд.", ControlType.ControlDateTime, MustHaveValue = true)]
|
|
|
|
|
public DateTime DateBirth { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Адрес", ColumnWidth = 90)]
|
|
|
|
|
[ViewModelControlElementProperty("Адрес", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
public string Address { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Эл. почта", ColumnWidth = 90)]
|
|
|
|
|
[ViewModelControlElementProperty("Эл. почта", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
public string Email { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Моб. номер", ColumnWidth = 100)]
|
|
|
|
|
[ViewModelControlElementProperty("Моб. номер", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
public string MobileNumber { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Дом. номер", ColumnWidth = 100)]
|
|
|
|
|
[ViewModelControlElementProperty("Дом. номер", ControlType.ControlString)]
|
|
|
|
|
public string HomeNumber { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Описание", ControlType.ControlText)]
|
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Фото", ControlType.ControlImage, Width = 200, Height = 200)]
|
|
|
|
|
public byte[] Photo { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Для внутр. пользования", ControlType.ControlBool, MustHaveValue = true)]
|
|
|
|
|
public bool OnlyForPrivate { get; set; }
|
|
|
|
|
|
2021-04-05 12:25:10 +04:00
|
|
|
|
[ViewModelControlListProperty("Гр. эл.без.", ColumnWidth = 90)]
|
|
|
|
|
[ViewModelControlElementProperty("Группа эл.безоп", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
public string GroupElectricalSafety { get; set; }
|
2021-04-03 22:04:11 +04:00
|
|
|
|
}
|
|
|
|
|
}
|