From d8f04ec6c90b16e434a7fb7acea0189750938c39 Mon Sep 17 00:00:00 2001 From: ndbs Date: Mon, 19 Jun 2023 11:14:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8F=98=E6=9B=B4:=E8=AE=BA?= =?UTF-8?q?=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/SRPaperController.cs | 29 ++++- .../Views/SRPaper/CheckForm.cshtml | 19 +++ .../Views/SRPaper/CheckForm.js | 53 ++++++++ .../Views/SRPaper/Form.cshtml | 46 +++++-- .../PersonnelManagement/Views/SRPaper/Form.js | 5 +- .../Views/SRPaper/Index.cshtml | 17 ++- .../Views/SRPaper/Index.js | 117 ++++++++++++++++-- .../Learun.Application.Web.csproj | 2 + .../PersonnelManagement/SRPaper/SRPaperBLL.cs | 18 +++ .../SRPaper/SRPaperEntity.cs | 47 ++++--- .../SRPaper/SRPaperIBLL.cs | 3 + .../SRPaper/SRPaperService.cs | 66 ++++++++-- 12 files changed, 357 insertions(+), 65 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/CheckForm.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/CheckForm.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/SRPaperController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/SRPaperController.cs index 73a13d3fa..d6fe424f5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/SRPaperController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/SRPaperController.cs @@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } /// /// 表单页 @@ -35,7 +35,16 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [HttpGet] public ActionResult Form() { - return View(); + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult CheckForm() + { + return View(); } #endregion @@ -69,8 +78,9 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var SRPaperData = sRPaperIBLL.GetSRPaperEntity( keyValue ); - var jsonData = new { + var SRPaperData = sRPaperIBLL.GetSRPaperEntity(keyValue); + var jsonData = new + { SRPaper = SRPaperData, }; return Success(jsonData); @@ -102,9 +112,18 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { SRPaperEntity entity = strEntity.ToObject(); - sRPaperIBLL.SaveEntity(keyValue,entity); + sRPaperIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } + + [HttpPost] + [AjaxOnly] + public ActionResult CheckForm(string keyValue, string strEntity) + { + SRPaperEntity entity = strEntity.ToObject(); + sRPaperIBLL.CheckEntity(keyValue, entity); + return Success("评价成功!"); + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/CheckForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/CheckForm.cshtml new file mode 100644 index 000000000..1537bed57 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/CheckForm.cshtml @@ -0,0 +1,19 @@ +@{ + ViewBag.Title = "SRPaper"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
等次*
+
+
+
+
评价教师*
+ +
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/SRPaper/CheckForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/CheckForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/CheckForm.js new file mode 100644 index 000000000..d8c3e777a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/CheckForm.js @@ -0,0 +1,53 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-06-12 11:42 + * 描 述:TeachingCompetition + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + //page.initData(); + }, + bind: function () { + $('#AuditUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; + $('#AuditUser').val(learun.clientdata.get(['userinfo']).realName); + $('#Grade').lrDataItemSelect({ code: 'EncouragementDegree' }); + }, + //initData: function () { + //if (!!keyValue) { + // $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TeachingCompetition/GetFormData?keyValue=' + keyValue, function (data) { + // for (var id in data) { + // if (!!data[id].length && data[id].length > 0) { + // $('#' + id).jfGridSet('refreshdata', data[id]); + // } + // else { + // $('[data-table="' + id + '"]').lrSetFormData(data[id]); + // } + // } + // }); + //} + //} + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/SRPaper/CheckForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Form.cshtml index ae1de52c7..86ab7934f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Form.cshtml @@ -1,23 +1,43 @@ @{ - ViewBag.Title = "科技论文"; + ViewBag.Title = "科技著作"; Layout = "~/Views/Shared/_Form.cshtml"; }
-
-
标题
- +
+
部门*
+
-
-
内容
- +
+
名称
+
-
-
备注
- +
+
论文论著题目
+ +
+
+
发表刊物
+ +
+
+
发表时间*
+ +
+
+
级别
+
-
-
参与人
- +
+
期刊
+ +
+
+
奖励金额
+ +
+
+
备注
+
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/SRPaper/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Form.js index 94b01470b..0dff387e2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Form.js @@ -15,13 +15,16 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { + $('#DepartmentId').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); + $('#Name').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_account', text: 'f_realname' }); + $('#Rank').lrDataItemSelect({ code: 'Level' }); }, initData: function () { if (!!keyValue) { $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/SRPaper/GetFormData?keyValue=' + keyValue, function (data) { for (var id in data) { if (!!data[id].length && data[id].length > 0) { - $('#' + id ).jfGridSet('refreshdata', data[id]); + $('#' + id).jfGridSet('refreshdata', data[id]); } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Index.cshtml index c5ca68298..fe812edac 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Index.cshtml @@ -11,8 +11,16 @@
-
标题
- +
论文题目
+ +
+
+
部门
+
+
+
+
等次
+
@@ -23,9 +31,10 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Index.js index f239bb783..d233578df 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/SRPaper/Index.js @@ -22,7 +22,7 @@ var bootstrap = function ($, learun) { }); // 新增 $('#lr_add').on('click', function () { - learun.layerForm({ + learun.layerForm({ id: 'form', title: '新增', url: top.$.rootUrl + '/PersonnelManagement/SRPaper/Form', @@ -53,34 +53,129 @@ var bootstrap = function ($, learun) { $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { - learun.layerConfirm('是否确认删除该项!', function (res) { + learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/SRPaper/DeleteForm', { keyValue: keyValue}, function () { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/SRPaper/DeleteForm', { keyValue: keyValue }, function () { refreshGirdData(); }); } }); } }); + // 评价 + $('#lr_check').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '评价', + url: top.$.rootUrl + '/PersonnelManagement/SRPaper/CheckForm?keyValue=' + keyValue, + width: 600, + height: 300, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/PersonnelManagement/SRPaper/GetPageList', headData: [ - { label: "标题", name: "Title", width: 100, align: "left"}, - { label: "内容", name: "Content", width: 100, align: "left"}, - { label: "备注", name: "Remark", width: 100, align: "left"}, - { label: "参与人", name: "Participant", width: 100, align: "left"}, + { + label: "部门", name: "DepartmentId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: "作者", name: "Name", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', + key: value, + keyId: 'f_account', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { label: "论文论著题目", name: "Topic", width: 100, align: "left" }, + { label: "出版社", name: "Press", width: 100, align: "left" }, + { + label: "发表时间", name: "PostedTime", width: 100, align: "left" + , formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { + label: "级别", name: "Rank", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'Level', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "著作期刊", name: "TitleWorks", width: 100, align: "left" }, + { label: "奖励金额", name: "Money", width: 100, align: "left" }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + { + label: "等次", name: "Grade", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'EncouragementDegree', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "审批用户", name: "AuditUser", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { + label: "审批时间", name: "AuditTime", width: 100, align: "left" + , formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh-mm-ss'); + } + }, + { label: "审批备注", name: "AuditRemark", width: 100, align: "left" }, ], - mainId:'ID', - isPage: true + mainId: 'ID', + isPage: true, + isMultiselect: true, + sidx: "CreateTime desc" }); page.search(); }, search: function (param) { param = param || {}; - $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 7726da8d7..10ab8556d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1860,6 +1860,7 @@ + @@ -8127,6 +8128,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperBLL.cs index 99165bdc5..4b54391e2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperBLL.cs @@ -118,6 +118,24 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + public void CheckEntity(string keyValue, SRPaperEntity entity) + { + try + { + sRPaperService.CheckEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperEntity.cs index f0a5d8e92..bf96e671e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperEntity.cs @@ -19,26 +19,35 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement ///
[Column("ID")] public string ID { get; set; } - /// - /// 标题 - /// - [Column("TITLE")] - public string Title { get; set; } - /// - /// 内容 - /// - [Column("CONTENT")] - public string Content { get; set; } - /// - /// 备注 - /// + public string DepartmentId { get; set; } + [Column("NAME")] + public string Name { get; set; } + [Column("TOPIC")] + public string Topic { get; set; } + [Column("PRESS")] + public string Press { get; set; } + [Column("RANK")] + public string Rank { get; set; } + [Column("GRADE")] + public string Grade { get; set; } + [Column("TITLEWORKS")] + public string TitleWorks { get; set; } + [Column("MONEY ")] + public decimal? Money { get; set; } [Column("REMARK")] public string Remark { get; set; } - /// - /// 参与人员信息 - /// - [Column("PARTICIPANT")] - public string Participant { get; set; } + [Column("CREATEUSER")] + public string CreateUser { get; set; } + [Column("AUDITUSER")] + public string AuditUser { get; set; } + [Column("AUDITREMARK")] + public string AuditRemark { get; set; } + [Column("AUDITTIME")] + public DateTime? AuditTime { get; set; } + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + [Column("POSTEDTIME")] + public DateTime? PostedTime { get; set; } #endregion #region 扩展操作 @@ -48,6 +57,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement public void Create() { this.ID = Guid.NewGuid().ToString(); + this.CreateUser = LoginUserInfo.Get().userId; + this.CreateTime = DateTime.Now; } /// /// 编辑调用 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperIBLL.cs index 334246fb1..ff8e687c3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperIBLL.cs @@ -43,6 +43,9 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// /// void SaveEntity(string keyValue, SRPaperEntity entity); + + void CheckEntity(string keyValue, SRPaperEntity entity); + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperService.cs index ab9734187..f452554f2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/SRPaper/SRPaperService.cs @@ -30,24 +30,28 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" - t.ID, - t.Title, - t.Content, - t.Remark, - t.Participant - "); + strSql.Append(@"t.* "); strSql.Append(" FROM SRPaper t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); - if (!queryParam["Title"].IsEmpty()) + if (!queryParam["Topic"].IsEmpty()) { - dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); - strSql.Append(" AND t.Title Like @Title "); + dp.Add("Topic", "%" + queryParam["Topic"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Topic Like @Topic "); } - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + if (!queryParam["DepartmentId"].IsEmpty()) + { + dp.Add("DepartmentId", queryParam["DepartmentId"].ToString(), DbType.String); + strSql.Append(" AND t.DepartmentId = @DepartmentId "); + } + if (!queryParam["Grade"].IsEmpty()) + { + dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String); + strSql.Append(" AND t.Grade = @Grade "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -97,12 +101,19 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// public void DeleteEntity(string keyValue) { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); try { - this.BaseRepository("CollegeMIS").Delete(t=>t.ID == keyValue); + var id = keyValue.Split(','); + foreach (var item in id) + { + db.Delete(t => t.ID == item); + } + db.Commit(); } catch (Exception ex) { + db.Rollback(); if (ex is ExceptionEx) { throw; @@ -146,7 +157,36 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } } - + public void CheckEntity(string keyValue, SRPaperEntity entity) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + var Id = keyValue.Split(','); + foreach (var item in Id) + { + SRPaperEntity model = db.FindEntity(x => x.ID == item); + model.Grade = entity.Grade; + model.AuditUser = entity.AuditUser; + model.AuditTime = DateTime.Now; + model.AuditRemark = entity.AuditRemark; + db.Update(model); + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion }