2022-03-19 22:48:13 +04:00
|
|
|
|
using DepartmentContract.BindingModels;
|
|
|
|
|
using DepartmentContract.Logics.IGenericEntityLogic;
|
|
|
|
|
using DepartmentContract.Services.IGenericEntityService;
|
|
|
|
|
using DepartmentContract.ViewModels;
|
2022-03-18 22:38:52 +04:00
|
|
|
|
using ToolsModule.BusinessLogics;
|
|
|
|
|
using ToolsModule.Enums;
|
2021-04-06 22:07:11 +04:00
|
|
|
|
|
2022-03-19 22:48:13 +04:00
|
|
|
|
namespace DepartmentBusinessLogic.BusinessLogics.GenericBusinessLogic
|
2021-04-06 22:07:11 +04:00
|
|
|
|
{
|
2022-03-19 22:48:13 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Логика работы с учебными планами
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class AcademicPlanBusinessLogic : GenericBusinessLogic<AcademicPlanGetBindingModel, AcademicPlanSetBindingModel, AcademicPlanListViewModel, AcademicPlanViewModel>, IAcademicPlanLogic
|
2021-04-06 22:07:11 +04:00
|
|
|
|
{
|
|
|
|
|
public AcademicPlanBusinessLogic(IAcademicPlanService service) : base(service, "Учебные Планы", AccessOperation.УчебныеПланы) { }
|
2021-04-11 20:49:26 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Загрузка учебного плана
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public bool LoadPlx(AcademicPlanLoadPlxModel model)
|
|
|
|
|
{
|
|
|
|
|
Errors.Clear();
|
|
|
|
|
var result = (Service as IAcademicPlanService).LoadPlx(model);
|
|
|
|
|
if (!result.IsSucceeded)
|
|
|
|
|
{
|
|
|
|
|
Errors.AddRange(result.Errors);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2021-04-06 22:07:11 +04:00
|
|
|
|
}
|
|
|
|
|
}
|