Pārlūkot izejas kodu

奖/助学金启用 禁用

中职版本
edy pirms 3 gadiem
vecāks
revīzija
28d58b76bd
17 mainītis faili ar 1299 papildinājumiem un 0 dzēšanām
  1. +167
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipController.cs
  2. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Form.cshtml
  3. +57
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Form.js
  4. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/FormZxj.cshtml
  5. +57
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/FormZxj.js
  6. +46
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Index.cshtml
  7. +128
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Index.js
  8. +46
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.cshtml
  9. +128
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.js
  10. +9
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  11. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScholarshipMap.cs
  12. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  13. +176
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipBLL.cs
  14. +70
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipEntity.cs
  15. +62
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipIBLL.cs
  16. +265
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipService.cs
  17. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 167
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipController.cs Parādīt failu

@@ -0,0 +1,167 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;
using System.Linq;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-09-27 10:33
/// 描 述:学金类型
/// </summary>
public class ScholarshipController : MvcControllerBase
{
private ScholarshipIBLL scholarshipIBLL = new ScholarshipBLL();

#region 视图功能

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


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

#region 获取数据

/// <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 = scholarshipIBLL.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 ScholarshipData = scholarshipIBLL.GetScholarshipEntity(keyValue);
var jsonData = new
{
Scholarship = ScholarshipData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
scholarshipIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
ScholarshipEntity entity = strEntity.ToObject<ScholarshipEntity>();
var Lists = scholarshipIBLL.NameOrCode(entity.ItemName, entity.ItemCode, entity.IsValid);
if (string.IsNullOrEmpty(keyValue))
{
if (Lists != null)
{
return Fail("添加失败!名称或编码已存在");
}
}
else
{
if (Lists.Id.Contains(keyValue))
{
return Fail("添加失败!名称或编码已存在");
}
}
scholarshipIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
#endregion

#region 扩展数据
/// <summary>
/// 启用/禁用
/// </summary>
/// <param name="keyValue"></param>
/// <param name="status"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]

public ActionResult EnableDisable(string keyValue, string status)
{
scholarshipIBLL.EnableDisable(keyValue, status);
return Success("操作成功!");
}
#endregion
}
}

+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Form.cshtml Parādīt failu

@@ -0,0 +1,27 @@
@{
ViewBag.Title = "学金类型";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Scholarship" >
<div class="lr-form-item-title">奖学金名称<font face="宋体">*</font></div>
<input id="ItemName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Scholarship" >
<div class="lr-form-item-title">奖学金代码<font face="宋体">*</font></div>
<input id="ItemCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Scholarship" >
<div class="lr-form-item-title">状态<font face="宋体">*</font></div>
<div id="IsValid" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Scholarship" style="display: none; " >
<div class="lr-form-item-title">是否删除</div>
<input id="IsDel" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Scholarship" style="display: none; " >
<div class="lr-form-item-title">学金类型</div>
<input id="IsType" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarship/Form.js")

+ 57
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Form.js Parādīt failu

@@ -0,0 +1,57 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-09-27 10:33
* 描 述:学金类型
*/
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 () {
$('#IsValid').lrselect({
data: [{ text: "启用", value: "0" }, { text: "禁用", value: "1" }],
text: "text",
value: "value"
})
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/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]);
}
}
});
}
$('#IsDel').val('0');
$('#IsType').val('0');
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/FormZxj.cshtml Parādīt failu

@@ -0,0 +1,27 @@
@{
ViewBag.Title = "学金类型";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Scholarship" >
<div class="lr-form-item-title">助学金名称<font face="宋体">*</font></div>
<input id="ItemName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Scholarship" >
<div class="lr-form-item-title">助学金代码<font face="宋体">*</font></div>
<input id="ItemCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Scholarship" >
<div class="lr-form-item-title">状态<font face="宋体">*</font></div>
<div id="IsValid" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Scholarship" style="display: none; " >
<div class="lr-form-item-title">是否删除</div>
<input id="IsDel" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Scholarship" style="display: none; " >
<div class="lr-form-item-title">学金类型</div>
<input id="IsType" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarship/FormZxj.js")

+ 57
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/FormZxj.js Parādīt failu

@@ -0,0 +1,57 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-09-27 10:33
* 描 述:学金类型
*/
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 () {
$('#IsValid').lrselect({
data: [{ text: "启用", value: "0" }, { text: "禁用", value: "1" }],
text: "text",
value: "value"
})
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/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]);
}
}
});
}
$('#IsDel').val('0');
$('#IsType').val('1');
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 46
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Index.cshtml Parādīt failu

@@ -0,0 +1,46 @@
@{
ViewBag.Title = "学金类型";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">奖学金名称</div>
<input id="ItemName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">奖学金代码</div>
<input id="ItemCode" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">状态</div>
<div id="IsVaild"></div>
</div>
</div>
</div>
</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>
<a id="lr_enabled" class="btn btn-default"><i class="fa fa-lrlt"></i>&nbsp;启用</a>
<a id="lr_disabled" class="btn btn-default"><i class="fa fa-lrlt"></i>&nbsp;禁用</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarship/Index.js")

+ 128
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Index.js Parādīt failu

@@ -0,0 +1,128 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-09-27 10:33
* 描 述:学金类型
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#IsValid').lrselect({
data: [{ text: "启用", value: "0" }, { text: "禁用", value: "1" }],
text: "text",
value: "value"
})
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/Form?keyValue=' + keyValue,
width: 600,
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 + '/EducationalAdministration/Scholarship/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
});
}
});
}
});
//启用
$('#lr_enabled').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认启用选择项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/EnableDisable', { keyValue: keyValue, status: "0" }, function () {
refreshGirdData();
});
}
});
}
});
//禁用
$('#lr_disabled').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认禁用选择项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/EnableDisable', { keyValue: keyValue, status: "1" }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/GetPageList',
headData: [
{ label: "奖学金名称", name: "ItemName", width: 200, align: "left"},
{ label: "奖学金代码", name: "ItemCode", width: 200, align: "left"},
{
label: '状态', name: 'IsValid', width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == "0" ? "<span class=\"label label-success\">启用</span>" :
"<span class=\"label label-danger\">禁用</span>";
}
},
],
mainId:'Id',
isMultiselect: true,//复选框
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
param.IsType = '0'
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 46
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.cshtml Parādīt failu

@@ -0,0 +1,46 @@
@{
ViewBag.Title = "学金类型";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">助学金名称</div>
<input id="ItemName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">助学金代码</div>
<input id="ItemCode" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">状态</div>
<div id="IsVaild"></div>
</div>
</div>
</div>
</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>
<a id="lr_enabled" class="btn btn-default"><i class="fa fa-lrlt"></i>&nbsp;启用</a>
<a id="lr_disabled" class="btn btn-default"><i class="fa fa-lrlt"></i>&nbsp;禁用</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.js")

+ 128
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.js Parādīt failu

@@ -0,0 +1,128 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-09-27 10:33
* 描 述:学金类型
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#IsValid').lrselect({
data: [{ text: "启用", value: "0" }, { text: "禁用", value: "1" }],
text: "text",
value: "value"
})
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/FormZxj',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/FormZxj?keyValue=' + keyValue,
width: 600,
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 + '/EducationalAdministration/Scholarship/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//启用
$('#lr_enabled').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认启用选择项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/EnableDisable', { keyValue: keyValue, status: "0" }, function () {
refreshGirdData();
});
}
});
}
});
//禁用
$('#lr_disabled').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认禁用选择项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/EnableDisable', { keyValue: keyValue, status: "1" }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/GetPageList',
headData: [
{ label: "助学金名称", name: "ItemName", width: 200, align: "left" },
{ label: "助学金代码", name: "ItemCode", width: 200, align: "left" },
{
label: '状态', name: 'IsValid', width: 200, align: "left",
formatter: function (cellvalue) {
return cellvalue == "0" ? "<span class=\"label label-success\">启用</span>" :
"<span class=\"label label-danger\">禁用</span>";
}
},
],
mainId: 'Id',
isMultiselect: true,//复选框
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
param.IsType = '1'
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 9
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Parādīt failu

@@ -812,6 +812,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\StuInfoSemsterController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\AwardAndPunishmentController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\AwardPunishInfoController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\ScholarshipController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -975,6 +976,8 @@
<Content Include="Areas\EducationalAdministration\Views\R_EnterSchool\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\R_EnterSchool\DeptReport.js" />
<Content Include="Areas\EducationalAdministration\Views\R_EnterSchool\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Scholarship\FormZxj.js" />
<Content Include="Areas\EducationalAdministration\Views\Scholarship\IndexZxj.js" />
<Content Include="Areas\EducationalAdministration\Views\ScoreStatistics\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\ScoreStatistics\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\StuAttendanceLeave\IndexInStudent.js" />
@@ -6386,6 +6389,10 @@
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Scholarship\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Scholarship\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Scholarship\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Scholarship\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\LR_Desktop\Models\" />
@@ -7189,6 +7196,8 @@
<Content Include="Areas\EducationalAdministration\Views\AwardAndPunishment\AwardForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\AwardForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\AwardIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Scholarship\FormZxj.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Scholarship\IndexZxj.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" />


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScholarshipMap.cs Parādīt failu

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-09-27 10:33
/// 描 述:学金类型
/// </summary>
public class ScholarshipMap : EntityTypeConfiguration<ScholarshipEntity>
{
public ScholarshipMap()
{
#region 表、主键
//表
this.ToTable("SCHOLARSHIP");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Parādīt failu

@@ -562,6 +562,7 @@
<Compile Include="EducationalAdministration\StuInfoSemsterMap.cs" />
<Compile Include="EducationalAdministration\AwardAndPunishmentMap.cs" />
<Compile Include="EducationalAdministration\AwardPunishInfoMap.cs" />
<Compile Include="EducationalAdministration\ScholarshipMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 176
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipBLL.cs Parādīt failu

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-09-27 10:33
/// 描 述:学金类型
/// </summary>
public class ScholarshipBLL : ScholarshipIBLL
{
private ScholarshipService scholarshipService = new ScholarshipService();

#region 获取数据

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

/// <summary>
/// 获取Scholarship表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public ScholarshipEntity GetScholarshipEntity(string keyValue)
{
try
{
return scholarshipService.GetScholarshipEntity(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
{
scholarshipService.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>
/// <returns></returns>
public void SaveEntity(string keyValue, ScholarshipEntity entity)
{
try
{
scholarshipService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 扩展数据
/// <summary>
/// 获取CdLessonSort表实体数据
/// <param name="lessonSortNo">分类编号</param>
/// <summary>
/// <returns></returns>
public ScholarshipEntity NameOrCode(string ItemName ,string ItemCode,int? IsType)
{
try
{
return scholarshipService.NameOrCode(ItemName,ItemCode,IsType);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 启用和禁用
/// <summary>
/// 注册 and 取消注册
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void EnableDisable(string keyValue, string status)
{
try
{
scholarshipService.EnableDisable(keyValue, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
}
}

+ 70
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipEntity.cs Parādīt failu

@@ -0,0 +1,70 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-09-27 10:33
/// 描 述:学金类型
/// </summary>
public class ScholarshipEntity
{
#region 实体成员
/// <summary>
/// Id
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// ItemName
/// </summary>
[Column("ITEMNAME")]
public string ItemName { get; set; }
/// <summary>
/// ItemCode
/// </summary>
[Column("ITEMCODE")]
public string ItemCode { get; set; }
/// <summary>
/// 0启用 1 禁用
/// </summary>
[Column("ISVALID")]
public int? IsValid { get; set; }
/// <summary>
/// 0未删除 1 已删除
/// </summary>
[Column("ISDEL")]
public int? IsDel { get; set; }
/// <summary>
/// 0 奖学金 1助学金
/// </summary>
[Column("ISTYPE")]
public int? IsType { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 62
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipIBLL.cs Parādīt failu

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-09-27 10:33
/// 描 述:学金类型
/// </summary>
public interface ScholarshipIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ScholarshipEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取Scholarship表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
ScholarshipEntity GetScholarshipEntity(string keyValue);

/// <summary>
///获取重复数据
/// </summary>
/// <param name="NameOrCode"></param>
/// <returns></returns>
ScholarshipEntity NameOrCode(string ItemName, string ItemCode, int? IsType);

#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, ScholarshipEntity entity);
#endregion

/// <summary>
/// 启用和禁用
/// </summary>
/// <param name="keyValue"></param>
/// <param name="status"></param>
void EnableDisable(string keyValue,string status);
}
}

+ 265
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipService.cs Parādīt failu

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-09-27 10:33
/// 描 述:学金类型
/// </summary>
public class ScholarshipService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ScholarshipEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" * ");
strSql.Append(" FROM Scholarship t ");
strSql.Append(" WHERE 1=1 and IsDel ='0' ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["ItemName"].IsEmpty())
{
dp.Add("ItemName", "%" + queryParam["ItemName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.ItemName Like @ItemName ");
}

if (!queryParam["ItemCode"].IsEmpty())
{
dp.Add("ItemCode", "%" + queryParam["ItemCode"].ToString() + "%", DbType.String);
strSql.Append(" AND t.ItemCode Like @ItemCode ");
}

if (!queryParam["IsValid"].IsEmpty())
{
dp.Add("IsValid", queryParam["IsValid"].ToString(), DbType.String);
strSql.Append(" AND t.IsValid = @IsValid ");
}

if (!queryParam["IsType"].IsEmpty())
{
dp.Add("IsType", queryParam["IsType"].ToString(), DbType.String);
strSql.Append(" AND t.IsType = @IsType ");
}

return this.BaseRepository("CollegeMIS").FindList<ScholarshipEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取Scholarship表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public ScholarshipEntity GetScholarshipEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<ScholarshipEntity>(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)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var IdList = keyValue.Split(',');
foreach (var item in IdList)
{
var entity = db.FindEntity<ScholarshipEntity>(x => x.Id == item);
entity.IsDel = 1;
db.Update(entity);
}

db.Commit();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, ScholarshipEntity 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

#region 扩展数据

#region 判断重复
/// <summary>
/// 判断重复
/// </summary>
/// <param name="ItemName">名称</param>
/// <param name="ItemCode">编码</param>
/// <param name="IsType">类型</param>
/// <returns></returns>
public ScholarshipEntity NameOrCode(string ItemName, string ItemCode, int? IsType)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<ScholarshipEntity>(x =>
(x.ItemCode == ItemCode || x.ItemName == ItemName) && x.IsValid == IsType && x.IsDel == 0);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 启用和禁用

/// <summary>
/// 启用和禁用
/// </summary>
/// <param name="keyValue"></param>
/// <param name="status"></param>
public void EnableDisable(string keyValue, string status)
{
var db = BaseRepository("CollegeMIS").BeginTrans();
try
{
List<string> Ids = keyValue.Split(',').ToList();
List<ScholarshipEntity> ScholList = new List<ScholarshipEntity>();
if (status == "1")
{
foreach (var item in Ids)
{
var list = this.BaseRepository("CollegeMIS").FindEntity<ScholarshipEntity>(x => x.Id == item);
if (list != null)
{
list.IsValid = 1;
ScholList.Add(list);
}
}
}
else
{
foreach (var item in Ids)
{
var list = this.BaseRepository("CollegeMIS").FindEntity<ScholarshipEntity>(x => x.Id == item);
if (list != null)
{
list.IsValid = 0;
ScholList.Add(list);
}
}
}

db.Update(ScholList);
db.Commit();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}

}
#endregion

#endregion
}
}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Parādīt failu

@@ -1666,6 +1666,10 @@
<Compile Include="EducationalAdministration\AwardPunishInfo\AwardPunishInfoService.cs" />
<Compile Include="EducationalAdministration\AwardPunishInfo\AwardPunishInfoBLL.cs" />
<Compile Include="EducationalAdministration\AwardPunishInfo\AwardPunishInfoIBLL.cs" />
<Compile Include="EducationalAdministration\Scholarship\ScholarshipEntity.cs" />
<Compile Include="EducationalAdministration\Scholarship\ScholarshipService.cs" />
<Compile Include="EducationalAdministration\Scholarship\ScholarshipBLL.cs" />
<Compile Include="EducationalAdministration\Scholarship\ScholarshipIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


Notiek ielāde…
Atcelt
Saglabāt