20260311 管道静电接地测试记录

This commit is contained in:
毕文静 2026-03-11 17:28:38 +08:00
parent 40faaf8bc6
commit 41e293d586
8 changed files with 601 additions and 294 deletions

View File

@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web.UI.WebControls;
namespace BLL namespace BLL
{ {
@ -22,6 +23,16 @@ namespace BLL
return Funs.DB.JGZL_ElectrostaticGrounding.FirstOrDefault(e => e.ElectrostaticGroundingId == electrostaticGroundingId); return Funs.DB.JGZL_ElectrostaticGrounding.FirstOrDefault(e => e.ElectrostaticGroundingId == electrostaticGroundingId);
} }
/// <summary>
/// 获取管道静电接地测试记录列表记录
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public static List<Model.JGZL_ElectrostaticGrounding> GetElectrostaticGroundingLists(string projectId)
{
return (from x in Funs.DB.JGZL_ElectrostaticGrounding where x.ProjectId == projectId select x).ToList();
}
/// <summary> /// <summary>
/// 添加 /// 添加
/// </summary> /// </summary>
@ -84,5 +95,16 @@ namespace BLL
db.SubmitChanges(); db.SubmitChanges();
} }
} }
public static void DeleteDeleteElectrostaticGroundingByProjectId(string projectId)
{
SGGLDB db = Funs.DB;
var report = (from x in db.JGZL_ElectrostaticGrounding where x.ProjectId == projectId select x).ToList();
if (report.Count > 0)
{
db.JGZL_ElectrostaticGrounding.DeleteAllOnSubmit(report);
db.SubmitChanges();
}
}
} }
} }

View File

@ -1,7 +1,48 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="01/14/2026 10:49:53" ReportInfo.Modified="02/24/2026 10:56:21" ReportInfo.CreatorVersion="2017.1.16.0"> <Report ScriptLanguage="CSharp" ReportInfo.Created="01/14/2026 10:49:53" ReportInfo.Modified="03/11/2026 17:24:09" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing;
using System.Data;
using FastReport;
using FastReport.Data;
using FastReport.Dialog;
using FastReport.Barcode;
using FastReport.Table;
using FastReport.Utils;
namespace FastReport
{
public class ReportScript
{
private void Table3_ManualBuild(object sender, EventArgs e)
{
DataSourceBase rowData = Report.GetDataSource(&quot;Data&quot;);
// init the data source
rowData.Init();
// print the first table row - it is a header
// now enumerate the data source and print the table body
while (rowData.HasMoreRows)
{
// print the table body
Table3.PrintRow(0);
Table3.PrintColumns();
// go next data source row
rowData.Next();
}
}
}
}
</ScriptText>
<Dictionary> <Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFnITlzB5GjPX7KsP0wxLZ/Q=="> <MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFzsQOzZJGNfutOS1d36ZVeQ==">
<TableDataSource Name="Data" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="Data"> <TableDataSource Name="Data" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="Data">
<Column Name="PipelineCode" DataType="System.String" PropName="attach_image_id"/> <Column Name="PipelineCode" DataType="System.String" PropName="attach_image_id"/>
<Column Name="ConnectionType" DataType="System.String" PropName="image_series"/> <Column Name="ConnectionType" DataType="System.String" PropName="image_series"/>
@ -84,7 +125,7 @@
</TableObject> </TableObject>
</PageHeaderBand> </PageHeaderBand>
<DataBand Name="Data1" Top="183.55" Width="646.38" Height="37.8" Guides="0,37.8"> <DataBand Name="Data1" Top="183.55" Width="646.38" Height="37.8" Guides="0,37.8">
<TableObject Name="Table3" Width="646.4" Height="37.8" Border.Lines="Left, Bottom"> <TableObject Name="Table3" Width="646.4" Height="37.8" Border.Lines="Left, Bottom" ManualBuildEvent="Table3_ManualBuild">
<TableColumn Name="Column14" Width="137.5"/> <TableColumn Name="Column14" Width="137.5"/>
<TableColumn Name="Column15" Width="80.8"/> <TableColumn Name="Column15" Width="80.8"/>
<TableColumn Name="Column16" Width="71.35"/> <TableColumn Name="Column16" Width="71.35"/>

View File

@ -37,12 +37,14 @@
<Toolbars> <Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right"> <f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items> <Items>
<f:DatePicker ID="txtStartDate" runat="server" Label="记录时间" LabelAlign="Right" Width="220px" AutoPostBack="true" OnTextChanged="Text_TextChanged"></f:DatePicker> <%--<f:DatePicker ID="txtStartDate" runat="server" Label="记录时间" LabelAlign="Right" Width="220px" AutoPostBack="true" OnTextChanged="Text_TextChanged"></f:DatePicker>
<f:Label ID="lblTo" runat="server" Text="-" Width="10px"></f:Label> <f:Label ID="lblTo" runat="server" Text="-" Width="10px"></f:Label>
<f:DatePicker ID="txtEndDate" runat="server" Width="120px" AutoPostBack="true" OnTextChanged="Text_TextChanged"></f:DatePicker> <f:DatePicker ID="txtEndDate" runat="server" Width="120px" AutoPostBack="true" OnTextChanged="Text_TextChanged"></f:DatePicker>--%>
<f:DropDownList ID="drpIsoId" runat="server" Label="管道编号/单线号" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="drpIsoId_SelectedIndexChanged" AutoSelectFirstItem="false" LabelWidth="120px"></f:DropDownList>
<f:ToolbarFill ID="ToolbarFill1" runat="server"> <f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill> </f:ToolbarFill>
<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button> <f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>
<f:Button ID="btnSave" Text="保存" ToolTip="保存" Icon="SystemSave" runat="server" OnClick="btnSave_Click"></f:Button>
<f:Button ID="btnPrint" Text="管道静电接地测试记录打印" Icon="Printer" runat="server" OnClick="btnPrint_Click"> <f:Button ID="btnPrint" Text="管道静电接地测试记录打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
</f:Button> </f:Button>
</Items> </Items>
@ -54,42 +56,75 @@
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ElectrostaticGroundingId" AllowSorting="true" EnableColumnLines="true" ClicksToEdit="1" DataIDField="ElectrostaticGroundingId" AllowSorting="true"
SortField="CompileDate" SortDirection="Desc" OnSort="Grid1_Sort" AllowPaging="true" SortField="CompileDate" SortDirection="Desc" OnSort="Grid1_Sort" AllowPaging="true"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="True" AutoScroll="true" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"> EnableTextSelection="True" AutoScroll="true" OnPreDataBound="Grid1_PreDataBound">
<Columns> <Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" />
<f:RenderField HeaderText="管道编号/单线号" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode" <f:RenderField HeaderText="管道编号/单线号" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="150px" ExpandUnusedSpace="true"> FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="260px">
<Editor>
<f:TextBox ID="txtPipelineCode" runat="server"></f:TextBox>
</Editor>
</f:RenderField> </f:RenderField>
<f:GroupField HeaderText="法兰或螺纹接头" HeaderTextAlign="Center" TextAlign="Center"> <f:GroupField HeaderText="法兰或螺纹接头" HeaderTextAlign="Center" TextAlign="Center">
<Columns> <Columns>
<f:BoundField ColumnID="ConnectionType" DataField="ConnectionType" HeaderText="接头型式" SortField="ConnectionType" HeaderTextAlign="Center" TextAlign="Center" Width="100px"></f:BoundField> <f:RenderField HeaderText="接头型式" ColumnID="ConnectionType" DataField="ConnectionType" SortField="ConnectionType"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<Editor>
<f:TextBox ID="txtConnectionType" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:GroupField HeaderText="跨接导线" HeaderTextAlign="Center" TextAlign="Center"> <f:GroupField HeaderText="跨接导线" HeaderTextAlign="Center" TextAlign="Center">
<Columns> <Columns>
<f:BoundField ColumnID="BWSpecification" DataField="BWSpecification" HeaderText="规格" SortField="BWSpecification" HeaderTextAlign="Center" TextAlign="Center" Width="100px"></f:BoundField>
<f:BoundField ColumnID="BWMaterial" DataField="BWMaterial" HeaderText="材质" SortField="BWMaterial" HeaderTextAlign="Center" TextAlign="Center" Width="100px"></f:BoundField> <f:RenderField HeaderText="规格" ColumnID="BWSpecification" DataField="BWSpecification" SortField="BWSpecification"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<Editor>
<f:TextBox ID="txtBWSpecification" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="材质" ColumnID="BWMaterial" DataField="BWMaterial" SortField="BWMaterial"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<Editor>
<f:TextBox ID="txtBWMaterial" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
</Columns> </Columns>
</f:GroupField> </f:GroupField>
<f:BoundField ColumnID="BWResistance" DataField="BWResistance" HeaderText="电阻值0.03Ω" SortField="BWResistance" HeaderTextAlign="Center" TextAlign="Center" Width="100px"></f:BoundField> <f:RenderField HeaderText="电阻值0.03Ω" ColumnID="BWResistance" DataField="BWResistance" SortField="BWResistance"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<Editor>
<f:TextBox ID="txtBWResistance" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
</Columns> </Columns>
</f:GroupField> </f:GroupField>
<f:GroupField HeaderText="接地引线" HeaderTextAlign="Center" TextAlign="Center"> <f:GroupField HeaderText="接地引线" HeaderTextAlign="Center" TextAlign="Center">
<Columns> <Columns>
<f:BoundField ColumnID="GWSpecification" DataField="GWSpecification" HeaderText="规格" SortField="GWSpecification" HeaderTextAlign="Center" TextAlign="Center" Width="100px"></f:BoundField> <f:RenderField HeaderText="规格" ColumnID="GWSpecification" DataField="GWSpecification" SortField="GWSpecification"
<f:BoundField ColumnID="GWMaterial" DataField="GWMaterial" HeaderText="材质" SortField="GWMaterial" HeaderTextAlign="Center" TextAlign="Center" Width="100px"></f:BoundField> FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<f:BoundField ColumnID="GWResistance" DataField="GWResistance" HeaderText="对地电阻100Ω" SortField="GWResistance" HeaderTextAlign="Center" TextAlign="Center" Width="100px"></f:BoundField> <Editor>
<f:TextBox ID="txtGWSpecification" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="材质" ColumnID="GWMaterial" DataField="GWMaterial" SortField="GWMaterial"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<Editor>
<f:TextBox ID="txtGWMaterial" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="对地电阻100Ω" ColumnID="GWResistance" DataField="GWResistance" SortField="GWResistance"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<Editor>
<f:TextBox ID="txtGWResistance" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
</Columns> </Columns>
</f:GroupField> </f:GroupField>
<f:RenderField HeaderText="记录人" ColumnID="CompileManName" DataField="CompileManName" SortField="CompileManName" <f:LinkButtonField ColumnID="Delete3" Width="60px" EnablePostBack="false" Icon="Delete"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px"> HeaderTextAlign="Center" HeaderText="删除" />
</f:RenderField> <f:RenderField HeaderText="主键" ColumnID="ElectrostaticGroundingId" DataField="ElectrostaticGroundingId" SortField="ElectrostaticGroundingId"
<f:RenderField HeaderText="记录时间" ColumnID="CompileDate" DataField="CompileDate" SortField="CompileDate" FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px" Hidden="true">
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField> </f:RenderField>
</Columns> </Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems> <PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> <f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator> </f:ToolbarSeparator>
@ -108,30 +143,14 @@
</f:Panel> </f:Panel>
</Items> </Items>
</f:Panel> </f:Panel>
<f:Window ID="Window1" Title="管道静电接地测试记录" Hidden="true" EnableIFrame="true" EnableMaximize="true" <%--<f:Window ID="Window1" Title="管道静电接地测试记录" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true" Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="700px" Height="620px"> Width="700px" Height="620px">
</f:Window> </f:Window>--%>
<f:Window ID="WindowPrint" Title="打印管道静电接地测试记录" Hidden="true" EnableIFrame="true" EnableMaximize="false" <f:Window ID="WindowPrint" Title="打印管道静电接地测试记录" Hidden="true" EnableIFrame="true" EnableMaximize="false"
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1024px" Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1024px"
Height="600px"> Height="600px">
</f:Window> </f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="TableEdit">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
</f:MenuButton>
</f:Menu>
</form> </form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
</script>
</body> </body>
</html> </html>

View File

@ -1,18 +1,56 @@
using BLL; using BLL;
using Newtonsoft.Json.Linq;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data.SqlClient;
using System.Data; using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq; using System.Linq;
using System.Web; using System.Web;
using System.Web.UI; using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using System.IO;
namespace FineUIPro.Web.JGZL namespace FineUIPro.Web.JGZL
{ {
public partial class ElectrostaticGrounding : PageBase public partial class ElectrostaticGrounding : PageBase
{ {
#region
/// <summary>
/// 主键
/// </summary>
private string ElectrostaticGroundingId
{
get
{
return (string)ViewState["ElectrostaticGroundingId"];
}
set
{
ViewState["ElectrostaticGroundingId"] = value;
}
}
/// <summary>
/// 项目Id
/// </summary>
private string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 定义集合
/// </summary>
private static List<Model.JGZL_ElectrostaticGrounding> items = new List<Model.JGZL_ElectrostaticGrounding>();
#endregion
#region #region
/// <summary> /// <summary>
/// 加载页面 /// 加载页面
@ -34,7 +72,65 @@ namespace FineUIPro.Web.JGZL
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
this.InitTreeMenu();//加载树 this.InitTreeMenu();//加载树
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
this.BindGrid(); this.ProjectId = this.tvControlItem.SelectedNodeID;
//管线
this.drpIsoId.DataTextField = "ISO_IsoNo";
this.drpIsoId.DataValueField = "ISO_IsoNo";
this.drpIsoId.DataSource = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId);
this.drpIsoId.DataBind();
PageInfo();
}
}
private void PageInfo()
{
items.Clear();
if (!string.IsNullOrEmpty(this.ProjectId))
{
var reportLists = BLL.ElectrostaticGroundingService.GetElectrostaticGroundingLists(this.ProjectId);
if (reportLists.Count > 0)
{
var isoLists = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId);
foreach (var item in isoLists)
{
var iso = (from x in Funs.DB.JGZL_ElectrostaticGrounding where x.ProjectId == this.ProjectId && x.PipelineCode == item.ISO_IsoNo select x).FirstOrDefault();
if (iso == null)
{
Model.JGZL_ElectrostaticGrounding newReport = new Model.JGZL_ElectrostaticGrounding();
newReport.ElectrostaticGroundingId = SQLHelper.GetNewID();
newReport.ProjectId = this.ProjectId;
newReport.PipelineCode = item.ISO_IsoNo;
reportLists.Add(newReport);
}
}
if (!string.IsNullOrEmpty(this.drpIsoId.SelectedValue) && this.drpIsoId.SelectedValue != BLL.Const._Null)
{
reportLists = reportLists.Where(x => x.PipelineCode.Contains(this.drpIsoId.SelectedValue)).ToList();
}
this.Grid1.DataSource = reportLists;
this.Grid1.DataBind();
}
else
{
var isoLists = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId);
foreach (var iso in isoLists)
{
Model.JGZL_ElectrostaticGrounding newReport = new Model.JGZL_ElectrostaticGrounding();
newReport.ElectrostaticGroundingId = SQLHelper.GetNewID();
newReport.ProjectId = this.ProjectId;
newReport.PipelineCode = iso.ISO_IsoNo;
items.Add(newReport);
}
if (!string.IsNullOrEmpty(this.drpIsoId.SelectedValue) && this.drpIsoId.SelectedValue != BLL.Const._Null)
{
items = items.Where(x => x.PipelineCode.Contains(this.drpIsoId.SelectedValue)).ToList();
}
this.Grid1.DataSource = items;
this.Grid1.DataBind();
}
} }
} }
#endregion #endregion
@ -82,7 +178,9 @@ namespace FineUIPro.Web.JGZL
{ {
if (this.tvControlItem.SelectedNodeID != "0") if (this.tvControlItem.SelectedNodeID != "0")
{ {
this.BindGrid(); this.ProjectId = this.tvControlItem.SelectedNodeID;
PageInfo();
//this.BindGrid();
} }
} }
#endregion #endregion
@ -91,54 +189,54 @@ namespace FineUIPro.Web.JGZL
/// <summary> /// <summary>
/// 数据绑定 /// 数据绑定
/// </summary> /// </summary>
private void BindGrid() //private void BindGrid()
{
//string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
string strSql = @"select g.ElectrostaticGroundingId,
g.ProjectId,
g.PipelineCode,
g.ConnectionType,
g.BWSpecification,
g.BWMaterial,
g.BWResistance,
g.GWSpecification,
g.GWMaterial,
g.GWResistance,
g.CompileMan,
g.CompileDate,
u.UserName as CompileManName
from JGZL_ElectrostaticGrounding g
left join Sys_User u on u.UserId=g.CompileMan where 1=1";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
strSql += " AND g.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
}
if (!string.IsNullOrEmpty(this.txtStartDate.Text))
{
strSql += " AND g.CompileDate >=@satartDate";
listStr.Add(new SqlParameter("@satartDate", Funs.GetNewDateTime(this.txtStartDate.Text)));
}
if (!string.IsNullOrEmpty(this.txtEndDate.Text))
{
strSql += " AND g.CompileDate <=@endDate";
listStr.Add(new SqlParameter("@endDate", Funs.GetNewDateTime(this.txtEndDate.Text)));
}
//else
//{ //{
// strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 "; // //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
// listStr.Add(new SqlParameter("@ProjectId", projectIds)); // string strSql = @"select g.ElectrostaticGroundingId,
// g.ProjectId,
// g.PipelineCode,
// g.ConnectionType,
// g.BWSpecification,
// g.BWMaterial,
// g.BWResistance,
// g.GWSpecification,
// g.GWMaterial,
// g.GWResistance,
// g.CompileMan,
// g.CompileDate,
// u.UserName as CompileManName
// from JGZL_ElectrostaticGrounding g
// left join Sys_User u on u.UserId=g.CompileMan where 1=1";
// List<SqlParameter> listStr = new List<SqlParameter>();
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
// {
// strSql += " AND g.ProjectId = @ProjectId";
// listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
// }
// //if (!string.IsNullOrEmpty(this.txtStartDate.Text))
// //{
// // strSql += " AND g.CompileDate >=@satartDate";
// // listStr.Add(new SqlParameter("@satartDate", Funs.GetNewDateTime(this.txtStartDate.Text)));
// //}
// //if (!string.IsNullOrEmpty(this.txtEndDate.Text))
// //{
// // strSql += " AND g.CompileDate <=@endDate";
// // listStr.Add(new SqlParameter("@endDate", Funs.GetNewDateTime(this.txtEndDate.Text)));
// //}
// //else
// //{
// // strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 ";
// // listStr.Add(new SqlParameter("@ProjectId", projectIds));
// //}
// SqlParameter[] parameter = listStr.ToArray();
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// // 2.获取当前分页数据
// Grid1.RecordCount = tb.Rows.Count;
// //tb = GetFilteredTable(Grid1.FilteredData, tb);
// var table = this.GetPagedDataTable(Grid1, tb);
// Grid1.DataSource = table;
// Grid1.DataBind();
//} //}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
Grid1.RecordCount = tb.Rows.Count;
//tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion #endregion
#region #region
@ -150,7 +248,8 @@ namespace FineUIPro.Web.JGZL
/// <param name="e"></param> /// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{ {
BindGrid(); //BindGrid();
PageInfo();
} }
#endregion #endregion
@ -162,7 +261,8 @@ namespace FineUIPro.Web.JGZL
/// <param name="e"></param> /// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e) protected void Grid1_Sort(object sender, GridSortEventArgs e)
{ {
BindGrid(); //BindGrid();
PageInfo();
} }
#endregion #endregion
@ -175,7 +275,8 @@ namespace FineUIPro.Web.JGZL
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{ {
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid(); //BindGrid();
PageInfo();
} }
#endregion #endregion
#endregion #endregion
@ -188,9 +289,11 @@ namespace FineUIPro.Web.JGZL
///<param name="e"></param> ///<param name="e"></param>
protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e)
{ {
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.ProjectId= this.drpProjectId.SelectedValue;
this.InitTreeMenu(); this.InitTreeMenu();
BindGrid(); this.tvControlItem.SelectedNodeID = this.ProjectId;
PageInfo();
//BindGrid();
} }
/// <summary> /// <summary>
@ -200,7 +303,7 @@ namespace FineUIPro.Web.JGZL
/// <param name="e"></param> /// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e) protected void TextBox_TextChanged(object sender, EventArgs e)
{ {
this.BindGrid(); //this.BindGrid();
} }
#endregion #endregion
@ -212,9 +315,9 @@ namespace FineUIPro.Web.JGZL
/// <param name="e"></param> /// <param name="e"></param>
protected void btnPrint_Click(object sender, EventArgs e) protected void btnPrint_Click(object sender, EventArgs e)
{ {
string projectId = this.tvControlItem.SelectedNodeID; //string projectId = this.tvControlItem.SelectedNodeID;
if (projectId != null) if (!string.IsNullOrEmpty(this.ProjectId))
{ {
string initTemplatePath = ""; string initTemplatePath = "";
string rootPath = Server.MapPath("~/"); string rootPath = Server.MapPath("~/");
@ -234,12 +337,13 @@ namespace FineUIPro.Web.JGZL
g.CompileDate, g.CompileDate,
u.UserName as CompileManName u.UserName as CompileManName
from JGZL_ElectrostaticGrounding g from JGZL_ElectrostaticGrounding g
left join Sys_User u on u.UserId=g.CompileMan where 1=1"; left join Sys_User u on u.UserId=g.CompileMan where g.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (!string.IsNullOrEmpty(this.drpIsoId.SelectedValue))
{ {
strSql += " AND g.ProjectId = @ProjectId"; strSql += " and g.PipelineCode like @isoNo";
listStr.Add(new SqlParameter("@ProjectId", projectId)); listStr.Add(new SqlParameter("@isoNo", "%" + this.drpIsoId.SelectedValue + "%"));
} }
SqlParameter[] parameter = listStr.ToArray(); SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@ -275,7 +379,7 @@ namespace FineUIPro.Web.JGZL
BLL.Common.FastReportService.AddFastreportTable(dt); BLL.Common.FastReportService.AddFastreportTable(dt);
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>(); 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.ProjectId).ProjectName);
keyValuePairs.Add("CompileMan", tb.Rows[0]["CompileManName"].ToString()); keyValuePairs.Add("CompileMan", tb.Rows[0]["CompileManName"].ToString());
if (!string.IsNullOrEmpty(tb.Rows[0]["CompileDate"].ToString())) if (!string.IsNullOrEmpty(tb.Rows[0]["CompileDate"].ToString()))
{ {
@ -314,7 +418,36 @@ namespace FineUIPro.Web.JGZL
{ {
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{ {
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ElectrostaticGroundingEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); JArray teamGroupData = Grid1.GetMergedData();
List<JObject> list = new List<JObject>();
foreach (JObject teamGroupRow in teamGroupData)
{
JObject values = teamGroupRow.Value<JObject>("values");
list.Add(values);
}
JObject defaultObj = new JObject
{
{ "ElectrostaticGroundingId", Guid.NewGuid() },
{ "PipelineCode", "" },
{ "ConnectionType", "" },
{ "BWSpecification", "" },
{ "BWMaterial", "" },
{ "BWResistance", "" },
{ "GWSpecification", "" },
{ "GWMaterial", "" },
{ "GWResistance", "" },
{
"Delete3",
String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>",
GetDeleteScriptGrid1(), IconHelper.GetResolvedIconUrl(Icon.Delete))
}
};
list.Add(defaultObj);
Grid1.DataSource = list;
Grid1.DataBind();
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TeamWeldingInspectionEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
} }
else else
{ {
@ -323,126 +456,143 @@ namespace FineUIPro.Web.JGZL
} }
} }
protected void Grid1_PreDataBound(object sender, EventArgs e)
{
// 设置LinkButtonField的点击客户端事件
LinkButtonField deleteField = Grid1.FindColumn("Delete3") as LinkButtonField;
deleteField.OnClientClick = GetDeleteScriptGrid1();
}
/// <summary>
/// 删除提示
/// </summary>
/// <returns></returns>
private string GetDeleteScriptGrid1()
{
return Confirm.GetShowReference("删除选中行?", String.Empty, MessageBoxIcon.Question,
Grid1.GetDeleteSelectedRowsReference(), String.Empty);
}
/// <summary> /// <summary>
/// 双击编辑 /// 双击编辑
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) //protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{ //{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_ElectrostaticGroundingMenuId, BLL.Const.BtnModify)) // if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_ElectrostaticGroundingMenuId, BLL.Const.BtnModify))
{ // {
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{ // {
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) // if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
{ // {
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ElectrostaticGroundingEdit.aspx?electrostaticGroundingId={0}", this.Grid1.SelectedRowID, "编辑 - "))); // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ElectrostaticGroundingEdit.aspx?electrostaticGroundingId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
} // }
else // else
{ // {
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return; // return;
} // }
} // }
else // else
{ // {
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); // Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return; // return;
} // }
} // }
else // else
{ // {
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); // ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
} // }
} //}
/// <summary> /// <summary>
/// 右键编辑 /// 右键编辑
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e) //protected void btnMenuEdit_Click(object sender, EventArgs e)
{ //{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_ElectrostaticGroundingMenuId, BLL.Const.BtnModify)) // if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_ElectrostaticGroundingMenuId, BLL.Const.BtnModify))
{ // {
if (Grid1.SelectedRowIndexArray.Length == 0) // if (Grid1.SelectedRowIndexArray.Length == 0)
{ // {
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return; // return;
} // }
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ElectrostaticGroundingEdit.aspx?electrostaticGroundingId={0}", Grid1.SelectedRowID, "维护 - "))); // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ElectrostaticGroundingEdit.aspx?electrostaticGroundingId={0}", Grid1.SelectedRowID, "维护 - ")));
} // }
else // else
{ // {
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); // Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
} // }
} //}
/// <summary> /// <summary>
/// 右键删除 /// 右键删除
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e) //protected void btnMenuDelete_Click(object sender, EventArgs e)
{ //{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_ElectrostaticGroundingMenuId, Const.BtnDelete)) // if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_ElectrostaticGroundingMenuId, Const.BtnDelete))
{ // {
if (Grid1.SelectedRowIndexArray.Length == 0) // if (Grid1.SelectedRowIndexArray.Length == 0)
{ // {
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return; // return;
} // }
bool isShow = true; // bool isShow = true;
if (Grid1.SelectedRowIndexArray.Length > 1) // if (Grid1.SelectedRowIndexArray.Length > 1)
{ // {
isShow = false; // isShow = false;
} // }
bool isDelete = false; // bool isDelete = false;
foreach (int rowIndex in Grid1.SelectedRowIndexArray) // foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{ // {
string rowID = Grid1.DataKeys[rowIndex][0].ToString(); // string rowID = Grid1.DataKeys[rowIndex][0].ToString();
if (judgementDelete(rowID, isShow)) // if (judgementDelete(rowID, isShow))
{ // {
isDelete = true; // isDelete = true;
BLL.ElectrostaticGroundingService.DeleteElectrostaticGroundingById(rowID); // BLL.ElectrostaticGroundingService.DeleteElectrostaticGroundingById(rowID);
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除管道静电接地测试记录"); // BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除管道静电接地测试记录");
} // }
} // }
if (isDelete) // if (isDelete)
{ // {
ShowNotify("删除成功!", MessageBoxIcon.Success); // ShowNotify("删除成功!", MessageBoxIcon.Success);
} // }
this.BindGrid(); // this.BindGrid();
} // }
else // else
{ // {
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); // Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
} // }
} //}
#region #region
/// <summary> /// <summary>
/// 判断是否可以删除 /// 判断是否可以删除
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
private bool judgementDelete(string id, bool isShow) //private bool judgementDelete(string id, bool isShow)
{ //{
string content = string.Empty; // string content = string.Empty;
if (string.IsNullOrEmpty(content)) // if (string.IsNullOrEmpty(content))
{ // {
return true; // return true;
} // }
else // else
{ // {
if (isShow) // if (isShow)
{ // {
Alert.ShowInTop(content, MessageBoxIcon.Error); // Alert.ShowInTop(content, MessageBoxIcon.Error);
} // }
return false; // return false;
} // }
} //}
#endregion #endregion
#endregion #endregion
@ -452,11 +602,11 @@ namespace FineUIPro.Web.JGZL
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e) //protected void Window1_Close(object sender, WindowCloseEventArgs e)
{ //{
this.InitTreeMenu();//加载树 // this.InitTreeMenu();//加载树
this.BindGrid(); // this.BindGrid();
} //}
#endregion #endregion
#region #region
@ -467,18 +617,80 @@ namespace FineUIPro.Web.JGZL
/// <param name="e"></param> /// <param name="e"></param>
protected void Text_TextChanged(object sender, EventArgs e) protected void Text_TextChanged(object sender, EventArgs e)
{ {
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text); //DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text);
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text); //DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text);
if (startDate != null && endDate != null && startDate > endDate) //if (startDate != null && endDate != null && startDate > endDate)
//{
// Alert.ShowInTop("开始时间不能大于结束时间!", MessageBoxIcon.Warning);
// return;
//}
//else
//{
// BindGrid();
//}
}
#endregion
#region
/// <summary>
/// 提交按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_ElectrostaticGroundingMenuId, Const.BtnSave))
{
items.Clear();
BLL.ElectrostaticGroundingService.DeleteDeleteElectrostaticGroundingByProjectId(this.ProjectId);
JArray teamGroupData = Grid1.GetMergedData();
foreach (JObject teamGroupRow in teamGroupData)
{
JObject values = teamGroupRow.Value<JObject>("values");
int rowIndex = teamGroupRow.Value<int>("index");
Model.JGZL_ElectrostaticGrounding newDetail = new Model.JGZL_ElectrostaticGrounding
{
ElectrostaticGroundingId = values.Value<string>("ElectrostaticGroundingId"),
ProjectId = this.ProjectId,
PipelineCode = values.Value<string>("PipelineCode"),
ConnectionType = values.Value<string>("ConnectionType"),
BWSpecification = values.Value<string>("BWSpecification"),
BWMaterial = values.Value<string>("BWMaterial"),
BWResistance = Funs.GetNewDecimal(values.Value<string>("BWResistance")),
GWSpecification = values.Value<string>("GWSpecification"),
GWMaterial = values.Value<string>("GWMaterial"),
GWResistance = Funs.GetNewDecimal(values.Value<string>("GWResistance")),
CompileMan = this.CurrUser.UserId,
CompileDate = DateTime.Now
};
items.Add(newDetail);
}
try
{
if (items.Count > 0)
{
Funs.DB.JGZL_ElectrostaticGrounding.InsertAllOnSubmit(items);
}
Funs.DB.SubmitChanges();
}
catch (Exception)
{ {
Alert.ShowInTop("开始时间不能大于结束时间!", MessageBoxIcon.Warning);
return; return;
} }
ShowNotify("保存成功!", MessageBoxIcon.Success);
//PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else else
{ {
BindGrid(); Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
} }
} }
#endregion #endregion
protected void drpIsoId_SelectedIndexChanged(object sender, EventArgs e)
{
PageInfo();
}
} }
} }

View File

@ -96,31 +96,13 @@ namespace FineUIPro.Web.JGZL
protected global::FineUIPro.Toolbar Toolbar2; protected global::FineUIPro.Toolbar Toolbar2;
/// <summary> /// <summary>
/// txtStartDate 控件。 /// drpIsoId 控件。
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 自动生成的字段。 /// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DatePicker txtStartDate; protected global::FineUIPro.DropDownList drpIsoId;
/// <summary>
/// lblTo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lblTo;
/// <summary>
/// txtEndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndDate;
/// <summary> /// <summary>
/// ToolbarFill1 控件。 /// ToolbarFill1 控件。
@ -140,6 +122,15 @@ namespace FineUIPro.Web.JGZL
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnAdd; protected global::FineUIPro.Button btnAdd;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary> /// <summary>
/// btnPrint 控件。 /// btnPrint 控件。
/// </summary> /// </summary>
@ -158,6 +149,78 @@ namespace FineUIPro.Web.JGZL
/// </remarks> /// </remarks>
protected global::FineUIPro.Grid Grid1; protected global::FineUIPro.Grid Grid1;
/// <summary>
/// txtPipelineCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPipelineCode;
/// <summary>
/// txtConnectionType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtConnectionType;
/// <summary>
/// txtBWSpecification 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtBWSpecification;
/// <summary>
/// txtBWMaterial 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtBWMaterial;
/// <summary>
/// txtBWResistance 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtBWResistance;
/// <summary>
/// txtGWSpecification 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtGWSpecification;
/// <summary>
/// txtGWMaterial 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtGWMaterial;
/// <summary>
/// txtGWResistance 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtGWResistance;
/// <summary> /// <summary>
/// ToolbarSeparator1 控件。 /// ToolbarSeparator1 控件。
/// </summary> /// </summary>
@ -185,15 +248,6 @@ namespace FineUIPro.Web.JGZL
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize; protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary> /// <summary>
/// WindowPrint 控件。 /// WindowPrint 控件。
/// </summary> /// </summary>
@ -202,32 +256,5 @@ namespace FineUIPro.Web.JGZL
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Window WindowPrint; protected global::FineUIPro.Window WindowPrint;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete;
} }
} }

View File

@ -57,17 +57,12 @@
<Rows> <Rows>
<f:FormRow> <f:FormRow>
<Items> <Items>
<f:TextArea ID="txtHeatInsulationArea" runat="server" Label="隔热部位" LabelAlign="Right" MaxLength="500" Height="60px"></f:TextArea> <f:TextArea ID="txtHeatInsulationArea" runat="server" Label="隔热部位" LabelAlign="Right" MaxLength="500"></f:TextArea>
</Items> </Items>
</f:FormRow> </f:FormRow>
<f:FormRow> <f:FormRow>
<Items> <Items>
<f:TextArea ID="txtInsulationStructure" runat="server" Label="隔热结构" LabelAlign="Right" MaxLength="500" Height="60px"></f:TextArea> <f:TextArea ID="txtInsulationStructure" runat="server" Label="隔热结构" LabelAlign="Right" MaxLength="500"></f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtAcceptanceConclusion" runat="server" Label="验收结论" LabelAlign="Right" MaxLength="500" Height="60px"></f:TextArea>
</Items> </Items>
</f:FormRow> </f:FormRow>
<f:FormRow> <f:FormRow>

View File

@ -89,7 +89,7 @@ namespace FineUIPro.Web.JGZL
this.InsulationAcceptanceRecordId = string.Empty; this.InsulationAcceptanceRecordId = string.Empty;
this.txtHeatInsulationArea.Text = string.Empty; this.txtHeatInsulationArea.Text = string.Empty;
this.txtInsulationStructure.Text = string.Empty; this.txtInsulationStructure.Text = string.Empty;
this.txtAcceptanceConclusion.Text = string.Empty; //this.txtAcceptanceConclusion.Text = string.Empty;
if (!string.IsNullOrEmpty(this.ProjectId)) if (!string.IsNullOrEmpty(this.ProjectId))
{ {
var report = BLL.InsulationAcceptanceRecordService.GetInsulationAcceptanceRecordByProjectId(this.ProjectId); var report = BLL.InsulationAcceptanceRecordService.GetInsulationAcceptanceRecordByProjectId(this.ProjectId);
@ -98,7 +98,7 @@ namespace FineUIPro.Web.JGZL
this.InsulationAcceptanceRecordId = report.InsulationAcceptanceRecordId; this.InsulationAcceptanceRecordId = report.InsulationAcceptanceRecordId;
this.txtHeatInsulationArea.Text = report.HeatInsulationArea; this.txtHeatInsulationArea.Text = report.HeatInsulationArea;
this.txtInsulationStructure.Text = report.InsulationStructure; this.txtInsulationStructure.Text = report.InsulationStructure;
this.txtAcceptanceConclusion.Text = report.AcceptanceConclusion; //this.txtAcceptanceConclusion.Text = report.AcceptanceConclusion;
items = BLL.InsulationAcceptanceRecordItemService.GetItemsByInsulationAcceptanceRecordId(this.InsulationAcceptanceRecordId); items = BLL.InsulationAcceptanceRecordItemService.GetItemsByInsulationAcceptanceRecordId(this.InsulationAcceptanceRecordId);
this.Grid1.DataSource = items; this.Grid1.DataSource = items;
@ -600,7 +600,7 @@ namespace FineUIPro.Web.JGZL
Model.JGZL_InsulationAcceptanceRecord newReport = new Model.JGZL_InsulationAcceptanceRecord(); Model.JGZL_InsulationAcceptanceRecord newReport = new Model.JGZL_InsulationAcceptanceRecord();
newReport.HeatInsulationArea = this.txtHeatInsulationArea.Text.Trim(); newReport.HeatInsulationArea = this.txtHeatInsulationArea.Text.Trim();
newReport.InsulationStructure = this.txtInsulationStructure.Text.Trim(); newReport.InsulationStructure = this.txtInsulationStructure.Text.Trim();
newReport.AcceptanceConclusion = this.txtAcceptanceConclusion.Text.Trim(); //newReport.AcceptanceConclusion = this.txtAcceptanceConclusion.Text.Trim();
if (!string.IsNullOrEmpty(this.InsulationAcceptanceRecordId)) if (!string.IsNullOrEmpty(this.InsulationAcceptanceRecordId))
{ {
newReport.InsulationAcceptanceRecordId = this.InsulationAcceptanceRecordId; newReport.InsulationAcceptanceRecordId = this.InsulationAcceptanceRecordId;
@ -693,11 +693,11 @@ namespace FineUIPro.Web.JGZL
{ {
insulationStructure.Text = this.txtInsulationStructure.Text; insulationStructure.Text = this.txtInsulationStructure.Text;
} }
Bookmark acceptanceConclusion = doc.Range.Bookmarks["AcceptanceConclusion"]; //Bookmark acceptanceConclusion = doc.Range.Bookmarks["AcceptanceConclusion"];
if (acceptanceConclusion != null) //if (acceptanceConclusion != null)
{ //{
acceptanceConclusion.Text = this.txtAcceptanceConclusion.Text; // acceptanceConclusion.Text = this.txtAcceptanceConclusion.Text;
} //}
var itemList = BLL.InsulationAcceptanceRecordItemService.GetItemsByInsulationAcceptanceRecordId(this.InsulationAcceptanceRecordId); var itemList = BLL.InsulationAcceptanceRecordItemService.GetItemsByInsulationAcceptanceRecordId(this.InsulationAcceptanceRecordId);

View File

@ -158,15 +158,6 @@ namespace FineUIPro.Web.JGZL
/// </remarks> /// </remarks>
protected global::FineUIPro.TextArea txtInsulationStructure; protected global::FineUIPro.TextArea txtInsulationStructure;
/// <summary>
/// txtAcceptanceConclusion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtAcceptanceConclusion;
/// <summary> /// <summary>
/// Grid1 控件。 /// Grid1 控件。
/// </summary> /// </summary>