You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.5 KiB
52 lines
1.5 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Data;
|
|
|
|
namespace FangYar.WebUI.ashx
|
|
{
|
|
/// <summary>
|
|
/// ExportHandler 的摘要说明
|
|
/// </summary>
|
|
public class ZYExportHandler : IHttpHandler
|
|
{
|
|
private FangYar.BLL.CommomBLL bll = new BLL.CommomBLL();
|
|
public void ProcessRequest(HttpContext context)
|
|
{
|
|
context.Response.ContentType = "text/json";
|
|
string action = context.Request.Params["Action"];
|
|
string returnstr = "";
|
|
switch (action)
|
|
{
|
|
case "ExpDevice":
|
|
ExpDevice(context);
|
|
break;
|
|
}
|
|
context.Response.Write(returnstr);
|
|
}
|
|
//查询
|
|
private void ExpDevice(HttpContext context)
|
|
{
|
|
|
|
DataTable list = bll.GetTableList("*", "tbl_sys_dicdetail", " MOD_CODE ='HYTYPE'");
|
|
Dictionary<string, string> cellHeaders = new Dictionary<string, string>();
|
|
cellHeaders.Add("ID", "主键");
|
|
cellHeaders.Add("MOD_CODE", "模块");
|
|
cellHeaders.Add("DIC_TEXT", "名称");
|
|
cellHeaders.Add("DIC_VALUE", "值");
|
|
cellHeaders.Add("DIC_FID", "父值");
|
|
cellHeaders.Add("DIC_ORDER", "排序");
|
|
FangYar.Common.NPOIWordHelper.ExportByWeb(list, "字典项", cellHeaders, "字典项");
|
|
|
|
}
|
|
|
|
public bool IsReusable
|
|
{
|
|
get
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|