using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;
namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
///
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-02-21 16:53
/// 描 述:学生学籍
///
public class StuInfoBasicBLL : StuInfoBasicIBLL
{
private StuInfoBasicService stuInfoBasicService = new StuInfoBasicService();
#region 获取数据
///
/// 获取页面显示列表数据
///
/// 查询参数
///
public IEnumerable GetPageList(Pagination pagination, string queryJson)
{
try
{
return stuInfoBasicService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取StuInfoBasic表实体数据
/// 主键
///
///
public StuInfoBasicEntity GetStuInfoBasicEntity(string keyValue)
{
try
{
return stuInfoBasicService.GetStuInfoBasicEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取准许毕业学生的专业
///
///
public List GetMajorInfoWithGraduation()
{
try
{
return stuInfoBasicService.GetMajorInfoWithGraduation();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 根据专业顺序生成毕业证号
///
///
public void CreateGraduateNoByMajor(string CityCode,string SchoolCode,string MajorList)
{
try
{
stuInfoBasicService.CreateGraduateNoByMajor(CityCode,SchoolCode,MajorList);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取StuInfoBasic表实体数据
/// 主键
///
///
public StuInfoBasicEntity GetStuNoByAccount(string keyValue)
{
try
{
return stuInfoBasicService.GetStuNoByAccount(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public List GetSaveClassStudents(string account)
{
try
{
return stuInfoBasicService.GetSaveClassStudents(account);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public StuInfoBasicEntity GetStuInfoBasicEntityByStuNo(string enCode)
{
try
{
return stuInfoBasicService.GetStuInfoBasicEntityByStuNo(enCode);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public string GetPhotoByStuNo(string enCode)
{
try
{
return stuInfoBasicService.GetPhotoByStuNo(enCode);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public StuInfoBasicEntity GetStuInfoBasicEntityByStuName(string name)
{
try
{
return stuInfoBasicService.GetStuInfoBasicEntityByStuName(name);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取左侧树形数据
///
///
public List GetTree()
{
try
{
DataTable list = stuInfoBasicService.GetSqlTree();
List treeList = new List();
foreach (DataRow item in list.Rows)
{
TreeModel node = new TreeModel
{
id = item["classno"].ToString(),
text = item["classname"].ToString(),
value = item["classno"].ToString(),
showcheck = false,
checkstate = 0,
isexpand = true,
parentId = ""
};
treeList.Add(node);
}
return treeList.ToTree();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public StuInfoBasicEntity GetStuInfoBasicEntityByIdCard(string idcard)
{
try
{
return stuInfoBasicService.GetStuInfoBasicEntityByIdCard(idcard);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
#region 提交数据
///
/// 生成教师帐号
///
public void GenerateAccout()
{
try
{
stuInfoBasicService.GenerateAccout();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public bool GetAny()
{
try
{
return stuInfoBasicService.GetAny();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public IEnumerable GetAllList()
{
try
{
return stuInfoBasicService.GetAllList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public IEnumerable GetStuInfoByClassNo(string classNo)
{
try
{
return stuInfoBasicService.GetStuInfoByClassNo(classNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public void SyncDept()
{
try
{
stuInfoBasicService.SyncDept();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public void SyncMajor()
{
try
{
stuInfoBasicService.SyncMajor();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public void UpdateAccount()
{
try
{
stuInfoBasicService.UpdateAccount();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 删除实体数据
/// 主键
///
///
public void DeleteEntity(string keyValue)
{
try
{
stuInfoBasicService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 领取毕业证
/// 主键
///
///
public void GetCard(string keyValue)
{
try
{
stuInfoBasicService.GetCard(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 毕业生归档
/// 主键
///
///
public void StuStore()
{
try
{
stuInfoBasicService.StuStore();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 审核全部
///
public void CheckAll()
{
try
{
stuInfoBasicService.CheckAll();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 准许毕业
///
public void AllowGraduate(string stuNo,string status)
{
try
{
stuInfoBasicService.AllowGraduate(stuNo,status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public void SynPhoto()
{
try
{
stuInfoBasicService.SynPhoto();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 保存实体数据(新增、修改)
/// 主键
///
///
public void SaveEntity(string keyValue, StuInfoBasicEntity entity)
{
try
{
stuInfoBasicService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
}
}