批量导入应该是每款MIS系统必备的功能,这样可以减少很多重复性的工作,今天分享一下如何用数据库自带的BulkInsert进行批量导入(方法有很多,这算比较简便的一种),下面便从前台到后台走一遍:
第一步:有个批量导入的按钮
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-undo',plain:true" οnclick="showImportFrm()">导入积分用户Excel</a>
因为用到了easyUI所以需要引用easyUI的一下js以及css,基本就这些,在官网上都可以下载到
<link href="../../Content/jquery-easyui-1.5/themes/default/easyui.css" rel="stylesheet" />
<link href="../../Content/jquery-easyui-1.5/themes/icon.css" rel="stylesheet" />
<link href="../../Content/jquery-easyui-1.5/demo/demo.css" rel="stylesheet" />
<script src="../../Content/jquery-easyui-1.5/jquery.min.js"></script>
<script src="../../Content/jquery-easyui-1.5/jquery.easyui.min.js"></script>
<script src="../../Content/jquery-easyui-1.5/locale/easyui-lang-zh_CN.js"></script>
第二步:弹出导入Excel框
<div id="importDiv" style="display: none;">
<form action="/frmManageUser/importflowbatch" method="post" enctype="multipart/form-data&#