Ver a proveniência

班级列表及邦定,课表接口、密码验证

焉耆分支(新)
dao há 1 mês
ascendente
cometimento
0eba229612
10 ficheiros alterados com 369 adições e 108 eliminações
  1. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
  2. +89
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Device/LessonShow.cs
  3. +110
    -108
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config
  4. +20
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs
  5. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs
  6. +46
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs
  7. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoBLL.cs
  8. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoEntity.cs
  9. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoIBLL.cs
  10. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoService.cs

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj Ver ficheiro

@@ -222,6 +222,7 @@
<Compile Include="Bootstraper.cs" />
<Compile Include="Modules\ArrangelessonLogin.cs" />
<Compile Include="Modules\BaseNoAuthenticationNoLogin.cs" />
<Compile Include="Modules\Device\LessonShow.cs" />
<Compile Include="Modules\UsernologinApi.cs" />
<Compile Include="Modules\VisitmanageApi.cs" />
<Compile Include="Modules\LessonInfoOfElectiveOnlineApi.cs" />


+ 89
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Device/LessonShow.cs Ver ficheiro

@@ -0,0 +1,89 @@
using Learun.Application.Base.SystemModule;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using Microsoft.Ajax.Utilities;
using Nancy;
using Nancy.Session;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Learun.Application.WebApi.Modules.Device
{
public class LessonShow : BaseNoAuthentication
{

public LessonShow() : base("/app/lesson")
{
Get["/class/list"] = GetClassList;
Get["/arrangelesson"] = GetLesson;
Post["/class/bind"] = BindClass;
Post["/checkpwd"] = CheckPwd;
}

private DataSourceIBLL dataSourceIBLL = new DataSourceBLL();
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
private ArrangeLessonTermIBLL arrangeLessonTermIBLL = new ArrangeLessonTermBLL();

/// <summary>
/// 班级列表
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetClassList(dynamic _)
{
//var keyValue = this.GetReqData(); 1=1 AND CheckMark=1 order by classno desc
var data = dataSourceIBLL.GetDataTable("bjsj", "");
return Success(data);
}
/// <summary>
/// 邦定班级
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response BindClass(dynamic _)
{
var k = this.GetReq<BindDevClass>();
classInfoIBLL.BindDevice(k.ClassNo, k.DeviceNo);
return Success("操作成功");
}
public class BindDevClass
{
public string ClassNo { get; set; }

public string DeviceNo { get; set; }

public string DevPwd { get; set; }
}
/// <summary>
/// 获取课程
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetLesson(dynamic _)
{
var bj = this.GetReq<BindDevClass>();
var classInfo = classInfoIBLL.GetClassNoByDevice(bj.DeviceNo);
if (classInfo == null) return Fail("未找到班级");
var lesson = arrangeLessonTermIBLL.GetLessonDay(DateTime.Today, classInfo.ClassNo, "");
return Success(lesson);
}
/// <summary>
/// 验证密码
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response CheckPwd(dynamic _)
{
var pwd = this.GetReq<BindDevClass>();
var setp = ConfigurationManager.AppSettings["DevPwd"].ToString();
if (pwd.DevPwd != setp)
{
return Fail("密码错误!");
}
return Success("lesson");
}
}
}

+ 110
- 108
Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config Ver ficheiro

@@ -1,118 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<appSettings>
<!-- ================== 1:开发系统相关配置 ================== -->
<!-- 启用系统日志-->
<add key="IsLog" value="true" />
<!-- 是否启用js、css压缩-->
<add key="JsCompressor" value="false" />
<!-- 是否启用js、css缓存-->
<add key="JsCompressorCache" value="false" />
<!-- 代码生成器路径-->
<add key="BackProject" value="Learun.Application.TwoDevelopment" />
<add key="MappingDirectory" value="\Learun.Framework.Module\Learun.Application.Module\Learun.Application.Mapping" />
<add key="ServiceDirectory" value="\Learun.Framework.Module\Learun.Application.Module\Learun.Application.TwoDevelopment" />
<add key="WebDirectory" value="\Learun.Application.Web" />
<add key="ApiDirectory" value="\Learun.Application.WebApi" />
<add key="AppDirectory" value="\pulsApp" />
<add key="WxDirectory" value="\uniApp" />
<!-- ================== 1:开发系统相关配置 ================== -->
<!-- 启用系统日志-->
<add key="IsLog" value="true" />
<!-- 是否启用js、css压缩-->
<add key="JsCompressor" value="false" />
<!-- 是否启用js、css缓存-->
<add key="JsCompressorCache" value="false" />
<!-- 代码生成器路径-->
<add key="BackProject" value="Learun.Application.TwoDevelopment" />
<add key="MappingDirectory" value="\Learun.Framework.Module\Learun.Application.Module\Learun.Application.Mapping" />
<add key="ServiceDirectory" value="\Learun.Framework.Module\Learun.Application.Module\Learun.Application.TwoDevelopment" />
<add key="WebDirectory" value="\Learun.Application.Web" />
<add key="ApiDirectory" value="\Learun.Application.WebApi" />
<add key="AppDirectory" value="\pulsApp" />
<add key="WxDirectory" value="\uniApp" />

<!-- ================== 2:这里主要是微信配置项内容部分 ================== -->
<!--企业号CorpId -->
<add key="CorpId" value="wxa2c39f6194f4" />
<!--企业号凭证密钥 -->
<add key="CorpSecret" value="eDo9pEOXWqSgWtQ-_1NF_NTmGDTlZ3UFFdF3To-" />
<!-- ================== 3:访问过滤配置 ================== -->
<!--设置IP过滤 -->
<add key="FilterIP" value="false" />
<!--设置时段过滤 -->
<add key="FilterTime" value="false" />
<!-- ================== 4:系统软件参数配置 ================== -->
<!-- 联系我们 -->
<add key="Contact" value="" />
<!-- 公司名称 -->
<add key="CustomerCompanyName" value="数字化智慧校园" />
<!-- 系统名称 -->
<add key="SystemName" value="数字化智慧校园" />
<!-- 软件名称 -->
<add key="SoftName" value="数字化智慧校园" />
<!-- 软件版本 -->
<add key="Version" value="6.1.6.0" />
<!-- 软件注册码,备用 -->
<add key="RegisterKey" value="NO:2013101712345678" />
<!-- ================== 飞星通讯地址 下发新闻用 ================== -->
<add key="CommunicationServeraddress" value="http://123.57.209.16:8866/ChatConnection" />
<!-- ================== 2:这里主要是微信配置项内容部分 ================== -->
<!--企业号CorpId -->
<add key="CorpId" value="wxa2c39f6194f4" />
<!--企业号凭证密钥 -->
<add key="CorpSecret" value="eDo9pEOXWqSgWtQ-_1NF_NTmGDTlZ3UFFdF3To-" />
<!-- ================== 3:访问过滤配置 ================== -->
<!--设置IP过滤 -->
<add key="FilterIP" value="false" />
<!--设置时段过滤 -->
<add key="FilterTime" value="false" />
<!-- ================== 4:系统软件参数配置 ================== -->
<!-- 联系我们 -->
<add key="Contact" value="" />
<!-- 公司名称 -->
<add key="CustomerCompanyName" value="数字化智慧校园" />
<!-- 系统名称 -->
<add key="SystemName" value="数字化智慧校园" />
<!-- 软件名称 -->
<add key="SoftName" value="数字化智慧校园" />
<!-- 软件版本 -->
<add key="Version" value="6.1.6.0" />
<!-- 软件注册码,备用 -->
<add key="RegisterKey" value="NO:2013101712345678" />
<!-- ================== 飞星通讯地址 下发新闻用 ================== -->
<add key="CommunicationServeraddress" value="http://123.57.209.16:8866/ChatConnection" />

<!-- ================== 5:外部邮件参数 ================== -->
<!-- 系统错误自动发送邮件 -->
<add key="ErrorToMail" value="false" />
<!-- 接收错误信息的邮箱 -->
<add key="RereceiveErrorMail" value="" />
<!-- 发出邮箱的名称 -->
<add key="MailName" value="" />
<!-- 发出邮箱的地址 -->
<add key="MailUserName" value="" />
<!-- 发出邮箱的密码 -->
<add key="MailPassword" value="" />
<!-- 发出邮箱设置邮箱主机 -->
<add key="MailHost" value="" />
<!--内控材料上传角色名-->
<add key="MPRoleName" value="内控材料上传员" />
<!-- ================== 5:外部邮件参数 ================== -->
<!-- 系统错误自动发送邮件 -->
<add key="ErrorToMail" value="false" />
<!-- 接收错误信息的邮箱 -->
<add key="RereceiveErrorMail" value="" />
<!-- 发出邮箱的名称 -->
<add key="MailName" value="" />
<!-- 发出邮箱的地址 -->
<add key="MailUserName" value="" />
<!-- 发出邮箱的密码 -->
<add key="MailPassword" value="" />
<!-- 发出邮箱设置邮箱主机 -->
<add key="MailHost" value="" />
<!--内控材料上传角色名-->
<add key="MPRoleName" value="内控材料上传员" />

<!-- ================== 6:即时通信参数 ================== -->
<!-- SignalR服务接口-->
<add key="IMUrl" value="http://localhost:8012/signalr" />
<add key="IMOpen" value="true" />
<!-- ================== 6:即时通信参数 ================== -->
<!-- SignalR服务接口-->
<add key="IMUrl" value="http://localhost:8012/signalr" />
<add key="IMOpen" value="true" />

<add key="userKey" value="14B417B0-463D-4F2B-8075-0A20EEDB773A" />
<!-- ==================注意附件上传地址 修改到主网站部署目录下的Resource要不然飞星会报错================== -->
<add key="AnnexesFile" value="D:\work\DigitalScholl\Learun.Framework.Ultimate V7\Learun.Application.Web\Resource" />
<add key="ReportFile" value="~/Reports" />
<!-- ================== 工作流服务地址 ================== -->
<add key="workflowapi" value="http://localhost:8013" />
<!-- ================== 数字化校园主站地址 ================== -->
<add key="webrootpath" value="http://192.168.10.63:8001" />
<add key="userKey" value="14B417B0-463D-4F2B-8075-0A20EEDB773A" />
<!-- ==================注意附件上传地址 修改到主网站部署目录下的Resource要不然飞星会报错================== -->
<add key="AnnexesFile" value="D:\work\DigitalScholl\Learun.Framework.Ultimate V7\Learun.Application.Web\Resource" />
<add key="ReportFile" value="~/Reports" />
<!-- ================== 工作流服务地址 ================== -->
<add key="workflowapi" value="http://localhost:8013" />
<!-- ================== 数字化校园主站地址 ================== -->
<add key="webrootpath" value="http://192.168.10.63:8001" />

<!--Redis 缓存前缀 -->
<add key="RedisPrev" value="LRADMS"/>
<!--缓存链接配置-->
<add key="RedisExchangeHosts" value="127.0.0.1:6379,allowadmin=true"/>
<!--head 头像存储地址 -->
<add key="fileHeadImg" value="C:/fileHeadImg"/>
<add key="fileAppDTImg" value="C:/fileAppDTImg" />
<!--印章管理存储图片路径 -->
<add key="Stamp" value="C:/StampImg" />
<add key="Intervals" value="1"/>
<!--Redis 缓存前缀 -->
<add key="RedisPrev" value="LRADMS"/>
<!--缓存链接配置-->
<add key="RedisExchangeHosts" value="127.0.0.1:6379,allowadmin=true"/>
<!--head 头像存储地址 -->
<add key="fileHeadImg" value="C:/fileHeadImg"/>
<add key="fileAppDTImg" value="C:/fileAppDTImg" />
<!--印章管理存储图片路径 -->
<add key="Stamp" value="C:/StampImg" />
<add key="Intervals" value="1"/>


<add key="webpages:Version" value="3.0.0.0"/>
<add key="webpages:Enabled" value="false"/>
<add key="ClientValidationEnabled" value="true"/>
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
<add key="owin:AutomaticAppStartup" value="true"/>
<!-- ================== 默认头像 ================== -->
<add key="defaultheadimg" value="/Content/images/head/on-boy.jpg" />
<!--统一身份认证加密公钥-->
<!--批量生成家长帐号时默认的角色Id-->
<add key="GenerateParentsRoleId" value="" />
<!--默认密码-->
<add key="defaultpwd" value="123456" />
<add key="SSOPublicSecret" value="bjquanjiang" />
<!-- 深信服ACIp -->
<add key="ACIp" value=""/>
<add key="ACIp2" value=""/>
<!-- 是否强制验证强密码 -->
<add key="verifypwd" value="false"/>
<!--疫情防控组角色Id-->
<add key="EpidemicControlTeamRoleId" value="87f38e4e-b0a6-472c-b01a-2620b8f1ec46" />
<!--维修角色Id-->
<add key="MaintainRoleId" value="2939ea21-971d-4e3c-a2e9-6330a64bfab5" />
<add key="QJUrl" value="www.qj.com"/>
<!-- 报名选修课的最大课程数 -->
<add key="ElectiveLessonApplyMax" value="2" />
<!-- 报名线上选修课的最大课程数 -->
<add key="OnlineElectiveLessonApplyMax" value="2" />
<!--系主任角色Id-->
<add key="DeptDirectorRoleId" value="9310c5f3-1a0a-4f23-9452-3e5a15b3b722" />
<!--统一认证加密-->
<add key="zzjjz" value="tlmzysso"/>
<add key="webpages:Version" value="3.0.0.0"/>
<add key="webpages:Enabled" value="false"/>
<add key="ClientValidationEnabled" value="true"/>
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
<add key="owin:AutomaticAppStartup" value="true"/>
<!-- ================== 默认头像 ================== -->
<add key="defaultheadimg" value="/Content/images/head/on-boy.jpg" />
<!--统一身份认证加密公钥-->
<!--批量生成家长帐号时默认的角色Id-->
<add key="GenerateParentsRoleId" value="" />
<!--默认密码-->
<add key="defaultpwd" value="123456" />
<add key="SSOPublicSecret" value="bjquanjiang" />
<!-- 深信服ACIp -->
<add key="ACIp" value=""/>
<add key="ACIp2" value=""/>
<!-- 是否强制验证强密码 -->
<add key="verifypwd" value="false"/>
<!--疫情防控组角色Id-->
<add key="EpidemicControlTeamRoleId" value="87f38e4e-b0a6-472c-b01a-2620b8f1ec46" />
<!--维修角色Id-->
<add key="MaintainRoleId" value="2939ea21-971d-4e3c-a2e9-6330a64bfab5" />
<add key="QJUrl" value="www.qj.com"/>
<!-- 报名选修课的最大课程数 -->
<add key="ElectiveLessonApplyMax" value="2" />
<!-- 报名线上选修课的最大课程数 -->
<add key="OnlineElectiveLessonApplyMax" value="2" />
<!--系主任角色Id-->
<add key="DeptDirectorRoleId" value="9310c5f3-1a0a-4f23-9452-3e5a15b3b722" />
<!--统一认证加密-->
<add key="zzjjz" value="tlmzysso"/>
<!--课表设备密码-->
<add key="DevPwd" value="zhxy@123"/>
</appSettings>

+ 20
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs Ver ficheiro

@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using Learun.Application.Organization;
using static Learun.Application.TwoDevelopment.EducationalAdministration.ArrangeExamTermService;
using System.Runtime.InteropServices.ComTypes;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
@@ -594,5 +595,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var data = arrangeLessonTermService.InitAsyncDataByCondition(entity);
return data;
}

public IEnumerable<TimeTable> GetLessonDay(DateTime lessonDate, string classNo, string classroomNo)
{
try
{
return arrangeLessonTermService.GetLessonDay(lessonDate, classNo, classroomNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
}
}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs Ver ficheiro

@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using Learun.Application.Organization;
using static Learun.Application.TwoDevelopment.EducationalAdministration.ArrangeExamTermService;
using System;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
@@ -111,6 +112,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <returns></returns>
IEnumerable<TimeTable> GetTimeTableInEducation(string startDate, string endDate, string classNo, string empNo, string schoolId, string classroomNo);


IEnumerable<TimeTable> GetLessonDay(DateTime lessonDate, string classNo, string classroomNo);

/// <summary>
/// 课程表【教务】--班级下拉框信息
/// </summary>


+ 46
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs Ver ficheiro

@@ -1785,6 +1785,52 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
}
}


public IEnumerable<TimeTable> GetLessonDay(DateTime lessonDate, string classNo, string classroomNo)
{
var startDate = lessonDate;
var endDate = lessonDate.AddDays(1);
string sql = @"select b.AltId,b.F_SchoolId,b.DeptNo,b.MajorNo,b.AcademicYearNo as AcademicYear,b.LessonNo,b.LessonName,b.LessonTime,b.LessonDate,b.EmpNo,b.Empname EmpName,replace (b.TeachClassNo,b.LessonName,'') TeachClassNo, b.Semester,b.ClassroomNo as ClassRoomNo,b.LessonSortNo,d.ClassName,f.LessonTypeName,f.LessonTypeCode
from ArrangeLessonTerm b
left join ClassInfo d on replace(b.TeachClassNo,b.LessonName,'')=d.ClassNo
left join LessonInfo e on b.LessonNo=e.LessonNo
left join CdLessonType f on e.LessonTypeId=f.LTId
where b.LessonDate>=@startDate and b.LessonDate<=@endDate
and b.CheckMark=1";
try
{
var result = BaseRepository("CollegeMIS").FindList<TimeTable>(sql, new { startDate, endDate });
if (!string.IsNullOrEmpty(classNo))
{
if (classNo.Contains(","))
{
result = result.Where(x => classNo.Contains(x.ClassName));
}
else
{
result = result.Where(x => x.TeachClassNo == classNo);
}
}
//if (!string.IsNullOrEmpty(classroomNo))
//{
// result = result.Where(x => x.ClassRoomNo == classroomNo);
//}
return result;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 课程表【教务】--班级下拉框信息
/// </summary>


+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoBLL.cs Ver ficheiro

@@ -276,5 +276,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

#endregion

public void BindDevice(string classno, string dev)
{
try
{
classInfoService.BindDevice(classno, dev);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public ClassInfoEntity GetClassNoByDevice(string dev)
{
try
{
var bj = classInfoService.GetClassNoByDevice(dev);
return bj;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

}
}

+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoEntity.cs Ver ficheiro

@@ -102,6 +102,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
[Column("ISSEPARATE")]
public bool? IsSeparate { get; set; }

/// <summary>
/// 设备编码
/// </summary>
[Column("DeviceCode")]
public string DeviceCode { get; set; }

#endregion

#region 扩展操作


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoIBLL.cs Ver ficheiro

@@ -69,5 +69,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

IEnumerable<ClassInfoEntity> GetAllClass();
IEnumerable<ClassInfoEntity> GetClassByMajorNo(string majorNo);

void BindDevice(string classno, string dev);

ClassInfoEntity GetClassNoByDevice(string dev);

}
}

+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoService.cs Ver ficheiro

@@ -354,5 +354,53 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

public void BindDevice(string classno, string dev)
{
var db = this.BaseRepository("CollegeMIS");
try
{
var cn = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == classno);
if (cn == null) throw new Exception("未找到班级");
cn.DeviceCode = dev;
db.Update(cn);

}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public ClassInfoEntity GetClassNoByDevice(string dev)
{
var db = this.BaseRepository("CollegeMIS");
try
{
var cn = db.FindEntity<ClassInfoEntity>(x => x.DeviceCode == dev);
if (cn == null) throw new Exception("未找到班级");

return cn;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

}
}

Carregando…
Cancelar
Guardar