소스 검색

教师用户管理,启用禁用关联用户表

长阳分支推送专用
ndbs 2 년 전
부모
커밋
4c351c2078
1개의 변경된 파일16개의 추가작업 그리고 0개의 파일을 삭제
  1. +16
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs

+ 16
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs 파일 보기

@@ -556,6 +556,7 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi
public void Lock(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
var db1 = this.BaseRepository().BeginTrans();
try
{
//单个启用
@@ -566,12 +567,19 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi
foreach (var item in keyValueArr)
{
db.ExecuteBySql("update EmpInfo set CheckMark=1 where EmpId='" + item + "'");
var code = db.FindEntity<EmpInfoEntity>(item).EmpNo;
if (!code.IsEmpty())
{
db1.ExecuteBySql("update LR_Base_User set F_EnabledMark=1 where F_EnCode='" + code + "'");
}
}
db.Commit();
db1.Commit();
}
catch (Exception ex)
{
db.Rollback();
db1.Rollback();
if (ex is ExceptionEx)
{
throw;
@@ -586,6 +594,7 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi
public void UnLock(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
var db1 = this.BaseRepository().BeginTrans();
try
{
//单个停用
@@ -596,12 +605,19 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi
foreach (var item in keyValueArr)
{
db.ExecuteBySql("update EmpInfo set CheckMark=0 where EmpId='" + item + "'");
var code = db.FindEntity<EmpInfoEntity>(item).EmpNo;
if (!code.IsEmpty())
{
db1.ExecuteBySql("update LR_Base_User set F_EnabledMark=0 where F_EnCode='" + code + "'");
}
}
db.Commit();
db1.Commit();
}
catch (Exception ex)
{
db.Rollback();
db1.Rollback();
if (ex is ExceptionEx)
{
throw;


불러오는 중...
취소
저장