34 lines
1.2 KiB
C#
34 lines
1.2 KiB
C#
using DepartmentContract.BindingModels;
|
||
using DepartmentContract.Logics.IGenericEntityLogic;
|
||
using DepartmentContract.Services.IGenericEntityService;
|
||
using DepartmentContract.ViewModels;
|
||
using ToolsModule.BusinessLogics;
|
||
using ToolsModule.Enums;
|
||
|
||
namespace DepartmentBusinessLogic.BusinessLogics.GenericBusinessLogic
|
||
{
|
||
/// <summary>
|
||
/// Логика работы с учебными планами
|
||
/// </summary>
|
||
public class AcademicPlanBusinessLogic : GenericBusinessLogic<AcademicPlanGetBindingModel, AcademicPlanSetBindingModel, AcademicPlanListViewModel, AcademicPlanViewModel>, IAcademicPlanLogic
|
||
{
|
||
public AcademicPlanBusinessLogic(IAcademicPlanService service) : base(service, "Учебные Планы", AccessOperation.УчебныеПланы) { }
|
||
|
||
/// <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;
|
||
}
|
||
}
|
||
} |