diff --git a/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs b/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs
index d9258c58..91d14ef3 100644
--- a/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs
+++ b/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs
@@ -1100,7 +1100,20 @@ namespace DSWeb.Areas.Account.Controllers
}
var imgFile = Request.Files["file"];
- var BillNo = Request.Form["BillNo"].ToString().Trim();
+
+
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(imgFile.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ var BillNo = Request.Form["BillNo"].ToString().Trim();
String strPath = "/Areas/Account/Files/" + BillNo + "/";
String dirPath = System.Web.HttpContext.Current.Server.MapPath(strPath);
if (!Directory.Exists(dirPath))
diff --git a/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs b/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs
index cf0520a7..dff291e0 100644
--- a/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs
+++ b/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs
@@ -19,6 +19,7 @@ using System.Text;
using System.Web.Mvc;
using DSWeb.Common.DB;
using System.Diagnostics.Contracts;
+using System.IO;
namespace DSWeb.Areas.CommMng.Controllers
{
@@ -1781,6 +1782,18 @@ namespace DSWeb.Areas.CommMng.Controllers
return new ContentResult() { Content = JsonConvert.Serialize(result) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+
var _r = URLInfo.SaveFile(file);
diff --git a/DSWeb/Areas/CommMng/Controllers/PrintController.cs b/DSWeb/Areas/CommMng/Controllers/PrintController.cs
index ffe1bb31..8ee1da23 100644
--- a/DSWeb/Areas/CommMng/Controllers/PrintController.cs
+++ b/DSWeb/Areas/CommMng/Controllers/PrintController.cs
@@ -149,6 +149,17 @@ namespace DSWeb.Areas.CommMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/MailFile");
diff --git a/DSWeb/Areas/Dispatch/Controllers/WxAppController.cs b/DSWeb/Areas/Dispatch/Controllers/WxAppController.cs
index e62ab9dc..22009134 100644
--- a/DSWeb/Areas/Dispatch/Controllers/WxAppController.cs
+++ b/DSWeb/Areas/Dispatch/Controllers/WxAppController.cs
@@ -525,6 +525,13 @@ namespace DSWeb.Areas.Dispatch.Controllers
{
continue;
}
+
+ string ext = Path.GetExtension(uploadFile.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ return Json(new { Success = false, Message = "上传错误", Data = JsonConvert.SerializeObject(newInfoFiles) });
+ }
+
var extension = Path.GetExtension(uploadFile.FileName);
var timename = DateTime.Now.ToString("yyyyMMddHHmmssfff") + "_" + new Random().Next(100, 999) + extension;
var filepath = "\\" + timename;//随机生成文件名
@@ -954,6 +961,11 @@ namespace DSWeb.Areas.Dispatch.Controllers
{
continue;
}
+ string ext = Path.GetExtension(uploadFile.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ return Json(new { Success = false, Message = "上传错误" });
+ }
var extension = Path.GetExtension(uploadFile.FileName);
var timename = DateTime.Now.ToString("yyyyMMddHHmmssfff") + "_" + new Random().Next(100, 999) + extension;
var filepath = "\\" + timename;//随机生成文件名
diff --git a/DSWeb/Areas/Import/Controllers/ImportTradeController.cs b/DSWeb/Areas/Import/Controllers/ImportTradeController.cs
index 41b07f8f..f5cc8825 100644
--- a/DSWeb/Areas/Import/Controllers/ImportTradeController.cs
+++ b/DSWeb/Areas/Import/Controllers/ImportTradeController.cs
@@ -910,6 +910,18 @@ namespace DSWeb.Areas.Import.Controllers
}
var file = Request.Files["LoadImage"];
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+
var fileGID = Request.Form["fileGid"];
var HTH = Request.Form["HTH"];
var RECEIPTTYPE = Request.Form["RECEIPTTYPE"];
diff --git a/DSWeb/Areas/Import/Controllers/xxh_singleController.cs b/DSWeb/Areas/Import/Controllers/xxh_singleController.cs
index a01af589..170fb24d 100644
--- a/DSWeb/Areas/Import/Controllers/xxh_singleController.cs
+++ b/DSWeb/Areas/Import/Controllers/xxh_singleController.cs
@@ -176,6 +176,17 @@ namespace DSWeb.Areas.Import.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Bs");
diff --git a/DSWeb/Areas/MvcContainer/Controllers/MsCodeCtnTkController.cs b/DSWeb/Areas/MvcContainer/Controllers/MsCodeCtnTkController.cs
index 974f96d6..a8fce990 100644
--- a/DSWeb/Areas/MvcContainer/Controllers/MsCodeCtnTkController.cs
+++ b/DSWeb/Areas/MvcContainer/Controllers/MsCodeCtnTkController.cs
@@ -369,6 +369,17 @@ namespace DSWeb.MvcContainer.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/CtnTkDetail");
@@ -484,6 +495,17 @@ namespace DSWeb.MvcContainer.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/CtnTkDetail");
@@ -633,6 +655,17 @@ namespace DSWeb.MvcContainer.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/CtnTkDetail");
diff --git a/DSWeb/Areas/MvcContainer/Controllers/MsOpCtnBsCardController.cs b/DSWeb/Areas/MvcContainer/Controllers/MsOpCtnBsCardController.cs
index b1863272..7a99b1f6 100644
--- a/DSWeb/Areas/MvcContainer/Controllers/MsOpCtnBsCardController.cs
+++ b/DSWeb/Areas/MvcContainer/Controllers/MsOpCtnBsCardController.cs
@@ -977,6 +977,17 @@ namespace DSWeb.MvcContainer.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/MsOpFiles/" + BSNO);
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsChFeeAutoDuiController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsChFeeAutoDuiController.cs
index dbbd5b0c..8fb6a2ea 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsChFeeAutoDuiController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsChFeeAutoDuiController.cs
@@ -820,7 +820,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/CtnTkDetail");
if (!Directory.Exists(path))
@@ -851,13 +861,7 @@ namespace DSWeb.MvcShipping.Controllers
try
{
- string ext = Path.GetExtension(file.FileName).ToLower();
- if (ext != ".xls" && ext != ".xlsx")
- {
- jsonRespose.Success = false;
- jsonRespose.Message = "上传的文件不是Excel文件";
- return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
- }
+
var strMsg = "";
DataTable table = ExcelHelper.ExcelToDatatable(file.InputStream, ext, out strMsg);
if (!string.IsNullOrEmpty(strMsg))
@@ -944,7 +948,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/CtnTkDetail");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs
index c0d6df0a..a3041f9c 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs
@@ -1567,7 +1567,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "File is Error,Pls Upload Again";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/SeaFee");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsCodeExcelExpFormatController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsCodeExcelExpFormatController.cs
index e4c75579..24f49fe4 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsCodeExcelExpFormatController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsCodeExcelExpFormatController.cs
@@ -167,7 +167,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/MsOpFiles");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsCodeExcelImpFormatController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsCodeExcelImpFormatController.cs
index 0e495410..e85b325d 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsCodeExcelImpFormatController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsCodeExcelImpFormatController.cs
@@ -198,7 +198,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/ImpBsExcel");
if (!Directory.Exists(path))
@@ -230,13 +240,7 @@ namespace DSWeb.MvcShipping.Controllers
try
{
- string ext = Path.GetExtension(file.FileName).ToLower();
- if (ext != ".xls" && ext != ".xlsx")
- {
- jsonRespose.Success = false;
- jsonRespose.Message = "上传的文件不是Excel文件";
- return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
- }
+
var strMsg = "";
System.Data.DataTable table = ExcelHelper.ExcelToDatatable(file.InputStream, ext, out strMsg);
if (!string.IsNullOrEmpty(strMsg))
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsCrmPriceCarrierController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsCrmPriceCarrierController.cs
index c9866844..ae9f6920 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsCrmPriceCarrierController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsCrmPriceCarrierController.cs
@@ -108,6 +108,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/YunJia");
if (!Directory.Exists(path))
@@ -130,13 +141,7 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传的Excel不包含数据01";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
- string ext = Path.GetExtension(file.FileName).ToLower();
- if (ext != ".xls" && ext != ".xlsx")
- {
- jsonRespose.Success = false;
- jsonRespose.Message = "上传的文件不是Excel文件";
- return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
- }
+
string sError = ""; //失败提示信息
int InsertCount = 0; //新增条数
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsCtBankStatementController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsCtBankStatementController.cs
index bc5d3121..1b971c05 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsCtBankStatementController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsCtBankStatementController.cs
@@ -226,7 +226,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Bs");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsInfoClientController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsInfoClientController.cs
index 61b8b149..e5e9f962 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsInfoClientController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsInfoClientController.cs
@@ -1044,6 +1044,17 @@ namespace DSWeb.MvcShipping.Controllers
var ContactGID = Request.Form["ContactGID"];
var SHOWNAME = Request.Form["SHOWNAME"];
var OLDURL = Request.Form["OLDURL"];
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
if (OLDURL.Trim() != "")
{
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpAirn_FreightController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpAirn_FreightController.cs
index 31d4d4f1..df579b7e 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOpAirn_FreightController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpAirn_FreightController.cs
@@ -246,6 +246,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/CtnTkDetail");
@@ -380,6 +391,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Bs");
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpAirn_RECEIPTWMSController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpAirn_RECEIPTWMSController.cs
index 9139d2c9..00428d49 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOpAirn_RECEIPTWMSController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpAirn_RECEIPTWMSController.cs
@@ -287,6 +287,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Bs");
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpBulkController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpBulkController.cs
index 80d4dd2c..71c2d358 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOpBulkController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpBulkController.cs
@@ -476,6 +476,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpCtnRentBuyController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpCtnRentBuyController.cs
index 1e64e792..17fa82ef 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOpCtnRentBuyController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpCtnRentBuyController.cs
@@ -157,6 +157,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpCtnRepairController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpCtnRepairController.cs
index 4dc369ef..34fec039 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOpCtnRepairController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpCtnRepairController.cs
@@ -123,6 +123,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/OpCtnRepairExcel");
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpCtnStatusController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpCtnStatusController.cs
index 40bd86c7..51cdfb68 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOpCtnStatusController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpCtnStatusController.cs
@@ -347,6 +347,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpFenDetailController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpFenDetailController.cs
index 07e75ad6..a3ac4b76 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOpFenDetailController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpFenDetailController.cs
@@ -119,6 +119,18 @@ namespace DSWeb.MvcShipping.Controllers
var file = Request.Files["file"];//获取文件
if (file == null)//未上传文件
return new ContentResult { Content = jsonRespose };
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+
var path = Server.MapPath("../../UploadFiles/CtnTkDetail");//获取物理路径
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpMailLogController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpMailLogController.cs
index 42cc5e41..82f10af2 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOpMailLogController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpMailLogController.cs
@@ -92,6 +92,19 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ jsonRespose.Success = false;
+ jsonRespose.Message = "请选择上传的文件";
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ jsonRespose.Success = false;
+ jsonRespose.Message = "请选择上传的文件";
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
+ }
var path = Server.MapPath("../../UploadFiles/MailLog");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpOtherController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpOtherController.cs
index cbd7e936..04cd8380 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOpOtherController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpOtherController.cs
@@ -604,6 +604,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/OpOther");
@@ -731,6 +742,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/OpOther");
@@ -760,13 +782,7 @@ namespace DSWeb.MvcShipping.Controllers
try
{
- string ext = Path.GetExtension(file.FileName).ToLower();
- if (ext != ".xls" && ext != ".xlsx")
- {
- jsonRespose.Success = false;
- jsonRespose.Message = "上传的文件不是Excel文件";
- return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
- }
+
var strMsg = "";
DataTable table = ExcelHelper.ExcelToDatatable(file.InputStream, ext, out strMsg);
if (!string.IsNullOrEmpty(strMsg))
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpRailwayController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpRailwayController.cs
index 33a97bb1..695c0f04 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOpRailwayController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpRailwayController.cs
@@ -707,6 +707,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/RailwayFrPort");
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpReceiptController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpReceiptController.cs
index 560b97fe..4e655964 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOpReceiptController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpReceiptController.cs
@@ -332,6 +332,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/MsOpFiles/" + CUSTNO);
@@ -358,13 +369,7 @@ namespace DSWeb.MvcShipping.Controllers
var json = JsonConvert.Serialize(new { success = false, Message = "上传文件发生未知错误,请重新上传" });
return new ContentResult() { Content = json };
}
- string ext = Path.GetExtension(file.FileName).ToLower();
- if (ext == ".asp"||ext == ".aspx")
- {
- jsonRespose.Success = false;
- jsonRespose.Message = "不允许上传ASP货ASPX文件";
- return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
- }
+
@@ -420,6 +425,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/MsOpFiles/" + CUSTNO);
@@ -445,13 +461,7 @@ namespace DSWeb.MvcShipping.Controllers
var json = JsonConvert.Serialize(new { success = false, Message = "上传文件发生未知错误,请重新上传" });
return new ContentResult() { Content = json };
}
- string ext = Path.GetExtension(file.FileName).ToLower();
- if (ext == ".asp" || ext == ".aspx")
- {
- jsonRespose.Success = false;
- jsonRespose.Message = "不允许上传ASP货ASPX文件";
- return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
- }
+
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs
index 84d36bed..2ea71470 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs
@@ -3150,11 +3150,10 @@ namespace DSWeb.MvcShipping.Controllers
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
string ext = Path.GetExtension(file.FileName).ToLower();
- if (ext == ".asp" || ext == ".aspx")
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
{
- jsonRespose.Success = false;
- jsonRespose.Message = "不允许上传ASP或ASPX文件";
- return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
var path = Server.MapPath("../../UploadFiles/Edi");
@@ -3247,6 +3246,18 @@ namespace DSWeb.MvcShipping.Controllers
return new ContentResult() { Content = json };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+
var path = Server.MapPath("../../UploadFiles/Edi");
if (!Directory.Exists(path))
@@ -3306,6 +3317,17 @@ namespace DSWeb.MvcShipping.Controllers
var json = JsonConvert.Serialize(new { success = false, Message = "上传文件发生未知错误,请重新上传" });
return new ContentResult() { Content = json };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Edi");
@@ -3366,6 +3388,17 @@ namespace DSWeb.MvcShipping.Controllers
var json = JsonConvert.Serialize(new { success = false, Message = "上传文件发生未知错误,请重新上传" });
return new ContentResult() { Content = json };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Edi");
@@ -3426,6 +3459,17 @@ namespace DSWeb.MvcShipping.Controllers
var json = JsonConvert.Serialize(new { success = false, Message = "上传文件发生未知错误,请重新上传" });
return new ContentResult() { Content = json };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Edi");
@@ -3487,6 +3531,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Edi");
@@ -9080,7 +9135,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
var path2 = Server.MapPath("../../UploadFiles/BulkDetail/");
@@ -9480,6 +9545,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
var path2 = Server.MapPath("../../UploadFiles/BulkDetail/");
@@ -10005,7 +10081,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
var path2 = Server.MapPath("../../UploadFiles/BulkDetail/");
@@ -10848,6 +10934,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
var path2 = Server.MapPath("../../UploadFiles/BulkDetail/");
@@ -11443,7 +11540,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
var path2 = Server.MapPath("../../UploadFiles/BulkDetail/");
@@ -11991,6 +12098,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
@@ -12082,13 +12200,7 @@ namespace DSWeb.MvcShipping.Controllers
// return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
//}
- string ext = Path.GetExtension(file.FileName).ToLower();
- if (ext != ".xls" && ext != ".xlsx")
- {
- jsonRespose.Success = false;
- jsonRespose.Message = "上传的文件不是Excel文件";
- return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
- }
+
var strMsg = "";
System.Data.DataTable table = ExcelHelper.ExcelToDatatable(file.InputStream, ext, out strMsg);
if (!string.IsNullOrEmpty(strMsg))
@@ -12147,7 +12259,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
if (!Directory.Exists(path))
@@ -12225,7 +12347,7 @@ namespace DSWeb.MvcShipping.Controllers
// return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
//}
- string ext = Path.GetExtension(file.FileName).ToLower();
+ ext = Path.GetExtension(file.FileName).ToLower();
if (ext != ".xls" && ext != ".xlsx")
{
jsonRespose.Success = false;
@@ -12297,6 +12419,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
@@ -12375,7 +12508,7 @@ namespace DSWeb.MvcShipping.Controllers
// return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
//}
- string ext = Path.GetExtension(file.FileName).ToLower();
+
if (ext != ".xls" && ext != ".xlsx")
{
jsonRespose.Success = false;
@@ -12448,6 +12581,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
@@ -12526,7 +12670,7 @@ namespace DSWeb.MvcShipping.Controllers
// return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
//}
- string ext = Path.GetExtension(file.FileName).ToLower();
+
if (ext != ".xls" && ext != ".xlsx")
{
jsonRespose.Success = false;
@@ -12600,6 +12744,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
@@ -12657,7 +12812,6 @@ namespace DSWeb.MvcShipping.Controllers
// return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
//}
- string ext = Path.GetExtension(file.FileName).ToLower();
if (ext != ".xls" && ext != ".xlsx")
{
jsonRespose.Success = false;
@@ -12732,6 +12886,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
@@ -12810,7 +12975,7 @@ namespace DSWeb.MvcShipping.Controllers
// return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
//}
- string ext = Path.GetExtension(file.FileName).ToLower();
+
if (ext != ".xls" && ext != ".xlsx")
{
jsonRespose.Success = false;
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaePreController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaePreController.cs
index a083f4f3..2a63431e 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaePreController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaePreController.cs
@@ -699,6 +699,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/OpOther");
@@ -729,7 +740,7 @@ namespace DSWeb.MvcShipping.Controllers
try
{
- string ext = Path.GetExtension(file.FileName).ToLower();
+
if (ext != ".xls" && ext != ".xlsx")
{
jsonRespose.Success = false;
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs
index 85ca0de1..6bb9a473 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs
@@ -1541,6 +1541,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Edi");
@@ -2006,30 +2017,40 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ /*
- /*
+ Stream stream = file.InputStream;
- Stream stream = file.InputStream;
+ StreamReader reader = new StreamReader(stream, Encoding.UTF8);
- StreamReader reader = new StreamReader(stream, Encoding.UTF8);
+ string str = "";
+
+ while (str != null)
+ {
+ str = reader.ReadLine();
+ string[] xu = new String[3];
+ xu = str.Split(',');
+ string ctrnno = xu[0];
+ string pack = xu[1];
+ string pkgs = xu[2];
- string str = "";
-
- while (str != null)
- {
- str = reader.ReadLine();
- string[] xu = new String[3];
- xu = str.Split(',');
- string ctrnno = xu[0];
- string pack = xu[1];
- string pkgs = xu[2];
-
- reader.Close();
+ reader.Close();
- */
+ */
- var path = Server.MapPath("../../UploadFiles/CtrnExcel");
+ var path = Server.MapPath("../../UploadFiles/CtrnExcel");
var path2 = Server.MapPath("../../UploadFiles/CtrnExcel/");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSubSeaOrderController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSubSeaOrderController.cs
index 01427fe1..54e85de9 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSubSeaOrderController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSubSeaOrderController.cs
@@ -1071,6 +1071,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "File is Error,Pls Upload Again";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/SeaeOrder");
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs
index 4168be31..239ea701 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs
@@ -2559,7 +2559,17 @@ namespace DSWeb.MvcShipping.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/MsDriver");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/MvcShipping/Controllers/WMSNewController.cs b/DSWeb/Areas/MvcShipping/Controllers/WMSNewController.cs
index 6be5524c..5aba112e 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/WMSNewController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/WMSNewController.cs
@@ -734,6 +734,18 @@ namespace DSWeb.MvcShipping.Controllers
var file = Request.Files["file"];//获取文件
if (file == null)//未上传文件
return new ContentResult { Content = jsonRespose };
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+
var path = Server.MapPath("../../UploadFiles/CtnTkDetail");//获取物理路径
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
diff --git a/DSWeb/Areas/SoftMng/Controllers/ExportController.cs b/DSWeb/Areas/SoftMng/Controllers/ExportController.cs
index c765c640..2531ea17 100644
--- a/DSWeb/Areas/SoftMng/Controllers/ExportController.cs
+++ b/DSWeb/Areas/SoftMng/Controllers/ExportController.cs
@@ -1027,7 +1027,17 @@ namespace DSWeb.SoftMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath(OPAPPLYFilePath);
if (!Directory.Exists(path))
@@ -1054,13 +1064,7 @@ namespace DSWeb.SoftMng.Controllers
var json = JsonConvert.Serialize(new { success = false, Message = "上传文件发生未知错误,请重新上传" });
return new ContentResult() { Content = json };
}
- string ext = Path.GetExtension(file.FileName).ToLower();
- if (ext == ".asp" || ext == ".aspx")
- {
- jsonRespose.Success = false;
- jsonRespose.Message = "不允许上传ASP货ASPX文件";
- return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
- }
+
var result = DecHeadDAL.Deal381XML(filename, Session["USERID"].ToString(), Session["SHOWNAME"].ToString(), Session["COMPANYID"].ToString());
diff --git a/DSWeb/Areas/SoftMng/Controllers/FileInputHandlerController.cs b/DSWeb/Areas/SoftMng/Controllers/FileInputHandlerController.cs
index df14e02c..bcd5ee05 100644
--- a/DSWeb/Areas/SoftMng/Controllers/FileInputHandlerController.cs
+++ b/DSWeb/Areas/SoftMng/Controllers/FileInputHandlerController.cs
@@ -24,6 +24,8 @@ namespace DSWeb.SoftMng.Controllers
HttpPostedFileBase uploadFile = Request.Files[i];
if (uploadFile != null && uploadFile.ContentLength > 0)
{
+
+
var relativepath = "../../UploadFiles/Filepuload/" + DateTime.Now.ToString("yyyyMM");//保存的相对路径
var path = Server.MapPath(relativepath);//获取物理路径(按年月创建文件夹分类)
if (!Directory.Exists(path)) Directory.CreateDirectory(path);
diff --git a/DSWeb/Areas/TruckMng/Controllers/MsCustTruckFeeTemplateController.cs b/DSWeb/Areas/TruckMng/Controllers/MsCustTruckFeeTemplateController.cs
index 9a1a8224..3a8577be 100644
--- a/DSWeb/Areas/TruckMng/Controllers/MsCustTruckFeeTemplateController.cs
+++ b/DSWeb/Areas/TruckMng/Controllers/MsCustTruckFeeTemplateController.cs
@@ -371,7 +371,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/TruckMng/Controllers/MsOpTruckBulkController.cs b/DSWeb/Areas/TruckMng/Controllers/MsOpTruckBulkController.cs
index c2292a3d..8bb8c8ee 100644
--- a/DSWeb/Areas/TruckMng/Controllers/MsOpTruckBulkController.cs
+++ b/DSWeb/Areas/TruckMng/Controllers/MsOpTruckBulkController.cs
@@ -1047,7 +1047,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
if (!Directory.Exists(path))
@@ -1119,7 +1129,7 @@ namespace DSWeb.Areas.TruckMng.Controllers
//var table = ds.Tables[0];
- string ext = Path.GetExtension(file.FileName).ToLower();
+ ext = Path.GetExtension(file.FileName).ToLower();
if (ext != ".xls" && ext != ".xlsx")
{
jsonRespose.Success = false;
@@ -1192,6 +1202,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/BulkDetail");
@@ -1264,7 +1285,7 @@ namespace DSWeb.Areas.TruckMng.Controllers
//var table = ds.Tables[0];
- string ext = Path.GetExtension(file.FileName).ToLower();
+
if (ext != ".xls" && ext != ".xlsx")
{
jsonRespose.Success = false;
diff --git a/DSWeb/Areas/TruckMng/Controllers/MsWlBsController.cs b/DSWeb/Areas/TruckMng/Controllers/MsWlBsController.cs
index b9a0ad2a..e014d337 100644
--- a/DSWeb/Areas/TruckMng/Controllers/MsWlBsController.cs
+++ b/DSWeb/Areas/TruckMng/Controllers/MsWlBsController.cs
@@ -347,7 +347,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
msg = "上传文件发生未知错误,请重新上传"
}, "text/html");
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Bs");
if (!Directory.Exists(path))
@@ -475,6 +485,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Bs");
diff --git a/DSWeb/Areas/TruckMng/Controllers/MsWlBsCtnController.cs b/DSWeb/Areas/TruckMng/Controllers/MsWlBsCtnController.cs
index 97e62ecc..15436ccc 100644
--- a/DSWeb/Areas/TruckMng/Controllers/MsWlBsCtnController.cs
+++ b/DSWeb/Areas/TruckMng/Controllers/MsWlBsCtnController.cs
@@ -844,7 +844,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
msg = "上传文件发生未知错误,请重新上传"
}, "text/html");
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Bs");
if (!Directory.Exists(path))
@@ -972,7 +982,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Bs");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/TruckMng/Controllers/MsWlBs_HTController.cs b/DSWeb/Areas/TruckMng/Controllers/MsWlBs_HTController.cs
index d9c61abd..e9c60de8 100644
--- a/DSWeb/Areas/TruckMng/Controllers/MsWlBs_HTController.cs
+++ b/DSWeb/Areas/TruckMng/Controllers/MsWlBs_HTController.cs
@@ -216,7 +216,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
msg = "上传文件发生未知错误,请重新上传"
}, "text/html");
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Bs");
if (!Directory.Exists(path))
@@ -344,7 +354,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Bs");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/TruckMng/Controllers/MsWlDriverController.cs b/DSWeb/Areas/TruckMng/Controllers/MsWlDriverController.cs
index 681bdba8..3aaf79fb 100644
--- a/DSWeb/Areas/TruckMng/Controllers/MsWlDriverController.cs
+++ b/DSWeb/Areas/TruckMng/Controllers/MsWlDriverController.cs
@@ -194,7 +194,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/MsDriver");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/TruckMng/Controllers/MsWl_ADL_FuelTruckListController.cs b/DSWeb/Areas/TruckMng/Controllers/MsWl_ADL_FuelTruckListController.cs
index c41ec95f..2ee73af7 100644
--- a/DSWeb/Areas/TruckMng/Controllers/MsWl_ADL_FuelTruckListController.cs
+++ b/DSWeb/Areas/TruckMng/Controllers/MsWl_ADL_FuelTruckListController.cs
@@ -186,7 +186,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Bs");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/TruckMng/Controllers/MsWl_HH_ZYController.cs b/DSWeb/Areas/TruckMng/Controllers/MsWl_HH_ZYController.cs
index caf2aa33..67170ead 100644
--- a/DSWeb/Areas/TruckMng/Controllers/MsWl_HH_ZYController.cs
+++ b/DSWeb/Areas/TruckMng/Controllers/MsWl_HH_ZYController.cs
@@ -162,7 +162,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Bs");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/TruckMng/Controllers/MsWl_HH_ZY_AuditController.cs b/DSWeb/Areas/TruckMng/Controllers/MsWl_HH_ZY_AuditController.cs
index 8288c648..7fc810c7 100644
--- a/DSWeb/Areas/TruckMng/Controllers/MsWl_HH_ZY_AuditController.cs
+++ b/DSWeb/Areas/TruckMng/Controllers/MsWl_HH_ZY_AuditController.cs
@@ -162,7 +162,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Bs");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/TruckMng/Controllers/MsWl_HaierMainController.cs b/DSWeb/Areas/TruckMng/Controllers/MsWl_HaierMainController.cs
index 72efd20e..907f84a0 100644
--- a/DSWeb/Areas/TruckMng/Controllers/MsWl_HaierMainController.cs
+++ b/DSWeb/Areas/TruckMng/Controllers/MsWl_HaierMainController.cs
@@ -393,7 +393,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Bs");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/TruckMng/Controllers/MsWl_PortController.cs b/DSWeb/Areas/TruckMng/Controllers/MsWl_PortController.cs
index 9471db7e..8cc844ee 100644
--- a/DSWeb/Areas/TruckMng/Controllers/MsWl_PortController.cs
+++ b/DSWeb/Areas/TruckMng/Controllers/MsWl_PortController.cs
@@ -594,7 +594,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/Bs");
if (!Directory.Exists(path))
diff --git a/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_LTJYController.cs b/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_LTJYController.cs
index 398dab0b..983c523d 100644
--- a/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_LTJYController.cs
+++ b/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_LTJYController.cs
@@ -400,7 +400,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/MsOpFiles/" + BillNo);
/////////首先删除全部文件
DirectoryInfo dir = new DirectoryInfo(path);
@@ -492,7 +502,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/WMS/" + BillNo);
/////////首先删除全部文件
DirectoryInfo dir = new DirectoryInfo(path);
diff --git a/DSWeb/Areas/TruckMng/Controllers/TMSRPTController.cs b/DSWeb/Areas/TruckMng/Controllers/TMSRPTController.cs
index 7d3265e8..539a6d05 100644
--- a/DSWeb/Areas/TruckMng/Controllers/TMSRPTController.cs
+++ b/DSWeb/Areas/TruckMng/Controllers/TMSRPTController.cs
@@ -713,7 +713,17 @@ namespace DSWeb.Areas.TruckMng.Controllers
jsonRespose.Message = "上传文件发生未知错误,请重新上传";
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
-
+ if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
+ string ext = Path.GetExtension(file.FileName).ToLower();
+ if (ext == ".asp" || ext == ".aspx" || ext == ".html" || ext == ".exe" || ext == ".bat" || ext == ".dll" || ext == ".vbs" || ext == ".dll" || ext == ".com")
+ {
+ var jsonRespose2 = new JsonResponse { Success = false, Message = "上传文件发生未知错误,请重新上传" };
+ return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
+ }
var path = Server.MapPath("../../UploadFiles/CtnTkDetail");
if (!Directory.Exists(path))
diff --git a/DSWeb/DSWeb.csproj.user b/DSWeb/DSWeb.csproj.user
index 2ea1f905..b93622d6 100644
--- a/DSWeb/DSWeb.csproj.user
+++ b/DSWeb/DSWeb.csproj.user
@@ -4,7 +4,7 @@
ShowAllFiles
D:\DONGSHENG7\DS7HHYT\DSWeb\Properties\PublishProfiles\FolderProfile.pubxml
true
- Debug|Any CPU
+ Release|Any CPU