using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;
using System.Threading.Tasks;
using static Learun.Application.TwoDevelopment.EducationalAdministration.ArrangeExamTermService;
namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
///
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-05-24 10:27
/// 描 述:排考数据同步
///
public class ArrangeExamTermBLL : ArrangeExamTermIBLL
{
private ArrangeExamTermService arrangeExamTermService = new ArrangeExamTermService();
#region 获取数据
///
/// 获取页面显示列表数据
///
/// 查询参数
///
public IEnumerable GetPageList(Pagination pagination, string queryJson)
{
try
{
return arrangeExamTermService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取ArrangeExamTerm表实体数据
/// 主键
///
///
public ArrangeExamTermEntity GetArrangeExamTermEntity(string keyValue)
{
try
{
return arrangeExamTermService.GetArrangeExamTermEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取ArrangeExamTerm表实体数据
/// 学年
/// 学期
///
///
public ArrangeExamTermEntity GetArrangeExamTermEntityByYear(string academicYearNo, string semester)
{
try
{
return arrangeExamTermService.GetArrangeExamTermEntityByYear(academicYearNo, semester);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
#region 提交数据
///
/// 删除实体数据
/// 主键
///
///
public void DeleteEntity(string keyValue)
{
try
{
arrangeExamTermService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 保存实体数据(新增、修改)
/// 主键
///
///
public void SaveEntity(string keyValue, ArrangeExamTermEntity entity)
{
try
{
arrangeExamTermService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
#region 扩展数据
public async Task AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity)
{
try
{
return await arrangeExamTermService.AsyncArrangeExamDataNew(entity);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 排考数据同步
///
///
public async Task AsyncArrangeExamData()
{
try
{
return await arrangeExamTermService.AsyncArrangeExamData();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 考试表
///
/// 查询开始时间
/// 查询截止时间
/// 班级号
/// 监考教师号
///
public IEnumerable GetExamTable(string startDate, string endDate, string classNo, string empNo)
{
try
{
return arrangeExamTermService.GetExamTable(startDate, endDate, classNo, empNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 考试表-选修课【学子在线】
///
/// 查询开始时间
/// 查询截止时间
/// 学号
///
public IEnumerable GetExamTableOfElectiveInStudent(string startDate, string endDate, string stuNo)
{
try
{
return arrangeExamTermService.GetExamTableOfElectiveInStudent(startDate, endDate, stuNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 考试表--班级下拉框信息
///
///
///
public IEnumerable GetClassData()
{
try
{
return arrangeExamTermService.GetClassData();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 考试表--教师下拉框信息
///
///
///
public IEnumerable GetTeacherData()
{
try
{
return arrangeExamTermService.GetTeacherData();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public bool GetAny()
{
try
{
return arrangeExamTermService.GetAny();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
}
}