yzh
2021-10-09 e76da58d55a18a746d021fd96351c48cc9648d7c
web/web/ExportDocument.aspx.cs
@@ -25,6 +25,9 @@
            case "exportGwStatisV3"://导出统计报表
                this.ExprortGwStatisV3();
                break;
            case "exGwProduct":
                this.ExGwProduct();
                break;
        }
    }
@@ -333,4 +336,34 @@
            webTool.Export(dataTable, dictionary, "日志_" + sDate, this.Context.Response);
        }
    }
    //产品导出Excel
    private void ExGwProduct()
    {
        string name = this.AppContext.GetString("name");
        string classes = this.AppContext.GetString("classes");
        string is_default = this.AppContext.GetString("is_default");
        string op_group_id = this.AppContext.GetString("op_group_id");
        using (GwProductDao gwProductDao = new GwProductDao())
        {
            DataTable dataTable = gwProductDao.LoadGwProductDataTable(name, classes, is_default, op_group_id);
            WebTool webTool = new WebTool();
            Dictionary<string, string> dictionary = new Dictionary<string, string>();
            //dictionary["产品ID"] = "ID";
            dictionary["产品名称"] = "NAME";
            //dictionary["图标"] = "ICON";
            dictionary["使用说明"] = "INSTRUCTIONS";
            dictionary["类别"] = "CLASSES";
            dictionary["父级产品分类"] = "PARENT_ID";
            //dictionary["路径"] = "PATH";
            dictionary["是否默认"] = "IS_DEFAULT";
            dictionary["是否启用"] = "IS_ENABLE";
            dictionary["排序"] = "SORT";
            dictionary["默认通道"] = "OP_GROUP_ID";
            dictionary["API账号生成规则"] = "API_SP_XH_ID";
            dictionary["默认赠送条数"] = "GIVING_NUM";
            dictionary["备注"] = "REMARK";
            webTool.Export(dataTable, dictionary, "PRODUCT_" + (object)DateTime.Now.Ticks, this.Context.Response);
        }
    }
}