diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/PartyCateController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/PartyCateController.cs index 82079107e..4dd38efc2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/PartyCateController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/PartyCateController.cs @@ -85,19 +85,6 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers var data = partyCateIBLL.GetEntity(keyValue); return Success(data); } - - /// - /// 获取左侧树形数据 - /// - /// - [HttpGet] - [AjaxOnly] - public ActionResult GetTree(string CType) - { - var data = partyCateIBLL.GetTree(CType); - return Success(data); - } - /// /// 获取字典分类列表(树结构) /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/PartyManageController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/PartyManageController.cs index 22a130b59..f1c44308d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/PartyManageController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/PartyManageController.cs @@ -79,6 +79,18 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers }; return Success(jsonData); } + + /// + /// 获取左侧树形数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetTree(string CType) + { + var data = partyManageIBLL.GetTree(CType); + return Success(data); + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Form.cshtml index 4655aa07f..2014b818c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Form.cshtml @@ -3,15 +3,15 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
上级
-
+
名称*
-
+
排序*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Form.js index 6d8863f3f..fdac8e8e3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Form.js @@ -4,16 +4,17 @@ * 日 期:2023-08-03 17:25 * 描 述:PartyCate */ -var acceptClick; var parentId = request('parentId'); var CType = request('CType'); var selectedRow = top.layer_ClassifyIndex.selectedRow; var keyValue = request('keyValue'); +var acceptClick; var bootstrap = function ($, learun) { "use strict"; - var selectedRow = learun.frameTab.currentIframe().selectedRow; var page = { init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); page.initData(); }, bind: function () { @@ -47,8 +48,6 @@ var bootstrap = function ($, learun) { learun.alert.error('上级不能是自己本身'); return false; } - var postData = $('#form').lrGetFormData(); - Console.log(postData,"postData") $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/PartyCate/SaveForm?keyValue=' + keyValue, postData, function (res) { // 保存成功后才回调 if (!!callBack) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Index.js index 76a0fef8d..b78abc000 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Index.js @@ -4,8 +4,9 @@ * 日 期:2023-08-03 17:25 * 描 述:PartyCate */ -var selectedRow; var refreshGirdData; +var selectedRow; +var CType = request('CType'); var bootstrap = function ($, learun) { "use strict"; var page = { @@ -25,11 +26,12 @@ var bootstrap = function ($, learun) { }); // 新增 $('#lr_add').on('click', function () { + var ID = $('#gridtable').jfGridValue('ID'); selectedRow = null; learun.layerForm({ id: 'form', title: '新增', - url: top.$.rootUrl + '/PersonnelManagement/PartyCate/Form', + url: top.$.rootUrl + '/PersonnelManagement/PartyCate/Form?parentId=' + ID + '&CType=' + CType, width: 400, height: 300, callBack: function (id) { @@ -39,13 +41,13 @@ var bootstrap = function ($, learun) { }); // 编辑 $('#lr_edit').on('click', function () { + selectedRow = $('#gridtable').jfGridGet('rowdata'); var keyValue = $('#gridtable').jfGridValue('ID'); - selectedRow = $('#gridtable').jfGridGet('rowdata'); if (learun.checkrow(keyValue)) { learun.layerForm({ id: 'form', title: '编辑', - url: top.$.rootUrl + '/PersonnelManagement/PartyCate/Form?keyValue=' + keyValue, + url: top.$.rootUrl + '/PersonnelManagement/PartyCate/Form?keyValue=' + keyValue + '&CType=' + CType, width: 400, height: 300, callBack: function (id) { @@ -70,10 +72,9 @@ var bootstrap = function ($, learun) { }, initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ - url: top.$.rootUrl + '/PersonnelManagement/PartyCate/GetPageList', + url: top.$.rootUrl + '/PersonnelManagement/PartyCate/GetClassifyList?CType=' + CType, headData: [ { label: '名称', name: 'Name', width: 200, align: "left" }, - { label: '排序', name: 'COrder', width: 200, align: "left" }, ], mainId: 'ID', sidx: 'COrder desc', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Index.cshtml index c71fcbaa6..4326e55de 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Index.cshtml @@ -28,8 +28,9 @@  新增  编辑  删除 -  目录管理  打印 +  目录管理 +  访问情况统计
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Index.js index 06c9bc711..66dd6cfa8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/Index.js @@ -22,10 +22,10 @@ var bootstrap = function ($, learun) { } // 初始化左侧树形数据 $('#dataTree').lrtree({ - url: top.$.rootUrl + '/PersonnelManagement/PartyCateList/GetTree?CType=' + CType, + url: top.$.rootUrl + '/PersonnelManagement/PartyManage/GetTree?CType=' + CType, nodeClick: function (item) { selectedId = item.value; - page.search({ CId: item.value }); + page.search({ CateId: item.value }); } }); // 时间搜索框 @@ -53,7 +53,7 @@ var bootstrap = function ($, learun) { startTime = begin; endTime = end; if (selectedId) { - page.search({ CId: selectedId }); + page.search({ CateId: selectedId }); } } }); @@ -63,7 +63,7 @@ var bootstrap = function ($, learun) { }); $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { if (selectedId) { - queryJson.CId = selectedId; + queryJson.CateId = selectedId; page.search(queryJson); } }, 220, 400); @@ -112,7 +112,7 @@ var bootstrap = function ($, learun) { /*分类管理*/ $('#lr_category').on('click', function () { learun.layerForm({ - id: 'TypeIndex', + id: 'ClassifyIndex', title: '分类管理', url: top.$.rootUrl + '/PersonnelManagement/PartyCate/Index?CType=' + CType, width: 800, @@ -147,10 +147,10 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/PersonnelManagement/PartyManage/GetPageList', headData: [ - { label: "所属分类", name: "CateId", width: 100, align: "left", + { label: "所属分类", name: "CateId", width: 200, align: "left", formatterAsync: function (callback, value, row, op,$cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'partycate', @@ -161,9 +161,9 @@ var bootstrap = function ($, learun) { } }); }}, - { label: "标题", name: "Title", width: 100, align: "left"}, + { label: "标题", name: "Title", width: 200, align: "left"}, { - label: "附件上传", name: "Filepath", width: 100, align: "left" + label: "附件上传", name: "Filepath", width: 200, align: "left" , formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { @@ -194,7 +194,7 @@ var bootstrap = function ($, learun) { }; refreshGirdData = function () { if (selectedId) { - page.search({ CId: selectedId }); + page.search({ CateId: selectedId }); } //$('#gridtable').jfGridSet('reload'); }; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateBLL.cs index 6015f0b06..a06531266 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateBLL.cs @@ -91,45 +91,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } - /// - /// 获取左侧树形数据 - /// - /// - public List GetTree(string CType) - { - try - { - DataTable list = partyCateService.GetSqlTree(CType); - List treeList = new List(); - foreach (DataRow item in list.Rows) - { - TreeModel node = new TreeModel - { - id = item["cid"].ToString(), - text = item["cname"].ToString(), - value = item["cid"].ToString(), - showcheck = false, - checkstate = 0, - isexpand = true, - parentId = item["cparentid"].ToString() - }; - treeList.Add(node); - } - return treeList.ToTree(); - } - catch (Exception ex) - { - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowBusinessException(ex); - } - } - } - /// /// 分类列表 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateIBLL.cs index d40718827..afbd75cb0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateIBLL.cs @@ -35,7 +35,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// PartyCateEntity GetEntity(string keyValue); - List GetTree(string CType); List GetClassifyTree(string CType); List GetClassifyList(string keyword, string CType); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateService.cs index adadc071b..0b01bbe2b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateService.cs @@ -34,7 +34,16 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement strSql.Append("SELECT "); strSql.Append(" t.* "); strSql.Append(" FROM PartyCate t "); - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); + strSql.Append(" where 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["CateId"].IsEmpty()) + { + dp.Add("CateId", queryParam["CateId"].ToString(), DbType.String); + strSql.Append(" AND t.CateId = @CateId "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -73,28 +82,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } - /// - /// 获取树形数据 - /// - /// - public DataTable GetSqlTree(string CType) - { - try - { - return this.BaseRepository("CollegeMIS").FindTable($" SELECT * FROM dbo.PartyCate WHERE CType='{CType}' "); - } - catch (Exception ex) - { - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowServiceException(ex); - } - } - } + public List GetList(string CType) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyCateEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyCateEntity.cs deleted file mode 100644 index 19196d231..000000000 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyCateEntity.cs +++ /dev/null @@ -1,75 +0,0 @@ -using Learun.Util; -using System; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Learun.Application.TwoDevelopment.PersonnelManagement -{ - /// - /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 - /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 - /// 创 建:超级管理员 - /// 日 期:2023-07-31 16:59 - /// 描 述:党政办管理 - /// - public class PartyCateEntity - { - #region 实体成员 - /// - /// ID - /// - [Column("ID")] - public string ID { get; set; } - /// - /// Name - /// - [Column("NAME")] - public string Name { get; set; } - /// - /// Creator - /// - [Column("CREATOR")] - public string Creator { get; set; } - /// - /// Createtime - /// - [Column("CREATETIME")] - public DateTime? Createtime { get; set; } - #endregion - - #region 扩展操作 - /// - /// 新增调用 - /// - public void Create() - { - this.ID = Guid.NewGuid().ToString(); - } - /// - /// 编辑调用 - /// - /// - public void Modify(string keyValue) - { - this.ID = keyValue; - } - #endregion - #region 扩展字段 - /// - /// 所属分类 - /// - [NotMapped] - public string CateId { get; set; } - /// - /// 标题 - /// - [NotMapped] - public string Title { get; set; } - /// - /// 附件上传 - /// - [NotMapped] - public string Filepath { get; set; } - #endregion - } -} - diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageBLL.cs index 7d80c8304..c84fc8364 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageBLL.cs @@ -91,6 +91,45 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 获取左侧树形数据 + /// + /// + public List GetTree(string CType) + { + try + { + DataTable list = partyManageService.GetSqlTree(CType); + List treeList = new List(); + foreach (DataRow item in list.Rows) + { + TreeModel node = new TreeModel + { + id = item["id"].ToString(), + text = item["name"].ToString(), + value = item["id"].ToString(), + showcheck = false, + checkstate = 0, + isexpand = true, + parentId = item["cparentid"].ToString() + }; + treeList.Add(node); + } + return treeList.ToTree(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageEntity.cs index d1ef2e7ea..383ee7e8d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageEntity.cs @@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// 日 期:2023-07-31 16:59 /// 描 述:党政办管理 /// - public class PartyManageEntity + public class PartyManageEntity { #region 实体成员 /// @@ -49,6 +49,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// [Column("FILEPATH")] public string Filepath { get; set; } + [Column("CTYPE")] + public string CType { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageIBLL.cs index 653b10356..838bc9af9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageIBLL.cs @@ -33,6 +33,9 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// 主键 /// PartyCateEntity GetPartyCateEntity(string keyValue); + + List GetTree(string CType); + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageService.cs index 940c14e5d..964253513 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageService.cs @@ -31,24 +31,13 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" - t.ID, - t1.CateId, - t1.Title, - t1.Filepath - "); - strSql.Append(" FROM PartyCate t "); - strSql.Append(" LEFT JOIN PartyManage t1 ON t1.CateId = t.ID "); + strSql.Append(@"t.* "); + strSql.Append(" FROM PartyManage t"); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); - if (!queryParam["CateId"].IsEmpty()) - { - dp.Add("CateId",queryParam["CateId"].ToString(), DbType.String); - strSql.Append(" AND t.CateId = @CateId "); - } - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -72,7 +61,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { - return this.BaseRepository("CollegeMIS").FindEntity(t=>t.CateId == keyValue); + return this.BaseRepository("CollegeMIS").FindEntity(t => t.CateId == keyValue); } catch (Exception ex) { @@ -111,6 +100,28 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 获取树形数据 + /// + /// + public DataTable GetSqlTree(string CType) + { + try + { + return this.BaseRepository("CollegeMIS").FindTable($" SELECT * FROM dbo.PartyCate WHERE CType='{CType}' "); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 提交数据 @@ -124,9 +135,9 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement var db = this.BaseRepository("CollegeMIS").BeginTrans(); try { - var partyCateEntity = GetPartyCateEntity(keyValue); - db.Delete(t=>t.CateId == partyCateEntity.ID); - db.Delete(t=>t.ID == keyValue); + var partyCateEntity = GetPartyCateEntity(keyValue); + db.Delete(t => t.CateId == partyCateEntity.ID); + db.Delete(t => t.ID == keyValue); db.Commit(); } catch (Exception ex) @@ -148,17 +159,17 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// /// 主键 /// 实体 - public void SaveEntity(string keyValue, PartyCateEntity entity,PartyManageEntity partyManageEntity) + public void SaveEntity(string keyValue, PartyCateEntity entity, PartyManageEntity partyManageEntity) { var db = this.BaseRepository("CollegeMIS").BeginTrans(); try { if (!string.IsNullOrEmpty(keyValue)) { - var partyCateEntityTmp = GetPartyCateEntity(keyValue); + var partyCateEntityTmp = GetPartyCateEntity(keyValue); entity.Modify(keyValue); db.Update(entity); - db.Delete(t=>t.CateId == partyCateEntityTmp.ID); + db.Delete(t => t.CateId == partyCateEntityTmp.ID); partyManageEntity.Create(); partyManageEntity.CateId = partyCateEntityTmp.ID; db.Insert(partyManageEntity);