var UploadFun = {
CallBack: function (msg) {
$.messager.alert('上传文件', msg, 'info');
}
};
public void ImportActivityItems()
{
string error = "导入成功";
try
{
var f = Request.Files["activityitemsfile"];
var fpath = Server.MapPath("/Upload/活动链接数据/");
if (!Directory.Exists(fpath))
Directory.CreateDirectory(fpath);
string fullfilename = fpath + DateTime.Now.ToFileTime() + f.FileName;
f.SaveAs(fullfilename);
}
catch (Exception ex)
{
Logger.Error(ex.ToString());
error = "导入过程中发生错误,请重试";
}
Response.Write("script type=\"text/javascript\"> parent.UploadFun.CallBack(\"" + error + "\")/script>");
}