42 lines
1.8 KiB
C#
42 lines
1.8 KiB
C#
using System;
|
|
using System.Data;
|
|
using System.Web.Mvc;
|
|
using WX.CRM.Common;
|
|
using WX.CRM.IBLL.Ord;
|
|
using WX.CRM.WebHelper;
|
|
|
|
namespace WX.CRM.WEB.Controllers.Ord
|
|
{
|
|
public class MemoProtectController : Controller
|
|
{
|
|
private readonly IORD_MEMO_Q memoQ;
|
|
ValidationErrors errors = new ValidationErrors();
|
|
public MemoProtectController(IORD_MEMO_Q _memoQ)
|
|
{
|
|
this.memoQ = _memoQ;
|
|
}
|
|
public ActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
#region 客户编号导出
|
|
public FileResult ResIdExport()
|
|
{
|
|
decimal day = Request.QueryString["protectDay"].GetDecimal(0);
|
|
DateTime? stime = Request.QueryString["Stime"].GetDateTime();
|
|
DateTime? etime = Request.QueryString["Etime"].GetDateTime();
|
|
decimal BusinessType1 = Convert.ToDecimal(Request.QueryString["BusinessType1"]);
|
|
decimal MemoType1 = Convert.ToDecimal(Request.QueryString["MemoType1"]);
|
|
decimal MemoSubtype1 = Convert.ToDecimal(Request.QueryString["MemoSubtype1"]);
|
|
decimal BusinessType2 = Convert.ToDecimal(Request.QueryString["BusinessType2"]);
|
|
decimal MemoType2 = Convert.ToDecimal(Request.QueryString["MemoType2"]);
|
|
decimal MemoSubtype2 = Convert.ToDecimal(Request.QueryString["MemoSubtype2"]);
|
|
DataTable dt = new DataTable();
|
|
dt = memoQ.GetProtectResIdList(ref errors, day, stime, etime, BusinessType1, MemoType1, MemoSubtype1, BusinessType2, MemoType2, MemoSubtype2);
|
|
return File(ExcelHelper.ExportDataTableToExcel(dt, "客户ID"), "application/ms-excel", PageRequest.GetDlownLoadName("客户ID" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls"));
|
|
}
|
|
#endregion
|
|
}
|
|
}
|