提交代码

This commit is contained in:
高飞 2024-01-30 17:19:33 +08:00
parent 77f19c4965
commit 4586e54c65
4 changed files with 66 additions and 6 deletions

View File

@ -41,7 +41,7 @@ namespace FineUIPro.Web.TestRun.DriverRun
(CASE WHEN driverRun.IsAcceptInvite=1 THEN '是' ELSE '否' END) AS IsAcceptInvite,
driverRun.AttachUrl,
driverRun.Remark,
Unit.UnitName AS SubUnitName"
Unit.UnitName AS UnitName"
+ @" FROM DriverRun_DriverRunPlan AS driverRun"
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = driverRun.UnitId WHERE driverRun.ProjectId=@projectId";
List<SqlParameter> listStr = new List<SqlParameter>();

View File

@ -4,12 +4,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑开车保运计划</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent"/>
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
@ -47,7 +47,7 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpUnitWorkIds" runat="server" Label="意向保运装置或单元" LabelAlign="Right" LabelWidth="150px" EnableMultiSelect="true" EnableCheckBoxSelect="true" ></f:DropDownList>
<f:DropDownList ID="drpUnitWorkIds" runat="server" Label="意向保运装置或单元" LabelAlign="Right" LabelWidth="150px" EnableMultiSelect="true" EnableCheckBoxSelect="true"></f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
@ -78,7 +78,11 @@
<f:Label ID="lblAttach" runat="server" Label="上传附件"
LabelWidth="150px">
</f:Label>
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click">
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="保运合同" ToolTip="上传保运合同" runat="server" OnClick="btnAttach_Click">
</f:Button>
<f:Button ID="btnAttachK" Icon="TableCell" EnablePostBack="true" Text="保运考勤表" ToolTip="上传保运考勤表" runat="server" OnClick="btnAttachK_Click">
</f:Button>
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载保运考勤表模板" OnClick="btnDownLoad_Click" Text="下载保运考勤表模板">
</f:Button>
</Items>
</f:Panel>
@ -97,4 +101,4 @@
</f:Window>
</form>
</body>
</html>
</html>

View File

@ -1,5 +1,6 @@
using BLL;
using System;
using System.IO;
namespace FineUIPro.Web.TestRun.DriverRun
{
@ -65,6 +66,43 @@ namespace FineUIPro.Web.TestRun.DriverRun
}
#endregion
#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 + "File\\Excel\\DataIn\\CivilStructure导入模板.xls";
string filePath = "File\\Excel\\DataIn\\CivilStructure导入模板.xls";
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
#region
/// <summary>
/// 保存按钮

View File

@ -192,6 +192,24 @@ namespace FineUIPro.Web.TestRun.DriverRun {
/// </remarks>
protected global::FineUIPro.Button btnAttach;
/// <summary>
/// btnAttachK 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachK;
/// <summary>
/// btnDownLoad 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDownLoad;
/// <summary>
/// WindowAtt 控件。
/// </summary>