public override void AfterBarItemClick(AfterBarItemClickEventArgs e)
{
base.AfterBarItemClick(e);
if(e.BarItemKey== "XDUA_tbDondowd")//下载导入模板
{
string Url = "/TemplateFiles/市场单价.xlsx";
DynamicFormShowParameter dsp = new DynamicFormShowParameter
{
FormId = "BOS_FileDownLoad"
};
dsp.OpenStyle.ShowType = ShowType.Modal;
dsp.CustomParams.Add("IsExportData", "true");
dsp.CustomParams.Add("url", Url);
this.View.ShowForm(dsp);
}
if (e.BarItemKey.EqualsIgnoreCase("XDUA_tbImport"))
{
// 显示文件上传界面,上传Excel文件
DynamicFormShowParameter param = new DynamicFormShowParameter
{
FormId = "XDUA_BCPJCYYDR"
};
this.View.ShowForm(param, delegate (FormResult formResult)
{
if ((formResult != null) && (formResult.ReturnData != null))
{
this.DoImportEntry(formResult.ReturnData.ToString());
}
});
}
推荐阅读