20260205 交工资料

This commit is contained in:
2026-02-05 11:10:45 +08:00
parent e026277f24
commit 087ced1f68
46 changed files with 465 additions and 381 deletions
+17 -3
View File
@@ -4,7 +4,7 @@
<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>
@@ -39,14 +39,28 @@
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:TextBox ID="txtCode" runat="server" Label="卷号" LabelAlign="Right" Required="true" ShowRedStar="true"></f:TextBox>
<f:TextBox ID="txtCode" runat="server" Label="卷号" LabelAlign="Right"></f:TextBox>
<f:Button ID="btnPrint" Text="封面打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="封面" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ProjectId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ProjectId"
EnableTextSelection="True" AutoScroll="true">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" />
<f:RenderField HeaderText="施工号" ColumnID="ProjectCode" DataField="ProjectCode" SortField="ProjectCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="150px">
</f:RenderField>
<f:RenderField HeaderText="项目名称" ColumnID="ProjectName" DataField="ProjectName" SortField="ProjectName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="350px" ExpandUnusedSpace="true">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:Panel>
</Items>
+31 -9
View File
@@ -7,7 +7,6 @@ using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using System.IO;
namespace FineUIPro.Web.JGZL
@@ -35,7 +34,7 @@ namespace FineUIPro.Web.JGZL
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
this.InitTreeMenu();//加载树
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
//this.BindGrid();
this.BindGrid();
}
}
#endregion
@@ -81,10 +80,33 @@ namespace FineUIPro.Web.JGZL
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
//if (this.tvControlItem.SelectedNodeID != "0")
//{
// this.BindGrid();
//}
if (this.tvControlItem.SelectedNodeID != "0")
{
this.BindGrid();
}
}
#endregion
#region 数据绑定
/// <summary>
/// 数据绑定
/// </summary>
private void BindGrid()
{
string strSql = @"select * from Base_Project where 1=1";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
strSql += " AND ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
@@ -112,14 +134,14 @@ namespace FineUIPro.Web.JGZL
if (projectId != null)
{
if (!string.IsNullOrEmpty(this.txtCode.Text.Trim()))
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
{
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
BLL.Common.FastReportService.ResetData();
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(this.Grid1.SelectedRowID).ProjectName);
keyValuePairs.Add("Code", this.txtCode.Text.Trim());
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
@@ -131,7 +153,7 @@ namespace FineUIPro.Web.JGZL
}
else
{
Alert.ShowInTop("请输入卷号!", MessageBoxIcon.Warning);
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
}
+9
View File
@@ -122,6 +122,15 @@ namespace FineUIPro.Web.JGZL
/// </remarks>
protected global::FineUIPro.Button btnPrint;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// WindowPrint 控件。
/// </summary>
@@ -508,7 +508,7 @@ namespace FineUIPro.Web.JGZL
keyValuePairs.Add("testingStandard", txtTestingStandard.Text.Trim());
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
initTemplatePath = "File\\Fastreport\\管道无损检测数量统计表.frx";
initTemplatePath = "File\\Fastreport\\JGZL\\管道无损检测数量统计表.frx";
if (File.Exists(rootPath + initTemplatePath))
{