Преглед изворни кода

教学著作多选删除功能

怀来职教中心中职
ndbs пре 1 година
родитељ
комит
c4408b6a77
1 измењених фајлова са 8 додато и 1 уклоњено
  1. +8
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRWork/SRWorkService.cs

+ 8
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRWork/SRWorkService.cs Прегледај датотеку

@@ -101,12 +101,19 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// <returns></returns>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
this.BaseRepository("CollegeMIS").Delete<SRWorkEntity>(t => t.ID == keyValue);
var id = keyValue.Split(',');
foreach (var item in id)
{
db.Delete<SRWorkEntity>(t => t.ID == item);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;


Loading…
Откажи
Сачувај