修改进度页面翻页保存和个人信息下载操作手册功能
This commit is contained in:
parent
d2e328e343
commit
4472e41085
|
|
@ -3366,6 +3366,10 @@ namespace BLL
|
|||
/// </summary>
|
||||
public const string PDMSPipelineTemplateUrl = "File\\Excel\\DataIn\\PDMS输出(设计)数据模板.xlsx";
|
||||
/// <summary>
|
||||
/// 赛鼎施工管理信息平台操作手册
|
||||
/// </summary>
|
||||
public const string HelpUrl = "Doc\\赛鼎施工管理信息平台操作手册.docx";
|
||||
/// <summary>
|
||||
/// 施工计划模板
|
||||
/// </summary>
|
||||
public const string ConstructionPlanTemplateUrl = "File\\Word\\ZHGL\\施工计划模板.doc";
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ namespace FineUIPro.Web.JDGL.Check
|
|||
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Save();
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
|
@ -204,10 +205,11 @@ namespace FineUIPro.Web.JDGL.Check
|
|||
string[] ids = this.hdId.Text.Split(',');
|
||||
if (ids.Length > 0)
|
||||
{
|
||||
int i = 0;
|
||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int i = mergedRow.Value<int>("index");
|
||||
//int i = mergedRow.Value<int>("index");
|
||||
if (this.Grid1.Rows[i].DataKeys[2] != null && ids.Contains(this.Grid1.Rows[i].DataKeys[2].ToString()))
|
||||
{
|
||||
Model.WBS_WorkPackage WorkPackage = oldViewInfos.FirstOrDefault(x => x.WorkPackageId == this.Grid1.Rows[i].DataKeys[2].ToString());
|
||||
|
|
@ -325,6 +327,7 @@ namespace FineUIPro.Web.JDGL.Check
|
|||
}
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ namespace FineUIPro.Web.JDGL.Check
|
|||
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Save();
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
|
@ -107,10 +108,12 @@ namespace FineUIPro.Web.JDGL.Check
|
|||
string[] ids = this.hdId.Text.Split(',');
|
||||
if (ids.Length > 0)
|
||||
{
|
||||
int i = 0;
|
||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int i = mergedRow.Value<int>("index");
|
||||
//int i = mergedRow.Value<int>("index");
|
||||
string name = values.Value<string>("Name");
|
||||
if (this.Grid1.Rows[i].DataKeys[2] != null && ids.Contains(this.Grid1.Rows[i].DataKeys[2].ToString()))
|
||||
{
|
||||
Model.WBS_WorkPackage workPackage = workPackages.FirstOrDefault(x => x.WorkPackageId == this.Grid1.Rows[i].DataKeys[2].ToString());
|
||||
|
|
@ -191,6 +194,7 @@ namespace FineUIPro.Web.JDGL.Check
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" OnCustomEvent="PageManager1_CustomEvent" />
|
||||
<f:Panel ID="Panel2" runat="server" ShowHeader="false" ShowBorder="false" ColumnWidth="100%" MarginRight="5px">
|
||||
<Items>
|
||||
<f:TabStrip ID="TabStrip1" CssClass="f-tabstrip-theme-simple" Height="550px" ShowBorder="true"
|
||||
|
|
@ -33,6 +33,8 @@
|
|||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbSystemVersion" Hidden="true" Label="系统版本"></f:Label>
|
||||
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载操作手册" Text="下载操作手册" OnClick="btnDownLoad_Click">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:HiddenField runat="server" ID="hdUrl"></f:HiddenField>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" OnClick="btnSave_Click" Text="保存">
|
||||
|
|
|
|||
|
|
@ -285,5 +285,42 @@
|
|||
{
|
||||
this.Tab1LoadData();
|
||||
}
|
||||
|
||||
#region 下载模板
|
||||
/// <summary>
|
||||
/// 下载模板按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDownLoad_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载操作手册吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载导入模板
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
|
||||
{
|
||||
if (e.EventArgument == "Confirm_OK")
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + Const.HelpUrl;
|
||||
string filePath = Const.HelpUrl;
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
FileInfo info = new FileInfo(uploadfilepath);
|
||||
long fileSize = info.Length;
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.ContentType = "excel/plain";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
|
||||
Response.TransmitFile(uploadfilepath, 0, fileSize);
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -75,6 +75,15 @@ namespace FineUIPro.Web.Personal {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbSystemVersion;
|
||||
|
||||
/// <summary>
|
||||
/// btnDownLoad 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDownLoad;
|
||||
|
||||
/// <summary>
|
||||
/// hdUrl 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue