Ver código fonte

党政办目录必要的 实体 页面

怀来职教中心中职
ndbs 1 ano atrás
pai
commit
3a9ef9d55a
12 arquivos alterados com 735 adições e 3 exclusões
  1. +1
    -0
      .gitignore
  2. +121
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/PartyCateController.cs
  3. +35
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Form.cshtml
  4. +38
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Form.js
  5. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Index.cshtml
  6. +96
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Index.js
  7. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  8. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/PartyCateMap.cs
  9. +4
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  10. +148
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateBLL.cs
  11. +55
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateIBLL.cs
  12. +191
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateService.cs

+ 1
- 0
.gitignore Ver arquivo

@@ -82,3 +82,4 @@ Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js
/Learun.Framework.Ultimate V7/LearunApp-2.2.0/.hbuilderx/launch.json
/Learun.Framework.Ultimate V7/Learun.Application.Web/Properties/PublishProfiles
/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/QRCode
/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateEntity.cs

+ 121
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/PartyCateController.cs Ver arquivo

@@ -0,0 +1,121 @@
using Learun.Application.TwoDevelopment.PersonnelManagement;
using Learun.Util;
using System.Data;
using System.Web.Mvc;

namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-08-03 17:25
/// 描 述:PartyCate
/// </summary>
public class PartyCateController : MvcControllerBase
{
private PartyCateIBLL partyCateIBLL = new PartyCateBLL();

#region 视图功能

/// <summary>
/// 主页面
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList( string queryJson )
{
var data = partyCateIBLL.GetList(queryJson);
return Success(data);
}
/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = partyCateIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var data = partyCateIBLL.GetEntity(keyValue);
return Success(data);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
partyCateIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue,PartyCateEntity entity)
{
partyCateIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
#endregion

}
}

+ 35
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Form.cshtml Ver arquivo

@@ -0,0 +1,35 @@
@{
ViewBag.Title = "PartyCate";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">ID<font face="宋体">*</font></div>
<input id="ID" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">Name<font face="宋体">*</font></div>
<input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">CType<font face="宋体">*</font></div>
<input id="CType" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">父Id<font face="宋体">*</font></div>
<input id="CParentId" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">排序<font face="宋体">*</font></div>
<input id="COrder" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">Creator<font face="宋体">*</font></div>
<input id="Creator" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">Createtime<font face="宋体">*</font></div>
<input id="Createtime" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/PartyCate/Form.js")

+ 38
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Form.js Ver arquivo

@@ -0,0 +1,38 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2023-08-03 17:25
* 描 述:PartyCate
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var selectedRow = learun.frameTab.currentIframe().selectedRow;
var page = {
init: function () {
page.initData();
},
bind: function () {
},
initData: function () {
if (!!selectedRow) {
$('#form').lrSetFormData(selectedRow);
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('#form').lrValidform()) {
return false;
}
var postData = $('#form').lrGetFormData();
$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/PartyCate/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Index.cshtml Ver arquivo

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "PartyCate";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout lr-layout-left-center" id="lr_layout">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title">树形目录</div>
<div id="tree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap">
<div class="lr-layout-title">标题</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" />
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/PartyCate/Index.js")

+ 96
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyCate/Index.js Ver arquivo

@@ -0,0 +1,96 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2023-08-03 17:25
* 描 述:PartyCate
*/
var selectedRow;
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 查询
$('#btn_Search').on('click', function () {
var keyword = $('#txt_Keyword').val();
page.search({ keyword: keyword });
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
selectedRow = null;
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/PersonnelManagement/PartyCate/Form',
width: 700,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
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,
width: 700,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/PartyCate/DeleteForm', { keyValue: keyValue}, function () {
});
}
});
}
});
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/PersonnelManagement/PartyCate/GetPageList',
headData: [
{ label: 'ID', name: 'ID', width: 200, align: "left" },
{ label: 'Name', name: 'Name', width: 200, align: "left" },
{ label: 'CType', name: 'CType', width: 200, align: "left" },
{ label: '父Id', name: 'CParentId', width: 200, align: "left" },
{ label: '排序', name: 'COrder', width: 200, align: "left" },
{ label: 'Creator', name: 'Creator', width: 200, align: "left" },
{ label: 'Createtime', name: 'Createtime', width: 200, align: "left" },
],
mainId:'ID',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Ver arquivo

@@ -913,6 +913,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\TeacherPlanCheckController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TrainingRoomUseController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\PartyManageController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\PartyCateController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -7162,6 +7163,10 @@
<Content Include="Areas\PersonnelManagement\Views\PartyManage\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\PartyManage\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\PartyManage\Form.js" />
<Content Include="Areas\PersonnelManagement\Views\PartyCate\Index.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\PartyCate\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\PartyCate\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\PartyCate\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" />


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/PartyCateMap.cs Ver arquivo

@@ -7,8 +7,8 @@ namespace Learun.Application.Mapping
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-07-31 16:59
/// 描 述:党政办管理
/// 日 期:2023-08-03 17:25
/// 描 述:PartyCate
/// </summary>
public class PartyCateMap : EntityTypeConfiguration<PartyCateEntity>
{


+ 4
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Ver arquivo

@@ -2104,10 +2104,13 @@
<Compile Include="EducationalAdministration\TrainingRoomUse\TrainingRoomUseBLL.cs" />
<Compile Include="EducationalAdministration\TrainingRoomUse\TrainingRoomUseIBLL.cs" />
<Compile Include="PersonnelManagement\PartyManage\PartyManageEntity.cs" />
<Compile Include="PersonnelManagement\PartyManage\PartyCateEntity.cs" />
<Compile Include="PersonnelManagement\PartyManage\PartyManageService.cs" />
<Compile Include="PersonnelManagement\PartyManage\PartyManageBLL.cs" />
<Compile Include="PersonnelManagement\PartyManage\PartyManageIBLL.cs" />
<Compile Include="PersonnelManagement\PartyCate\PartyCateEntity.cs" />
<Compile Include="PersonnelManagement\PartyCate\PartyCateService.cs" />
<Compile Include="PersonnelManagement\PartyCate\PartyCateIBLL.cs" />
<Compile Include="PersonnelManagement\PartyCate\PartyCateBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 148
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateBLL.cs Ver arquivo

@@ -0,0 +1,148 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-08-03 17:25
/// 描 述:PartyCate
/// </summary>
public class PartyCateBLL : PartyCateIBLL
{
private PartyCateService partyCateService = new PartyCateService();

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<PartyCateEntity> GetList( string queryJson )
{
try
{
return partyCateService.GetList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<PartyCateEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return partyCateService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public PartyCateEntity GetEntity(string keyValue)
{
try
{
return partyCateService.GetEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
partyCateService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, PartyCateEntity entity)
{
try
{
partyCateService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 55
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateIBLL.cs Ver arquivo

@@ -0,0 +1,55 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-08-03 17:25
/// 描 述:PartyCate
/// </summary>
public interface PartyCateIBLL
{
#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<PartyCateEntity> GetList( string queryJson );
/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<PartyCateEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
PartyCateEntity GetEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, PartyCateEntity entity);
#endregion

}
}

+ 191
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyCate/PartyCateService.cs Ver arquivo

@@ -0,0 +1,191 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-08-03 17:25
/// 描 述:PartyCate
/// </summary>
public class PartyCateService : RepositoryFactory
{
#region 构造函数和属性

private string fieldSql;
/// <summary>
/// 构造方法
/// </summary>
public PartyCateService()
{
fieldSql=@"
t.ID,
t.Name,
t.CType,
t.CParentId,
t.COrder,
t.Creator,
t.Createtime
";
}
#endregion

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<PartyCateEntity> GetList( string queryJson )
{
try
{
//参考写法
//var queryParam = queryJson.ToJObject();
// 虚拟参数
//var dp = new DynamicParameters(new { });
//dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(fieldSql);
strSql.Append(" FROM PartyCate t ");
return this.BaseRepository("CollegeMIS").FindList<PartyCateEntity>(strSql.ToString());
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<PartyCateEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(fieldSql);
strSql.Append(" FROM PartyCate t ");
return this.BaseRepository("CollegeMIS").FindList<PartyCateEntity>(strSql.ToString(), pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public PartyCateEntity GetEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<PartyCateEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<PartyCateEntity>(t=>t.ID == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// </summary>
public void SaveEntity(string keyValue, PartyCateEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

Carregando…
Cancelar
Salvar