DepartmentProject/DepartmentPortal/Department/DepartmentBusinessLogic/BusinessLogics/AcademicPlanBusinessLogic.cs

33 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using DepartmentBusinessLogic.BindingModels;
using DepartmentBusinessLogic.Interfaces;
using DepartmentBusinessLogic.ViewModels;
using ModuleTools.BusinessLogics;
using ModuleTools.Enums;
namespace DepartmentBusinessLogic.BusinessLogics
{
/// <summary>
/// Логика работы с учебными планами
/// </summary>
public class AcademicPlanBusinessLogic : GenericBusinessLogic<AcademicPlanGetBindingModel, AcademicPlanSetBindingModel, AcademicPlanListViewModel, AcademicPlanViewModel>
{
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;
}
}
}