2023-08-04

This commit is contained in:
2023-08-04 17:06:50 +08:00
parent 70a51ab125
commit 78e8037f08
81 changed files with 8897 additions and 2763 deletions
@@ -725,5 +725,58 @@ namespace FineUIPro.Web.AttachFile
{
}
protected void btnOnlineEdit_OnClick(object sender, EventArgs e)
{
JArray source = GetSourceData();
for (int i = 0, count = source.Count; i < count; i++)
{
JObject item = source[i] as JObject;
if (item.Value<string>("id") == Grid1.SelectedRowID)
{
try
{
string savedName = item.Value<string>("savedName");
string folder = item.Value<string>("folder");
string xnUrl = AttachPath + "\\" + savedName;
if (!string.IsNullOrEmpty(folder))
{
xnUrl = folder + savedName;
}
string url = Funs.RootPath + xnUrl;
if (savedName.Contains("FileUpLoad"))
{
url = Funs.RootPath + savedName.Replace('/', '\\');
}
FileInfo info = new FileInfo(url);
if (!info.Exists || string.IsNullOrEmpty(savedName))
{
url = Funs.RootPath + "Images//Null.jpg";
info = new FileInfo(url);
}
var FiletExtension = Path.GetExtension(savedName);
bool isSupportType = FiletExtension.Equals(".docx");
if (isSupportType)
{
url = url.Replace(Funs.RootPath, "");
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/OnlineEditing.aspx?fileUrl={0}", url, "编辑 -")));
}
else
{
ShowNotify("不支持在线编辑", MessageBoxIcon.Warning);
}
}
catch (Exception)
{
}
}
}
}
}
}