2022-03-18 21:34:16 +04:00
|
|
|
|
using CoreModels.Enums.Department;
|
|
|
|
|
using CoreModels.ModelsDepartment;
|
2021-04-03 13:41:19 +04:00
|
|
|
|
using System;
|
2022-03-20 10:10:44 +04:00
|
|
|
|
using ToolsModule.ManagmentEntity;
|
|
|
|
|
using ToolsModule.ManagmentMapping;
|
2021-04-03 13:41:19 +04:00
|
|
|
|
|
2022-03-19 22:48:13 +04:00
|
|
|
|
namespace DepartmentContract.ViewModels
|
2021-04-03 13:41:19 +04:00
|
|
|
|
{
|
2022-03-18 21:34:16 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Список аудиторий
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class ClassroomListViewModel : ListViewModel<ClassroomViewModel> { }
|
2021-04-03 13:41:19 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2021-04-05 14:20:07 +04:00
|
|
|
|
/// Элемент аудитории
|
2021-04-03 13:41:19 +04:00
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewModelControlElementClass()]
|
2022-03-18 21:34:16 +04:00
|
|
|
|
public class ClassroomViewModel : ElementViewModel, IClassroomModel
|
2021-04-03 13:41:19 +04:00
|
|
|
|
{
|
2021-04-03 13:50:58 +04:00
|
|
|
|
[ViewModelControlListProperty("Номер", ColumnWidth = 80)]
|
2021-04-03 13:41:19 +04:00
|
|
|
|
[ViewModelControlElementProperty("Номер аудитории", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
public string Number { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Название")]
|
|
|
|
|
[ViewModelControlElementProperty("Название", ControlType.ControlString)]
|
|
|
|
|
public string Title { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Сотрудник", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlEmployeeList, DepartmentWindowsDesktop")]
|
|
|
|
|
public Guid EmployeeId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Сотрудник")]
|
2022-03-20 19:27:50 +04:00
|
|
|
|
[MapConfiguration("Employee.LastName")]
|
2021-04-03 13:41:19 +04:00
|
|
|
|
public string EmployeeName { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Тип", ControlType.ControlEnum, MustHaveValue = true)]
|
|
|
|
|
public ClassroomType ClassroomType { get; set; }
|
|
|
|
|
|
2021-04-03 13:50:58 +04:00
|
|
|
|
[ViewModelControlListProperty("Тип", ColumnWidth = 120)]
|
2021-04-03 13:41:19 +04:00
|
|
|
|
public string ClassroomTypeTitle => ClassroomType.ToString("G");
|
|
|
|
|
|
2021-04-03 13:50:58 +04:00
|
|
|
|
[ViewModelControlListProperty("Площадь", ColumnWidth = 90)]
|
2021-04-03 13:41:19 +04:00
|
|
|
|
[ViewModelControlElementProperty("Площадь", ControlType.ControlDecimal, MustHaveValue = true)]
|
|
|
|
|
public decimal Square { get; set; }
|
|
|
|
|
|
2021-04-03 13:50:58 +04:00
|
|
|
|
[ViewModelControlListProperty("Кол-во мест", ColumnWidth = 100)]
|
2021-04-03 13:41:19 +04:00
|
|
|
|
[ViewModelControlElementProperty("Кол-во мест", ControlType.ControlInt, MustHaveValue = true)]
|
|
|
|
|
public int Capacity { get; set; }
|
|
|
|
|
|
2021-04-03 14:27:30 +04:00
|
|
|
|
[ViewModelControlListProperty("Код безоп.", ColumnWidth = 100)]
|
2021-04-03 13:41:19 +04:00
|
|
|
|
[ViewModelControlElementProperty("Код безоп.", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
public string SecurityCode { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Есть проектор", ControlType.ControlBool, MustHaveValue = true)]
|
|
|
|
|
public bool HaveProjector { get; set; }
|
|
|
|
|
|
2021-04-03 14:27:30 +04:00
|
|
|
|
[ViewModelControlListProperty("Есть проектор", ColumnWidth = 80)]
|
|
|
|
|
public string IsHaveProjector => HaveProjector ? "Да" : "Нет";
|
|
|
|
|
|
2021-04-03 13:41:19 +04:00
|
|
|
|
[ViewModelControlElementProperty("Описание", ControlType.ControlText)]
|
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Фото", ControlType.ControlImage, Width = 200, Height = 200)]
|
|
|
|
|
public byte[] Photo { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|