@@ -0,0 +1 @@ | |||||
|
@@ -0,0 +1,22 @@ | |||||
<div class="lr-page lr-EducationalAdministrationLoginUserBind-page"> | |||||
<div class="lr-page-tool"> | |||||
<div class="lr-tool-left"> | |||||
总共<span class="lr-badge lr-badge-primary">0</span>条 | |||||
</div> | |||||
<div class="lr-tool-right"> | |||||
<div class="lr-tool-right-btn lr_multiple_search"> | |||||
<i class="iconfont icon-searchlist"></i> | |||||
<div class="lr-tool-right-btn-content lr-form-container"> | |||||
<div class="lr-form-row"> | |||||
<label>绑定账号</label> | |||||
<input id="BindUserAccount" type="text"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-page-content" id="lr_EducationalAdministrationLoginUserBind_list"></div> | |||||
<div class="lr-list-addbtn" id="lr_EducationalAdministrationLoginUserBind_btn"> | |||||
<i class="iconfont icon-add1"></i> | |||||
</div> | |||||
</div> |
@@ -0,0 +1,103 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-11-19 14:50 | |||||
* 描 述:多账号绑定 | |||||
*/ | |||||
(function () { | |||||
var begin = ''; | |||||
var end = ''; | |||||
var multipleData = null; | |||||
var page = { | |||||
grid: null, | |||||
init: function ($page) { | |||||
begin = ''; | |||||
end = ''; | |||||
multipleData = null; | |||||
page.grid = $page.find('#lr_EducationalAdministrationLoginUserBind_list').lrpagination({ | |||||
lclass: page.lclass, | |||||
rows: 10, // 每页行数 | |||||
getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调 | |||||
param.multipleData = multipleData; | |||||
page.loadData(param, callback, $page); | |||||
}, | |||||
renderData: function (_index, _item, _$item) {// 渲染数据模板 | |||||
return page.rowRender(_index, _item, _$item, $page); | |||||
}, | |||||
click: function (item, $item, $et) {// 列表行点击事件 | |||||
if ($et.hasClass('lr-btn-danger')) { | |||||
page.btnClick(item, $item, $page); | |||||
} | |||||
else { | |||||
page.rowClick(item, $item, $page); | |||||
} | |||||
}, | |||||
btns: page.rowBtns | |||||
}); | |||||
// 多条件查询 | |||||
var $multiple = $page.find('.lr_multiple_search').multiplequery({ | |||||
callback: function (data) { | |||||
begin = ''; | |||||
end = ''; | |||||
multipleData = data || {}; | |||||
page.grid.reload(); | |||||
} | |||||
}); | |||||
$page.find('#lr_EducationalAdministrationLoginUserBind_btn').on('tap', function () { | |||||
learun.nav.go({ path: 'EducationalAdministration/LoginUserBind/form', title: '新增', type: 'right' }); | |||||
}); | |||||
}, | |||||
lclass: 'lr-list', | |||||
loadData: function (param, callback, $page) {// 列表加载后台数据 | |||||
var _postParam = { | |||||
pagination: { | |||||
rows: param.rows, | |||||
page: param.page, | |||||
sidx: 'Id', | |||||
sord: 'DESC' | |||||
}, | |||||
queryJson: '{}' | |||||
}; | |||||
if (param.multipleData) { | |||||
_postParam.queryJson = JSON.stringify(multipleData); | |||||
} | |||||
if (param.begin && param.end) { | |||||
_postParam.queryJson = JSON.stringify({ StartTime: param.begin, EndTime: param.end }); | |||||
} | |||||
learun.httpget(config.webapi + 'learun/EducationalAdministration/LoginUserBind/pagelist', _postParam, (data) => { | |||||
$page.find('.lr-badge').text('0'); | |||||
if (data) { | |||||
$page.find('.lr-badge').text(data.records); | |||||
callback(data.rows, parseInt(data.records)); | |||||
} | |||||
else { | |||||
callback([], 0); | |||||
} | |||||
}); | |||||
}, | |||||
rowRender: function (_index, _item, _$item, $page) {// 渲染列表行数据 | |||||
_$item.addClass('lr-list-item lr-list-item-multi'); | |||||
_$item.append($('<p class="lr-ellipsis"><span>绑定账号:</span></p>').dataFormatter({ value: _item.BindUserAccount })); | |||||
_$item.append($('<p class="lr-ellipsis"><span>绑定密码:</span></p>').dataFormatter({ value: _item.BindUserPassword })); | |||||
return ''; | |||||
}, | |||||
rowClick: function (item, $item, $page) {// 列表行点击触发方法 | |||||
learun.nav.go({ path: 'EducationalAdministration/LoginUserBind/form', title: '详情', type: 'right', param: { keyValue: item.Id } }); | |||||
}, | |||||
btnClick: function (item, $item, $page) {// 左滑按钮点击事件 | |||||
learun.layer.confirm('确定要删除该笔数据吗?', function (_index) { | |||||
if (_index === '1') { | |||||
learun.layer.loading(true, '正在删除该笔数据'); | |||||
learun.httppost(config.webapi + 'learun/EducationalAdministration/LoginUserBind/delete', item.Id, (data) => { | |||||
if (data) {// 删除数据成功 | |||||
page.grid.reload(); | |||||
} | |||||
learun.layer.loading(false); | |||||
}); | |||||
} | |||||
}, 'Learun智慧校园提示', ['取消', '确定']); | |||||
}, | |||||
rowBtns: ['<a class="lr-btn-danger">删除</a>'] // 列表行左滑按钮 | |||||
}; | |||||
return page; | |||||
})(); |
@@ -0,0 +1 @@ | |||||
|
@@ -0,0 +1,12 @@ | |||||
<div class="lr-form-container"> | |||||
<div class="lr-form-row " data-table="LoginUserBind"> | |||||
<font face="宋体">*</font> | |||||
<label>绑定账号</label> | |||||
<input id="BindUserAccount" type="text" isvalid="yes" checkexpession="NotNull" errormsg="绑定账号" /> | |||||
</div> | |||||
<div class="lr-form-row " data-table="LoginUserBind"> | |||||
<font face="宋体">*</font> | |||||
<label>绑定密码</label> | |||||
<input id="BindUserPassword" type="text" isvalid="yes" checkexpession="NotNull" errormsg="绑定密码" /> | |||||
</div> | |||||
</div> |
@@ -0,0 +1,144 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-11-19 14:50 | |||||
* 描 述:多账号绑定 | |||||
*/ | |||||
(function () { | |||||
var keyValue = ''; | |||||
var $header = null; | |||||
var titleText = ''; | |||||
var page = { | |||||
isScroll: true, | |||||
init: function ($page, param) { | |||||
keyValue = param.keyValue; | |||||
// 添加头部按钮列表 | |||||
var _html = '\ | |||||
< div class="lr-form-header-cancel" > 取消</div >\ | |||||
<div class="lr-form-header-btnlist" >\ | |||||
<div class="lr-form-header-more" ><i class="iconfont icon-more" ></i></div>\ | |||||
<div class="lr-form-header-edit" ><i class="iconfont icon-edit" ></i></div>\ | |||||
</div>\ | |||||
<div class="lr-form-header-submit" >提交</div>'; | |||||
$header = $page.parents('.f-page').find('.f-page-header'); | |||||
$header.append(_html); | |||||
// 取消 | |||||
$header.find('.lr-form-header-cancel').on('tap', function () { | |||||
learun.layer.confirm('确定要退出当前编辑?', function (_index) { | |||||
if (_index === '1') { | |||||
if (keyValue) {// 如果是编辑状态 | |||||
learun.formblur(); | |||||
$header.find('.lr-form-header-cancel').hide(); | |||||
$header.find('.lr-form-header-submit').hide(); | |||||
$header.find('.lr-form-header-btnlist').show(); | |||||
$header.find('.f-page-title').text(titleText); | |||||
$page.find('.lr-form-container').setFormRead(); | |||||
} | |||||
else {// 如果是新增状态 关闭当前页面 | |||||
learun.nav.closeCurrent(); | |||||
} | |||||
} | |||||
}, 'learun智慧校园提示', ['取消', '确定']); | |||||
}); | |||||
// 编辑 | |||||
$header.find('.lr-form-header-edit').on('tap', function () { | |||||
$header.find('.lr-form-header-btnlist').hide(); | |||||
$header.find('.lr-form-header-cancel').show(); | |||||
$header.find('.lr-form-header-submit').show(); | |||||
titleText = $header.find('.f-page-title').text(); | |||||
$header.find('.f-page-title').text('编辑'); | |||||
$page.find('.lr-form-container').setFormWrite(); | |||||
}); | |||||
// 更多 | |||||
$header.find('.lr-form-header-more').on('tap', function () { | |||||
learun.actionsheet({ | |||||
id: 'more', | |||||
data: [ | |||||
{ | |||||
text: '删除', | |||||
mark: true, | |||||
event: function () {// 删除当前条信息 | |||||
learun.layer.confirm('确定要删除该笔数据吗?', function (_index) { | |||||
if (_index === '1') { | |||||
learun.layer.loading(true, '正在删除该笔数据'); | |||||
learun.httppost(config.webapi + 'learun/EducationalAdministration/LoginUserBind/delete', keyValue, (data) => { | |||||
learun.layer.loading(false); | |||||
if (data) {// 删除数据成功 | |||||
learun.nav.closeCurrent(); | |||||
var prepage = learun.nav.getpage('EducationalAdministration/LoginUserBind'); | |||||
prepage.grid.reload(); | |||||
} | |||||
}); | |||||
} | |||||
}, 'Learun智慧校园提示', ['取消', '确定']); | |||||
} | |||||
} | |||||
], | |||||
cancel: function () { | |||||
} | |||||
}); | |||||
}); | |||||
// 提交 | |||||
$header.find('.lr-form-header-submit').on('tap', function () { | |||||
// 获取表单数据 | |||||
if (!$page.find('.lr-form-container').lrformValid()) { | |||||
return false; | |||||
} | |||||
var _postData = {} | |||||
_postData.keyValue = keyValue; | |||||
_postData.strEntity = JSON.stringify($page.find('.lr-form-container').lrformGet()); | |||||
learun.layer.loading(true, '正在提交数据'); | |||||
learun.httppost(config.webapi + 'learun/EducationalAdministration/LoginUserBind/save', _postData, (data) => { | |||||
learun.layer.loading(false); | |||||
if (data) {// 表单数据保存成功 | |||||
if (keyValue) { | |||||
learun.layer.toast('保存数据成功!'); | |||||
learun.formblur(); | |||||
$header.find('.lr-form-header-cancel').hide(); | |||||
$header.find('.lr-form-header-submit').hide(); | |||||
$header.find('.lr-form-header-btnlist').show(); | |||||
$header.find('.f-page-title').text(titleText); | |||||
$page.find('.lr-form-container').setFormRead(); | |||||
} | |||||
else {// 如果是 | |||||
learun.nav.closeCurrent(); | |||||
} | |||||
var prepage = learun.nav.getpage('EducationalAdministration/LoginUserBind'); | |||||
prepage.grid.reload(); | |||||
} | |||||
}); | |||||
}); | |||||
page.bind($page, param); | |||||
if (keyValue) { | |||||
// 添加编辑按钮 | |||||
$page.find('.lr-form-container').setFormRead(); | |||||
$header.find('.lr-form-header-btnlist').show(); | |||||
// 获取表单数据 | |||||
learun.layer.loading(true, '获取表单数据'); | |||||
learun.httpget(config.webapi + 'learun/EducationalAdministration/LoginUserBind/form', keyValue, (data) => { | |||||
if (data) { | |||||
for (var id in data) { | |||||
if (data[id].length) { | |||||
$page.find('#' + id).lrgridSet(data[id]); | |||||
} | |||||
else { | |||||
$page.find('[data-table="' + id + '"]').lrformSet(data[id]); | |||||
} | |||||
} | |||||
} | |||||
learun.layer.loading(false); | |||||
}); | |||||
} | |||||
else { | |||||
$header.find('.lr-form-header-cancel').show(); | |||||
$header.find('.lr-form-header-submit').show(); | |||||
} | |||||
}, | |||||
bind: function ($page, param) { | |||||
}, destroy: function (pageinfo) { | |||||
$header = null; | |||||
keyValue = ''; | |||||
} | |||||
}; | |||||
return page; | |||||
})(); |
@@ -0,0 +1,124 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-11-19 14:39 | |||||
/// 描 述:多账号绑定 | |||||
/// </summary> | |||||
public class LoginUserBindController : MvcControllerBase | |||||
{ | |||||
private LoginUserBindIBLL loginUserBindIBLL = new LoginUserBindBLL(); | |||||
#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 = loginUserBindIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetList(string queryJson) | |||||
{ | |||||
var data = loginUserBindIBLL.GetList(queryJson); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var LoginUserBindData = loginUserBindIBLL.GetLoginUserBindEntity( keyValue ); | |||||
var jsonData = new { | |||||
LoginUserBind = LoginUserBindData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
loginUserBindIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | |||||
{ | |||||
UserInfo userInfo = LoginUserInfo.Get(); LoginUserBindEntity entity = strEntity.ToObject<LoginUserBindEntity>(); | |||||
loginUserBindIBLL.SaveEntity(userInfo,keyValue,entity); | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,15 @@ | |||||
@{ | |||||
ViewBag.Title = "多账号绑定"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap"> | |||||
<div class="col-xs-12 lr-form-item" data-table="LoginUserBind" > | |||||
<div class="lr-form-item-title">绑定账号<font face="宋体">*</font></div> | |||||
<input id="BindUserAccount" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="LoginUserBind" > | |||||
<div class="lr-form-item-title">绑定密码<font face="宋体">*</font></div> | |||||
<input id="BindUserPassword" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/LoginUserBind/Form.js") |
@@ -0,0 +1,50 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-11-19 14:39 | |||||
* 描 述:多账号绑定 | |||||
*/ | |||||
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 () { | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/LoginUserBind/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 + '/EducationalAdministration/LoginUserBind/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,36 @@ | |||||
@{ | |||||
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="BindUserAccount" type="text" class="form-control" /> | |||||
</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/EducationalAdministration/Views/LoginUserBind/Index.js") |
@@ -0,0 +1,88 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-11-19 14:39 | |||||
* 描 述:多账号绑定 | |||||
*/ | |||||
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); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/LoginUserBind/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/LoginUserBind/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/LoginUserBind/DeleteForm', { keyValue: keyValue}, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/LoginUserBind/GetPageList', | |||||
headData: [ | |||||
{ label: "绑定账号", name: "BindUserAccount", width: 100, align: "left"}, | |||||
{ label: "绑定密码", name: "BindUserPassword", width: 100, align: "left"}, | |||||
], | |||||
mainId:'Id', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -788,6 +788,7 @@ | |||||
<Compile Include="Areas\PersonnelManagement\Controllers\ADR_RestrictionController.cs" /> | <Compile Include="Areas\PersonnelManagement\Controllers\ADR_RestrictionController.cs" /> | ||||
<Compile Include="Areas\PersonnelManagement\Controllers\ADR_AddApplyController.cs" /> | <Compile Include="Areas\PersonnelManagement\Controllers\ADR_AddApplyController.cs" /> | ||||
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_AcceptanceController.cs" /> | <Compile Include="Areas\AssetManagementSystem\Controllers\Ass_AcceptanceController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\LoginUserBindController.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | ||||
@@ -925,6 +926,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\LeaveSchoolA\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\LeaveSchoolA\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\LessonInfo\FormNoMajor.js" /> | <Content Include="Areas\EducationalAdministration\Views\LessonInfo\FormNoMajor.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\LessonInfo\IndexNoMajor.js" /> | <Content Include="Areas\EducationalAdministration\Views\LessonInfo\IndexNoMajor.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\Form.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\PracticeBase\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\PracticeBase\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\PracticeBase\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\PracticeBase\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\R_EnterBuilding\ClassReport.js" /> | <Content Include="Areas\EducationalAdministration\Views\R_EnterBuilding\ClassReport.js" /> | ||||
@@ -6098,6 +6100,9 @@ | |||||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\Index.js" /> | <Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\Index.js" /> | ||||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\Form.cshtml" /> | <Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\Form.cshtml" /> | ||||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\Form.js" /> | <Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\Form.cshtml" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Folder Include="Areas\LR_Desktop\Models\" /> | <Folder Include="Areas\LR_Desktop\Models\" /> | ||||
@@ -195,6 +195,7 @@ | |||||
<Compile Include="Modules\ArrangeLessonTermAttemperApi.cs" /> | <Compile Include="Modules\ArrangeLessonTermAttemperApi.cs" /> | ||||
<Compile Include="Modules\DataSourceNoLoginApi.cs" /> | <Compile Include="Modules\DataSourceNoLoginApi.cs" /> | ||||
<Compile Include="Modules\AskApi.cs" /> | <Compile Include="Modules\AskApi.cs" /> | ||||
<Compile Include="Modules\EducationalAdministration\LoginUserBindApi.cs" /> | |||||
<Compile Include="Modules\EvalApi.cs" /> | <Compile Include="Modules\EvalApi.cs" /> | ||||
<Compile Include="Modules\EducationalAdministration\R_EnterBuildingApi.cs" /> | <Compile Include="Modules\EducationalAdministration\R_EnterBuildingApi.cs" /> | ||||
<Compile Include="Modules\EducationalAdministration\R_EnterSchoolApi.cs" /> | <Compile Include="Modules\EducationalAdministration\R_EnterSchoolApi.cs" /> | ||||
@@ -0,0 +1,118 @@ | |||||
using Nancy; | |||||
using Learun.Util; | |||||
using System.Collections.Generic; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
namespace Learun.Application.WebApi | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-11-19 14:50 | |||||
/// 描 述:多账号绑定 | |||||
/// </summary> | |||||
public class LoginUserBindApi : BaseApi | |||||
{ | |||||
private LoginUserBindIBLL loginUserBindIBLL = new LoginUserBindBLL(); | |||||
/// <summary> | |||||
/// 注册接口 | |||||
/// <summary> | |||||
public LoginUserBindApi() | |||||
: base("/Learun/EducationalAdministration/LoginUserBind") | |||||
{ | |||||
Get["/pagelist"] = GetPageList; | |||||
Get["/list"] = GetList; | |||||
Get["/form"] = GetForm; | |||||
Post["/delete"] = DeleteForm; | |||||
Post["/save"] = SaveForm; | |||||
} | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表分页数据 | |||||
/// <summary> | |||||
/// <param name="_"></param> | |||||
/// <returns></returns> | |||||
public Response GetPageList(dynamic _) | |||||
{ | |||||
ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | |||||
var data = loginUserBindIBLL.GetPageList(parameter.pagination, parameter.queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = parameter.pagination.total, | |||||
page = parameter.pagination.page, | |||||
records = parameter.pagination.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="_"></param> | |||||
/// <returns></returns> | |||||
public Response GetList(dynamic _) | |||||
{ | |||||
string queryJson = this.GetReqData(); | |||||
var data = loginUserBindIBLL.GetList(queryJson); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// <summary> | |||||
/// <param name="_"></param> | |||||
/// <returns></returns> | |||||
public Response GetForm(dynamic _) | |||||
{ | |||||
string keyValue = this.GetReqData(); | |||||
var LoginUserBindData = loginUserBindIBLL.GetLoginUserBindEntity(keyValue); | |||||
var jsonData = new | |||||
{ | |||||
LoginUserBind = LoginUserBindData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="_"></param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Response DeleteForm(dynamic _) | |||||
{ | |||||
string keyValue = this.GetReqData(); | |||||
loginUserBindIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="_"></param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Response SaveForm(dynamic _) | |||||
{ | |||||
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | |||||
LoginUserBindEntity entity = parameter.strEntity.ToObject<LoginUserBindEntity>(); | |||||
loginUserBindIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
#region 私有类 | |||||
/// <summary> | |||||
/// 表单实体类 | |||||
/// <summary> | |||||
private class ReqFormEntity | |||||
{ | |||||
public string keyValue { get; set; } | |||||
public string strEntity { get; set; } | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-11-19 14:39 | |||||
/// 描 述:多账号绑定 | |||||
/// </summary> | |||||
public class LoginUserBindMap : EntityTypeConfiguration<LoginUserBindEntity> | |||||
{ | |||||
public LoginUserBindMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("LOGINUSERBIND"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -540,6 +540,7 @@ | |||||
<Compile Include="PersonnelManagement\ADR_RestrictionMap.cs" /> | <Compile Include="PersonnelManagement\ADR_RestrictionMap.cs" /> | ||||
<Compile Include="PersonnelManagement\ADR_AddApplyMap.cs" /> | <Compile Include="PersonnelManagement\ADR_AddApplyMap.cs" /> | ||||
<Compile Include="AssetManagementSystem\Ass_AcceptanceMap.cs" /> | <Compile Include="AssetManagementSystem\Ass_AcceptanceMap.cs" /> | ||||
<Compile Include="EducationalAdministration\LoginUserBindMap.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||
@@ -0,0 +1,149 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-11-19 14:39 | |||||
/// 描 述:多账号绑定 | |||||
/// </summary> | |||||
public class LoginUserBindBLL : LoginUserBindIBLL | |||||
{ | |||||
private LoginUserBindService loginUserBindService = new LoginUserBindService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表分页数据 | |||||
/// <summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<LoginUserBindEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return loginUserBindService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<LoginUserBindEntity> GetList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return loginUserBindService.GetList(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取LoginUserBind表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public LoginUserBindEntity GetLoginUserBindEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return loginUserBindService.GetLoginUserBindEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
loginUserBindService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveEntity(UserInfo userInfo, string keyValue, LoginUserBindEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
loginUserBindService.SaveEntity(userInfo, keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,75 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-11-19 14:39 | |||||
/// 描 述:多账号绑定 | |||||
/// </summary> | |||||
public class LoginUserBindEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// 绑定用户Id | |||||
/// </summary> | |||||
[Column("BINDUSERID")] | |||||
public string BindUserId { get; set; } | |||||
/// <summary> | |||||
/// 绑定用户账号 | |||||
/// </summary> | |||||
[Column("BINDUSERACCOUNT")] | |||||
public string BindUserAccount { get; set; } | |||||
/// <summary> | |||||
/// 绑定用户密码 | |||||
/// </summary> | |||||
[Column("BINDUSERPASSWORD")] | |||||
public string BindUserPassword { get; set; } | |||||
/// <summary> | |||||
/// 创建用户Id | |||||
/// </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; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create(UserInfo userInfo) | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue, UserInfo userInfo) | |||||
{ | |||||
this.Id = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,56 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-11-19 14:39 | |||||
/// 描 述:多账号绑定 | |||||
/// </summary> | |||||
public interface LoginUserBindIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表分页数据 | |||||
/// <summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<LoginUserBindEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<LoginUserBindEntity> GetList(string queryJson); | |||||
/// <summary> | |||||
/// 获取LoginUserBind表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
LoginUserBindEntity GetLoginUserBindEntity(string keyValue); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
void SaveEntity(UserInfo userInfo, string keyValue, LoginUserBindEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,193 @@ | |||||
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.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-11-19 14:39 | |||||
/// 描 述:多账号绑定 | |||||
/// </summary> | |||||
public class LoginUserBindService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表分页数据 | |||||
/// <summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<LoginUserBindEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.Id, | |||||
t.BindUserAccount, | |||||
t.BindUserPassword | |||||
"); | |||||
strSql.Append(" FROM LoginUserBind t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["BindUserAccount"].IsEmpty()) | |||||
{ | |||||
dp.Add("BindUserAccount", "%" + queryParam["BindUserAccount"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.BindUserAccount Like @BindUserAccount "); | |||||
} | |||||
return this.BaseRepository().FindList<LoginUserBindEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<LoginUserBindEntity> GetList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.Id, | |||||
t.BindUserAccount, | |||||
t.BindUserPassword | |||||
"); | |||||
strSql.Append(" FROM LoginUserBind t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["BindUserAccount"].IsEmpty()) | |||||
{ | |||||
dp.Add("BindUserAccount", "%" + queryParam["BindUserAccount"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.BindUserAccount Like @BindUserAccount "); | |||||
} | |||||
return this.BaseRepository().FindList<LoginUserBindEntity>(strSql.ToString(),dp); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取LoginUserBind表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public LoginUserBindEntity GetLoginUserBindEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository().FindEntity<LoginUserBindEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository().Delete<LoginUserBindEntity>(t=>t.Id == keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveEntity( UserInfo userInfo, string keyValue, LoginUserBindEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue,userInfo); | |||||
this.BaseRepository().Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(userInfo); | |||||
this.BaseRepository().Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -1581,6 +1581,10 @@ | |||||
<Compile Include="AssetManagementSystem\Ass_Acceptance\Ass_AcceptanceService.cs" /> | <Compile Include="AssetManagementSystem\Ass_Acceptance\Ass_AcceptanceService.cs" /> | ||||
<Compile Include="AssetManagementSystem\Ass_Acceptance\Ass_AcceptanceBLL.cs" /> | <Compile Include="AssetManagementSystem\Ass_Acceptance\Ass_AcceptanceBLL.cs" /> | ||||
<Compile Include="AssetManagementSystem\Ass_Acceptance\Ass_AcceptanceIBLL.cs" /> | <Compile Include="AssetManagementSystem\Ass_Acceptance\Ass_AcceptanceIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\LoginUserBind\LoginUserBindEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\LoginUserBind\LoginUserBindService.cs" /> | |||||
<Compile Include="EducationalAdministration\LoginUserBind\LoginUserBindBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\LoginUserBind\LoginUserBindIBLL.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||