2021-04-03 11:41:02 +04:00
|
|
|
|
using DepartmentWindowsDesktop.EntityControls;
|
2022-03-19 23:06:06 +04:00
|
|
|
|
using System.Collections.Generic;
|
2022-03-18 22:48:14 +04:00
|
|
|
|
using ToolsDesktop.Interfaces;
|
|
|
|
|
using ToolsDesktop.Models;
|
2022-03-20 10:10:44 +04:00
|
|
|
|
using ToolsModule.ManagmentDependency;
|
|
|
|
|
using ToolsModule.ManagmentSecurity;
|
2021-04-03 11:41:02 +04:00
|
|
|
|
|
|
|
|
|
namespace DepartmentWindowsDesktop
|
|
|
|
|
{
|
2022-03-19 23:06:06 +04:00
|
|
|
|
public class DepartmentWindowDesktopExtension : IWindowDesktopExtension
|
2021-04-03 11:41:02 +04:00
|
|
|
|
{
|
|
|
|
|
public List<WindowDesktopExtensionControlModel> GetListControlEntityList()
|
|
|
|
|
{
|
|
|
|
|
var manager = DependencyManager.Instance.Resolve<ISecurityManager>();
|
|
|
|
|
if (manager == null)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!manager.CheckAccess(new SecurityManagerCheckAccessModel(new AccessBindingModel { UserIdForAccess = manager.User },
|
|
|
|
|
AccessOperation.Кафедра, AccessType.View, "Кафедра")))
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var list = new List<WindowDesktopExtensionControlModel>
|
|
|
|
|
{
|
|
|
|
|
new WindowDesktopExtensionControlModel { Title = "Кафедра" }
|
|
|
|
|
};
|
|
|
|
|
List<IControl> _controls = new()
|
|
|
|
|
{
|
2021-04-05 12:25:10 +04:00
|
|
|
|
new ControlPostList(),
|
2021-04-03 13:41:19 +04:00
|
|
|
|
new ControlEmployeeList(),
|
2021-04-03 19:03:56 +04:00
|
|
|
|
new ControlClassroomList(),
|
|
|
|
|
new ControlDisciplineBlockList(),
|
2021-04-04 10:18:45 +04:00
|
|
|
|
new ControlDisciplineList(),
|
|
|
|
|
new ControlLecturerAcademicDegreeList(),
|
|
|
|
|
new ControlLecturerAcademicRankList(),
|
2021-04-05 14:20:07 +04:00
|
|
|
|
new ControlLecturerList(),
|
2021-04-06 22:07:11 +04:00
|
|
|
|
new ControlEducationDirectionList(),
|
|
|
|
|
new ControlTimeNormList(),
|
2021-04-12 10:01:42 +04:00
|
|
|
|
new ControlAcademicPlanList(),
|
2021-04-12 16:57:29 +04:00
|
|
|
|
new ControlStudentGroupList(),
|
2021-04-13 12:52:45 +04:00
|
|
|
|
new ControlStudentList(),
|
2021-04-27 15:14:35 +04:00
|
|
|
|
new ControlOrderList(),
|
2022-03-27 14:51:27 +04:00
|
|
|
|
new ControlOrderSyncHistoryList(),
|
|
|
|
|
new ControlBasicDepartmentList()
|
2021-04-03 11:41:02 +04:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
foreach (var cntrl in _controls)
|
|
|
|
|
{
|
|
|
|
|
if (manager.CheckAccess(new SecurityManagerCheckAccessModel(new AccessBindingModel { UserIdForAccess = manager.User },
|
|
|
|
|
cntrl.AccessOperation, AccessType.View, cntrl.Title)))
|
|
|
|
|
{
|
|
|
|
|
list.Add(new WindowDesktopExtensionControlModel
|
|
|
|
|
{
|
|
|
|
|
Id = cntrl.ControlId,
|
|
|
|
|
Title = cntrl.Title,
|
|
|
|
|
Control = cntrl
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<WindowDesktopExtensionControlModel> GetListControlSpecialList()
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|