QDHHYT
hanxuntao 1 week ago
parent 2d2bacb65a
commit 5d78b97400

@ -1100,6 +1100,19 @@ namespace DSWeb.Areas.Account.Controllers
}
var imgFile = Request.Files["file"];
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);

@ -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);

@ -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");

@ -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;//随机生成文件名

@ -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"];

@ -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");

@ -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");

@ -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);

@ -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))

@ -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))

@ -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))

@ -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))

@ -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; //新增条数

@ -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))

@ -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() != "")
{

@ -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");

@ -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");

@ -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");

@ -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");

@ -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");

@ -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");

@ -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);

@ -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))

@ -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))

@ -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");

@ -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) };
}

@ -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;

@ -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;

@ -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,7 +2017,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) };
}
/*
Stream stream = file.InputStream;

@ -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");

@ -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))

@ -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);

@ -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());

@ -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);

@ -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))

@ -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;

@ -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");

@ -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))

@ -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))

@ -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))

@ -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))

@ -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))

@ -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))

@ -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))

@ -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))

@ -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);

@ -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))

@ -4,7 +4,7 @@
<ProjectView>ShowAllFiles</ProjectView>
<NameOfLastUsedPublishProfile>D:\DONGSHENG7\DS7HHYT\DSWeb\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress />
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />

Loading…
Cancel
Save