public ActionResult Export(int id)
        {
            var obj = PrivilegeOrderService.GetCalc(id);
            var dt  = obj.Details.ToDataTable();

            string[] fields = { "IndentOrderId", "Barcode", "PartName", "CategoryTitle", "Unit", "OrderDate", "TakeDate", "TakeNum", "Price", "SubTotal" };
            string[] names  = { "订单号", "商品条码", "商品名称", "类别", "单位", "(订货/销售)日期", "到货日期", "收货数量", "进价", "小计" };
            var      title  = "返利模式:" + obj.PrivilegeModeSNTitle + "供应商名称:" + obj.SupplierTitle + "   返利期间:" + obj.StartDate.GetValueOrDefault().ToString("yyyy-MM-dd") + "至" + obj.EndDate.GetValueOrDefault().ToString("yyyy-MM-dd") + "    返利(金额/数量):" + obj.PrivilegeNum;

            new ExportExcel()
            {
                IsBufferOutput = true, HeaderText = title
            }.ToExcel(obj.PrivilegeSolutionTitle, dt, fields, names, null);
            return(new EmptyResult());
        }
 public ActionResult Detail(int id)
 {
     return(View(PrivilegeOrderService.GetCalc(id)));
 }
        public ActionResult GetCalc(int solId, DateTime start, DateTime end)
        {
            var str = PrivilegeOrderService.GetCalc(solId, start, end);

            return(Content(str));
        }