Skip to content

Commit 6f470b5

Browse files
YanZhYanZh
authored andcommitted
coding
1 parent 5503d49 commit 6f470b5

File tree

125 files changed

+71025
-45
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+71025
-45
lines changed

YanZhiwei.JavaScript.Utilities/BackHandler/BaseHandler.ashx.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Data;
4+
using System.IO;
35
using System.Linq;
46
using System.Net;
57
using System.Web;
8+
using YanZhiwei.DotNet.NPOI2.Utilities;
69
using YanZhiwei.DotNet2.Utilities.Collection;
710
using YanZhiwei.DotNet2.Utilities.Common;
811
using YanZhiwei.DotNet2.Utilities.DataOperator;
912
using YanZhiwei.DotNet2.Utilities.Enum;
1013
using YanZhiwei.DotNet3._5.Utilities.Common;
14+
using YanZhiwei.DotNet3._5.Utilities.Mapper;
1115
using YanZhiwei.DotNet3._5.Utilities.Model;
1216
using YanZhiwei.DotNet3._5.Utilities.WebForm.JqueryPlugin;
1317
using YanZhiwei.JavaScript.Utilities.Model;
14-
18+
using YanZhiwei.DotNet3._5.Utilities.WebForm;
1519
namespace YanZhiwei.JavaScript.Utilities.BackHandler
1620
{
1721
/// <summary>
@@ -42,6 +46,22 @@ public void ProcessRequest(HttpContext context)
4246
string _json = SerializeHelper.JsonSerialize(_pageResult).ParseJsonDateTime();
4347
context.Response.Write(_json);
4448
}
49+
else if(_actionType.CompareIgnoreCase("exportLocationExcel"))
50+
{
51+
SqlServerDataOperator _helper = new SqlServerDataOperator(@"Server=YANZHIWEI-PC\SQLEXPRESS;database=JooWMS;user id=sa;Password=sasa");
52+
PagedList<Location> _pageResult = _helper.ExecutePageQuery<Location>("[Location]", "*", "ID", OrderType.Desc, string.Empty, 10, 1);
53+
DataTable _result = GeneralMapper.ToDataTable<Location>(_pageResult);
54+
string _filePath = context.Server.MapPath("~/UploadFiles/");
55+
56+
if(!Directory.Exists(_filePath))
57+
{
58+
Directory.CreateDirectory(_filePath);
59+
}
60+
61+
string _filename = string.Format("库位管理{0}.xls", DateTime.Now.ToString("yyyyMMddHHmmss"));
62+
NPOIExcel.ToExcel(_result, "库位管理", "库位", Path.Combine(_filePath, _filename));
63+
context.CreateResponse(("/UploadFiles/" + _filename).Escape(), HttpStatusCode.OK);
64+
}
4565
else
4666
{
4767
context.ExecutePageQuery<Person>((pageLength, pageIndex, orderIndex, orderBy) =>

YanZhiwei.JavaScript.Utilities/DLL/DotNet.NPOI2.Utilities.XML

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
8.5 KB
Binary file not shown.
0 Bytes
Binary file not shown.
1 KB
Binary file not shown.

YanZhiwei.JavaScript.Utilities/DLL/DotNet2.Utilities.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4429,6 +4429,15 @@
44294429
<param name="targetLength">目标长度</param>
44304430
<returns>操作完成后字符串</returns>
44314431
</member>
4432+
<member name="M:YanZhiwei.DotNet2.Utilities.Common.StringHelper.Escape(System.String)">
4433+
<summary>
4434+
对字符串进行编码
4435+
</summary>
4436+
<param name="data">需要编码的字符串</param>
4437+
<returns>编码后的字符串</returns>
4438+
时间:2016/10/16 13:02
4439+
备注:
4440+
</member>
44324441
<member name="M:YanZhiwei.DotNet2.Utilities.Common.StringHelper.FormatWith(System.String,System.Object[])">
44334442
<summary>
44344443
为指定格式的字符串填充相应对象来生成字符串
@@ -4558,6 +4567,15 @@
45584567
<param name="delimiter">The delimiter.</param>
45594568
<returns>截取后的字符串</returns>
45604569
</member>
4570+
<member name="M:YanZhiwei.DotNet2.Utilities.Common.StringHelper.UnEscape(System.String)">
4571+
<summary>
4572+
对字符串进行解码
4573+
</summary>
4574+
<param name="data">需要解码的字符串</param>
4575+
<returns>解码后的字符串</returns>
4576+
时间:2016/10/16 13:06
4577+
备注:
4578+
</member>
45614579
<member name="M:YanZhiwei.DotNet2.Utilities.Common.StringHelper.Unique">
45624580
<summary>
45634581
获取全局唯一值
0 Bytes
Binary file not shown.

YanZhiwei.JavaScript.Utilities/DLL/DotNet3.5.Utilities.XML

Lines changed: 73 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
3.5 KB
Binary file not shown.
387 KB
Binary file not shown.

0 commit comments

Comments
 (0)