代码无效引用清理,试压包资料界面看板修改
This commit is contained in:
@@ -1,26 +1,19 @@
|
||||
using BLL;
|
||||
using FineUIPro;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Policy;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace WordEdit
|
||||
{
|
||||
public partial class EditOffice : System.Web.UI.Page
|
||||
{
|
||||
public string url;
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
string cmd= Request.QueryString["cmd"];
|
||||
|
||||
string cmd = Request.QueryString["cmd"];
|
||||
var a = cmd.Split('|');
|
||||
if (a[1] == "CQMSMainPlan")
|
||||
{
|
||||
@@ -28,19 +21,19 @@ namespace WordEdit
|
||||
string filepath = model.FilePath;
|
||||
url = Funs.SGGLUrl + filepath;
|
||||
}
|
||||
else if (a[1]== "CQMSSubPlan")
|
||||
else if (a[1] == "CQMSSubPlan")
|
||||
{
|
||||
var model = BLL.CQMS_SubPlanService.GetSubPlanBySubPlanId(a[0]);
|
||||
string filepath = model.FilePath;
|
||||
url = Funs.SGGLUrl + filepath;
|
||||
}
|
||||
else if (a[1]== "Companytemplate")
|
||||
else if (a[1] == "Companytemplate")
|
||||
{
|
||||
var model = BLL.Base_CompanytemplateService.GetBase_CompanyTemplateById(a[0]);
|
||||
string filepath = model.FilePath;
|
||||
url = Funs.SGGLUrl + filepath;
|
||||
}
|
||||
else if (a[1]== "CQMS_Check_MaterialAcceptance")
|
||||
else if (a[1] == "CQMS_Check_MaterialAcceptance")
|
||||
{
|
||||
var model = BLL.CheckMaterialacceptanceService.GetCheck_MaterialAcceptanceById(a[0]);
|
||||
string filepath = model.FilePath;
|
||||
@@ -52,6 +45,6 @@ namespace WordEdit
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace WordEdit
|
||||
{
|
||||
|
||||
@@ -14,21 +14,21 @@ namespace FineUIPro.Web.AttachFile
|
||||
|
||||
var url = Request.Params["fileUrl"];
|
||||
var Baseurl = "https://view.officeapps.live.com/op/embed.aspx?src=";
|
||||
// var Baseurl = "https://view.xdocin.com/view?src=";
|
||||
// var Baseurl = "https://view.xdocin.com/view?src=";
|
||||
var Fileurl = Funs.SGGLUrl + url.Replace(Funs.RootPath, "");
|
||||
var newurl = "";
|
||||
var FiletExtension = Path.GetExtension(url);
|
||||
if (FiletExtension == ".docx" || FiletExtension == ".doc"|| FiletExtension == ".xls" || FiletExtension == ".xlsx")
|
||||
if (FiletExtension == ".docx" || FiletExtension == ".doc" || FiletExtension == ".xls" || FiletExtension == ".xlsx")
|
||||
{
|
||||
newurl = Baseurl + Fileurl;
|
||||
}
|
||||
else if (FiletExtension == ".txt"|| FiletExtension== "pdf")
|
||||
else if (FiletExtension == ".txt" || FiletExtension == "pdf")
|
||||
{
|
||||
newurl = Fileurl;
|
||||
}
|
||||
else
|
||||
{
|
||||
newurl = Fileurl;
|
||||
else
|
||||
{
|
||||
newurl = Fileurl;
|
||||
}
|
||||
|
||||
this.LookHtml.Src = newurl;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace FineUIPro.Web.AttachFile
|
||||
{
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
|
||||
namespace FineUIPro.Web.AttachFile
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace FineUIPro.Web.AttachFile
|
||||
// 文件名完整路径
|
||||
string fileName = postedFile.FileName;
|
||||
// 文件名保存的服务器路径
|
||||
string savedFileName = GetSavedFileName(fileName,owner).Replace('#', '-'); ;
|
||||
string savedFileName = GetSavedFileName(fileName, owner).Replace('#', '-'); ;
|
||||
postedFile.SaveAs(context.Server.MapPath("~/" + attachPath + "/" + savedFileName));
|
||||
|
||||
string shortFileName = GetFileName(fileName);
|
||||
@@ -123,7 +123,7 @@ namespace FineUIPro.Web.AttachFile
|
||||
return shortFileName;
|
||||
}
|
||||
|
||||
private string GetSavedFileName(string fileName,string owner)
|
||||
private string GetSavedFileName(string fileName, string owner)
|
||||
{
|
||||
fileName = fileName.Replace(":", "_").Replace(" ", "_").Replace("\\", "_").Replace("/", "_");
|
||||
if (!owner.Contains("DocAttachUrl"))
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace WordEdit
|
||||
{
|
||||
public partial class save : System.Web.UI.Page
|
||||
{
|
||||
|
||||
|
||||
//参数savetype定义要另存的文档格式office,html,pdf
|
||||
//参数filetype定义要保存的文档的文件内型
|
||||
public string savetype, filetype, fid, title, fother, fname, fname1;
|
||||
@@ -43,7 +37,7 @@ namespace WordEdit
|
||||
case "1":
|
||||
saveoffice();
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
saveoffice();
|
||||
break;
|
||||
@@ -54,7 +48,7 @@ namespace WordEdit
|
||||
public void saveoffice()
|
||||
{
|
||||
string uploadoffiepath = Server.MapPath("~/");//上传文件的路径
|
||||
// string uploadoffiepath = filepath;//上传文件的路径
|
||||
// string uploadoffiepath = filepath;//上传文件的路径
|
||||
string attpath = Server.MapPath(attachpath);//上传附件文件路径
|
||||
|
||||
System.Web.HttpFileCollection uploadFiles = Request.Files;
|
||||
@@ -72,11 +66,11 @@ namespace WordEdit
|
||||
// theFile.SaveAs(uploadoffiepath + @"\" + fname);
|
||||
var path = theFile.FileName.Replace(Funs.SGGLUrl, "");
|
||||
theFile.SaveAs(uploadoffiepath + path);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -538,7 +538,7 @@ namespace FineUIPro.Web.AttachFile
|
||||
List<string> lists = Funs.GetStrListByStr(ToKeyId, ',');
|
||||
sours = (from x in Funs.DB.AttachFile where lists.Contains(x.ToKeyId) select x).ToList();
|
||||
string attachSource = string.Empty;
|
||||
if (sours.Count>0)
|
||||
if (sours.Count > 0)
|
||||
{
|
||||
foreach (var sour in sours)
|
||||
{
|
||||
@@ -562,7 +562,7 @@ namespace FineUIPro.Web.AttachFile
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(attachSource))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user