var UploadFun = {
CallBack: function (msg) {
$.messager.alert('上傳文件', msg, 'info');
}
};
public void ImportActivityItems()
{
string error = "導(dǎo)入成功";
try
{
var f = Request.Files["activityitemsfile"];
var fpath = Server.MapPath("/Upload/活動鏈接數(shù)據(jù)/");
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 = "導(dǎo)入過程中發(fā)生錯誤,請重試";
}
Response.Write("script type=\"text/javascript\"> parent.UploadFun.CallBack(\"" + error + "\")/script>");
}