@@ -3,6 +3,7 @@ using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -26,7 +27,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -35,7 +36,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
#endregion | |||
@@ -82,8 +83,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var DtStuLeaveData = dtStuLeaveIBLL.GetDtStuLeaveEntity( keyValue ); | |||
var jsonData = new { | |||
var DtStuLeaveData = dtStuLeaveIBLL.GetDtStuLeaveEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
DtStuLeave = DtStuLeaveData, | |||
}; | |||
return Success(jsonData); | |||
@@ -115,10 +117,60 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
DtStuLeaveEntity entity = strEntity.ToObject<DtStuLeaveEntity>(); | |||
dtStuLeaveIBLL.SaveEntity(keyValue,entity); | |||
entity.FlowNo = "0"; | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.LeaveAddTime = DateTime.Now; | |||
} | |||
dtStuLeaveIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
#region MyRegion | |||
/// <summary> | |||
/// 提交数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult SubmitList(string keyValue) | |||
{ | |||
var Model = dtStuLeaveIBLL.GetDtStuLeaveEntity(keyValue); | |||
if (Model != null) | |||
{ | |||
Model.FlowNo = "1"; | |||
dtStuLeaveIBLL.SaveEntity(keyValue, Model); | |||
} | |||
return Success("提交成功!"); | |||
} | |||
#endregion | |||
#region 教师审核 | |||
/// <summary> | |||
/// 提交数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult TeacherAudit(string keyValue) | |||
{ | |||
var Model = dtStuLeaveIBLL.GetDtStuLeaveEntity(keyValue); | |||
if (Model != null) | |||
{ | |||
Model.FlowNo = "2"; | |||
dtStuLeaveIBLL.SaveEntity(keyValue, Model); | |||
} | |||
return Success("审核成功!"); | |||
} | |||
#endregion | |||
#endregion | |||
} | |||
} |
@@ -4,11 +4,11 @@ | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-6 lr-form-item" data-table="DtStuLeave" > | |||
<div class="lr-form-item-title">所属系<font face="宋体">*</font></div> | |||
<div class="lr-form-item-title">所 属 系<font face="宋体">*</font></div> | |||
<div id="CreateUserDeptNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DtStuLeave" > | |||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | |||
<div class="lr-form-item-title">班 级<font face="宋体">*</font></div> | |||
<div id="CreateUserClassNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DtStuLeave" > | |||
@@ -16,7 +16,7 @@ | |||
<input id="CreateUserName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DtStuLeave" > | |||
<div class="lr-form-item-title">申请类型<font face="宋体">*</font></div> | |||
<div class="lr-form-item-title">请假类型<font face="宋体">*</font></div> | |||
<div id="LeaveType" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DtStuLeave" > | |||
@@ -15,18 +15,35 @@ var bootstrap = function ($, learun) { | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#CreateUserDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); | |||
$('#CreateUserClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' }); | |||
$('#LeaveType').lrDataSourceSelect({ code: 'StuLeaveType', value: 'typeno', text: 'typename' }); | |||
$('#CreateUserDeptNo').lrDataSourceSelect({ | |||
code: 'CdDeptInfo', | |||
value: 'deptno', | |||
text: 'deptname', | |||
maxHeight: 200, | |||
select: function (item) { | |||
var ClassNo = $("#CreateUserDeptNo").lrselectGet(); | |||
if (ClassNo != null && ClassNo != "" && ClassNo != undefined) { | |||
$('#CreateUserClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: " 1=1 and deptno in (" + ClassNo + ")" }, | |||
value: "classno", | |||
text: "classname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}); | |||
$("#CreateUserClassNo").lrselect(); | |||
$('#CreateUserName')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||
$('#CreateUserName').val(learun.clientdata.get(['userinfo']).realName); | |||
$('#LeaveType').lrDataItemSelect({ code: 'LeaveType' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/DtStuLeave/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]); | |||
@@ -31,9 +31,11 @@ | |||
<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> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-lock"></i> 提交</a> | |||
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 审核</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -16,9 +16,26 @@ var bootstrap = function ($, learun) { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#CreateUserDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); | |||
$('#CreateUserClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' }); | |||
$('#LeaveType').lrDataItemSelect({ code: 'LeaveType' }); | |||
$('#LeaveType').lrDataSourceSelect({ code: 'StuLeaveType', value: 'typeno', text: 'typename' }); | |||
$('#CreateUserDeptNo').lrDataSourceSelect({ | |||
code: 'CdDeptInfo', | |||
value: 'deptno', | |||
text: 'deptname', | |||
maxHeight: 200, | |||
select: function (item) { | |||
var ClassNo = $("#CreateUserDeptNo").lrselectGet(); | |||
if (ClassNo != null && ClassNo != "" && ClassNo != undefined) { | |||
$('#CreateUserClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: " 1=1 and deptno in (" + ClassNo + ")" }, | |||
value: "classno", | |||
text: "classname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}); | |||
$("#CreateUserClassNo").lrselect(); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -58,7 +75,7 @@ var bootstrap = function ($, learun) { | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/DtStuLeave/DeleteForm', { keyValue: keyValue}, function () { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/DtStuLeave/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
@@ -71,60 +88,89 @@ var bootstrap = function ($, learun) { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/DtStuLeave/GetPageList', | |||
headData: [ | |||
{ label: "所属系", name: "CreateUserDeptNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
}}, | |||
{ label: "班级", name: "CreateUserClassNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
}}, | |||
{ label: "申请用户", name: "CreateUserName", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsync('user', { | |||
key: value, | |||
callback: function (_data) { | |||
callback(_data.name); | |||
} | |||
}); | |||
}}, | |||
{ label: "申请类型", name: "LeaveType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'LeaveType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
}}, | |||
{ label: "开始时间", name: "BeginDate", width: 200, align: "left"}, | |||
{ label: "结束时间", name: "EndDate", width: 200, align: "left"}, | |||
{ label: "申请理由", name: "LeaveReason", width: 100, align: "left"}, | |||
{ label: "流程Id", name: "processId", width: 100, align: "left"}, | |||
{ | |||
label: "所属系", name: "CreateUserDeptNo", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "班级", name: "CreateUserClassNo", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "申请用户", name: "CreateUserName", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('user', { | |||
key: value, | |||
callback: function (_data) { | |||
callback(_data.name); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "当前时间", name: "LeaveAddTime", width: 200, align: "left" }, | |||
{ | |||
label: "请假类型", name: "LeaveType", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuLeaveType', | |||
key: value, | |||
keyId: 'typeno', | |||
callback: function (_data) { | |||
callback(_data['typename']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "开始时间", name: "BeginDate", width: 200, align: "left" }, | |||
{ label: "结束时间", name: "EndDate", width: 200, align: "left" }, | |||
{ label: "申请理由", name: "LeaveReason", width: 350, align: "left" }, | |||
{ | |||
label: "当前状态", name: "FlowNo", width: 50, align: "center", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 0) { | |||
return '<span class=\"label label-primary\">草稿</span>'; | |||
} | |||
else if (cellvalue == 1) { | |||
return '<span class=\"label label-warning\">审批中</span>'; | |||
} | |||
else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\">请假中</span>'; | |||
} | |||
else if (cellvalue == 3) { | |||
return '<span class=\"label label-default\">已销假</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "流程Id", name: "processId", width: 100, align: "left" | |||
}, | |||
], | |||
mainId:'Id', | |||
mainId: 'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
@@ -0,0 +1,117 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.StudentWork; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.StudentWork.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-07-26 15:41 | |||
/// 描 述:奖学金可申请名单 | |||
/// </summary> | |||
public class SW_Ask_StudentController : MvcControllerBase | |||
{ | |||
private SW_Ask_StudentIBLL sW_Ask_StudentIBLL = new SW_Ask_StudentBLL(); | |||
#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="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = sW_Ask_StudentIBLL.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 SW_Ask_StudentData = sW_Ask_StudentIBLL.GetSW_Ask_StudentEntity( keyValue ); | |||
var jsonData = new { | |||
SW_Ask_Student = SW_Ask_StudentData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
sW_Ask_StudentIBLL.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) | |||
{ | |||
SW_Ask_StudentEntity entity = strEntity.ToObject<SW_Ask_StudentEntity>(); | |||
sW_Ask_StudentIBLL.SaveEntity(keyValue,entity); | |||
if (keyValue != null) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,19 @@ | |||
@{ | |||
ViewBag.Title = "奖学金可申请名单"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="SW_Ask_Student" > | |||
<div class="lr-form-item-title">所属系<font face="宋体">*</font></div> | |||
<div id="UserDeptNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SW_Ask_Student" > | |||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | |||
<div id="UserClassNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SW_Ask_Student" > | |||
<div class="lr-form-item-title">学生<font face="宋体">*</font></div> | |||
<div id="StuName" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/StudentWork/Views/SW_Ask_Student/Form.js") |
@@ -0,0 +1,84 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-07-26 15:41 | |||
* 描 述:奖学金可申请名单 | |||
*/ | |||
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 () { | |||
$('#UserDeptNo').lrDataSourceSelect({ | |||
code: 'CdDeptInfo', | |||
value: 'deptno', | |||
text: 'deptname', | |||
maxHeight: 200, | |||
select: function (item) { | |||
var DeptNo = $("#UserDeptNo").lrselectGet(); | |||
if (DeptNo != null && DeptNo != "" && DeptNo != undefined) { | |||
$('#UserClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: " 1=1 and deptno in (" + DeptNo + ")" }, | |||
value: "classno", | |||
text: "classname", | |||
maxHeight: 200, | |||
select: function (item) { | |||
var ClassNo = $("#UserClassNo").lrselectGet(); | |||
if (ClassNo != null && ClassNo != "" && ClassNo != undefined) { | |||
$('#StuName').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuList', | |||
param: { strWhere: " 1=1 and classno in (" + ClassNo + ")" }, | |||
value: "stuno", | |||
text: "stuname", | |||
maxHeight: 200, | |||
allowSearch: true | |||
}); | |||
} | |||
} | |||
//{ code: 'StuList', value: 'stuno', text: 'stuname' } | |||
}); | |||
} | |||
} | |||
}); | |||
$("#UserClassNo").lrselect(); | |||
$('#StuName').lrselect(); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/StudentWork/SW_Ask_Student/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 + '/StudentWork/SW_Ask_Student/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,44 @@ | |||
@{ | |||
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> | |||
<div id="UserDeptNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="UserClassNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学生</div> | |||
<div id="StuName"></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> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/StudentWork/Views/SW_Ask_Student/Index.js") |
@@ -0,0 +1,167 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-07-26 15:41 | |||
* 描 述:奖学金可申请名单 | |||
*/ | |||
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); | |||
$('#UserDeptNo').lrDataSourceSelect({ | |||
code: 'CdDeptInfo', | |||
value: 'deptno', | |||
text: 'deptname', | |||
maxHeight: 200, | |||
select: function (item) { | |||
var DeptNo = $("#UserDeptNo").lrselectGet(); | |||
if (DeptNo != null && DeptNo != "" && DeptNo != undefined) { | |||
$('#UserClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: " 1=1 and deptno in (" + DeptNo + ")" }, | |||
value: "classno", | |||
text: "classname", | |||
allowSearch: false, | |||
maxHeight: 200, | |||
select: function (item) { | |||
var ClassNo = $("#UserClassNo").lrselectGet(); | |||
if (ClassNo != null && ClassNo != "" && ClassNo != undefined) { | |||
$('#StuName').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuList', | |||
param: { strWhere: " 1=1 and classno in (" + ClassNo + ")" }, | |||
value: "stuno", | |||
text: "stuno", | |||
maxHeight: 200, | |||
allowSearch: true | |||
}); | |||
} | |||
} | |||
}); | |||
} else { | |||
$("#UserClassNo").lrselect(); | |||
} | |||
} | |||
}); | |||
$("#UserClassNo").lrselect(); | |||
$("#StuName").lrselect(); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/StudentWork/SW_Ask_Student/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('F_ItemId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/StudentWork/SW_Ask_Student/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('F_ItemId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/StudentWork/SW_Ask_Student/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/StudentWork/SW_Ask_Student/GetPageList', | |||
headData: [ | |||
{ | |||
label: "所属系", name: "UserDeptNo", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "班级", name: "UserClassNo", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "学生", name: "StuName", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', | |||
key: value, | |||
keyId: 'stuid', | |||
callback: function (_data) { | |||
callback(_data['stuname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "创建时间", name: "CreateTime", width: 200, align: "left" }, | |||
{ label: "创建用户", name: "CreateUserName", width: 200, align: "left" }, | |||
{ label: "备注", name: "DEMO", width: 300, align: "left" }, | |||
], | |||
mainId: 'F_ItemId', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.CreateTime = learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'); | |||
param.CreateUserId = learun.clientdata.get(['userinfo']).userId; | |||
param.CreateUserName = learun.clientdata.get(['userinfo']).realName; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -834,6 +834,7 @@ | |||
<Compile Include="Areas\CustomFunction\Controllers\VehicleAccidentController.cs" /> | |||
<Compile Include="Areas\CustomFunction\Controllers\FPServiceManageController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\DtStuTypeController.cs" /> | |||
<Compile Include="Areas\StudentWork\Controllers\SW_Ask_StudentController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -6505,6 +6506,10 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\DtStuType\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtStuType\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtStuType\Form.js" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Student\Index.cshtml" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Student\Index.js" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Student\Form.cshtml" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Student\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\LR_Desktop\Models\" /> | |||
@@ -583,6 +583,7 @@ | |||
<Compile Include="CustomFunction\VehicleAccidentMap.cs" /> | |||
<Compile Include="CustomFunction\FPServiceManageMap.cs" /> | |||
<Compile Include="EducationalAdministration\DtStuTypeMap.cs" /> | |||
<Compile Include="StudentWork\SW_Ask_StudentMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.StudentWork; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-07-26 15:41 | |||
/// 描 述:奖学金可申请名单 | |||
/// </summary> | |||
public class SW_Ask_StudentMap : EntityTypeConfiguration<SW_Ask_StudentEntity> | |||
{ | |||
public SW_Ask_StudentMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("SW_ASK_STUDENT"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -31,17 +31,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.CreateUserDeptNo, | |||
t.CreateUserClassNo, | |||
t.CreateUserName, | |||
t.LeaveType, | |||
t.BeginDate, | |||
t.EndDate, | |||
t.LeaveReason, | |||
t.processId | |||
"); | |||
strSql.Append(@" t.* "); | |||
strSql.Append(" FROM DtStuLeave t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
@@ -88,16 +78,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.CreateUserDeptNo, | |||
t.CreateUserClassNo, | |||
t.CreateUserName, | |||
t.LeaveType, | |||
t.BeginDate, | |||
t.EndDate, | |||
t.LeaveReason, | |||
t.processId | |||
"); | |||
strSql.Append(@" t.* "); | |||
strSql.Append(" FROM DtStuLeave t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
@@ -1750,6 +1750,10 @@ | |||
<Compile Include="EducationalAdministration\DtStuType\DtStuTypeService.cs" /> | |||
<Compile Include="EducationalAdministration\DtStuType\DtStuTypeBLL.cs" /> | |||
<Compile Include="EducationalAdministration\DtStuType\DtStuTypeIBLL.cs" /> | |||
<Compile Include="StudentWork\SW_Ask_Student\SW_Ask_StudentEntity.cs" /> | |||
<Compile Include="StudentWork\SW_Ask_Student\SW_Ask_StudentService.cs" /> | |||
<Compile Include="StudentWork\SW_Ask_Student\SW_Ask_StudentBLL.cs" /> | |||
<Compile Include="StudentWork\SW_Ask_Student\SW_Ask_StudentIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,125 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.StudentWork | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-07-26 15:41 | |||
/// 描 述:奖学金可申请名单 | |||
/// </summary> | |||
public class SW_Ask_StudentBLL : SW_Ask_StudentIBLL | |||
{ | |||
private SW_Ask_StudentService sW_Ask_StudentService = new SW_Ask_StudentService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<SW_Ask_StudentEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return sW_Ask_StudentService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取SW_Ask_Student表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public SW_Ask_StudentEntity GetSW_Ask_StudentEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return sW_Ask_StudentService.GetSW_Ask_StudentEntity(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 | |||
{ | |||
sW_Ask_StudentService.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, SW_Ask_StudentEntity entity) | |||
{ | |||
try | |||
{ | |||
sW_Ask_StudentService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,90 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.StudentWork | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-07-26 15:41 | |||
/// 描 述:奖学金可申请名单 | |||
/// </summary> | |||
public class SW_Ask_StudentEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 账户 | |||
/// </summary> | |||
[Column("ACCOUNT")] | |||
public string Account { get; set; } | |||
/// <summary> | |||
/// StuUser | |||
/// </summary> | |||
[Column("STUUSER")] | |||
public string StuUser { get; set; } | |||
/// <summary> | |||
/// StuName | |||
/// </summary> | |||
[Column("STUNAME")] | |||
public string StuName { get; set; } | |||
/// <summary> | |||
/// 系 | |||
/// </summary> | |||
[Column("USERDEPTNO")] | |||
public string UserDeptNo { get; set; } | |||
/// <summary> | |||
/// 班级 | |||
/// </summary> | |||
[Column("USERCLASSNO")] | |||
public string UserClassNo { get; set; } | |||
/// <summary> | |||
/// 创建用户 | |||
/// </summary> | |||
[Column("CREATEUSERID")] | |||
public string CreateUserId { get; set; } | |||
/// <summary> | |||
/// 创建人 | |||
/// </summary> | |||
[Column("CREATEUSERNAME")] | |||
public string CreateUserName { get; set; } | |||
/// <summary> | |||
/// 创建时间 | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("DEMO")] | |||
public string Demo { 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 | |||
} | |||
} | |||
@@ -0,0 +1,48 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.StudentWork | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-07-26 15:41 | |||
/// 描 述:奖学金可申请名单 | |||
/// </summary> | |||
public interface SW_Ask_StudentIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<SW_Ask_StudentEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取SW_Ask_Student表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
SW_Ask_StudentEntity GetSW_Ask_StudentEntity(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, SW_Ask_StudentEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,157 @@ | |||
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.StudentWork | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-07-26 15:41 | |||
/// 描 述:奖学金可申请名单 | |||
/// </summary> | |||
public class SW_Ask_StudentService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<SW_Ask_StudentEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" t.* "); | |||
strSql.Append(" FROM SW_Ask_Student t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["UserDeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("UserDeptNo",queryParam["UserDeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.UserDeptNo = @UserDeptNo "); | |||
} | |||
if (!queryParam["UserClassNo"].IsEmpty()) | |||
{ | |||
dp.Add("UserClassNo",queryParam["UserClassNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.UserClassNo = @UserClassNo "); | |||
} | |||
if (!queryParam["StuName"].IsEmpty()) | |||
{ | |||
dp.Add("StuName",queryParam["StuName"].ToString(), DbType.String); | |||
strSql.Append(" AND t.StuName = @StuName "); | |||
} | |||
return this.BaseRepository().FindList<SW_Ask_StudentEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取SW_Ask_Student表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public SW_Ask_StudentEntity GetSW_Ask_StudentEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindEntity<SW_Ask_StudentEntity>(keyValue.ToInt()); | |||
} | |||
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().Delete<SW_Ask_StudentEntity>(t=>t.Id == keyValue); | |||
} | |||
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, SW_Ask_StudentEntity entity) | |||
{ | |||
try | |||
{ | |||
if (keyValue != null) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository().Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository().Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -1637,7 +1637,7 @@ Global | |||
{E05A2B9A-A939-450F-9A44-A8B3201D055A} = {ED258CD0-0A0C-490B-9D8F-B4CEC4467251} | |||
EndGlobalSection | |||
GlobalSection(ExtensibilityGlobals) = postSolution | |||
SolutionGuid = {968C278F-4142-4DFF-96B0-B3D70A649451} | |||
EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35 | |||
SolutionGuid = {968C278F-4142-4DFF-96B0-B3D70A649451} | |||
EndGlobalSection | |||
EndGlobal |