This commit is contained in:
佘春生 2024-05-22 20:47:38 +08:00
commit a7f5f042b2
6 changed files with 438 additions and 275 deletions

2
.gitignore vendored
View File

@ -5735,3 +5735,5 @@ HJGLPackFile/版本日志/HJGLDB_2024.05.02.sql
/DataBase/版本日志/HJGLDB_2024.05.12.sql
/HJGL/.vs/HJGL/v17/.suo
/HJGL/WebApi/ErrLog.txt
/HJGL/Model/Model.cs
/CreateModel.bat

View File

@ -162,7 +162,7 @@
</site>
<site name="WebApi" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\WebApi" />
<virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\WebApi" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:3862:localhost" />

View File

@ -169,6 +169,9 @@ namespace BLL
newPipelineList.PTP_ID = IsoList.PTP_ID;
newPipelineList.PipelineId = IsoList.PipelineId;
newPipelineList.PT_DataType = IsoList.PT_DataType;
newPipelineList.IsAll = IsoList.IsAll;
newPipelineList.WorkAreaId= IsoList.WorkAreaId;
newPipelineList.WeldJonintCode = IsoList.WeldJonintCode;
db.PTP_PipelineList.InsertOnSubmit(newPipelineList);
db.SubmitChanges();
}

View File

@ -7,210 +7,230 @@
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="试压包"
TitleToolTip="试压包" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server"> </f:ToolbarFill>
<f:Button ID="btnSave" Text="保存" ToolTip="保存试压包信息" ValidateForms="SimpleForm1" Icon="SystemSave" runat="server" OnClick="btnSave_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="true" Title="试压包" AutoScroll="true" EnableCollapse="true" Collapsed="false"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtTestPackageNo" Label="试压包号" ShowRedStar="true" Required="true" runat="server" FocusOnPageLoad="true" LabelWidth="120px">
</f:TextBox>
<f:DropDownList ID="drpUnit" Label="单位" runat="server" ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="120px"
AutoPostBack="true" OnSelectedIndexChanged="drpUnit_OnSelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpInstallation" Label="装置名称" runat="server" ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="120px"
AutoPostBack="true" OnSelectedIndexChanged="drpInstallation_OnSelectedIndexChanged">
</f:DropDownList>
<f:TextBox ID="txtTestPackageName" Label="系统名称" runat="server" LabelWidth="120px">
</f:TextBox>
<f:DropDownList ID="drpTestType" Label="试验类型" runat="server" EnableEdit="true" LabelWidth="120px">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtTestService" Label="试验介质" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTestHeat" Label="试验压力" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTestAmbientTemp" Label="试验环境温度" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTestMediumTemp" Label="试验介质温度" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtVacuumTestService" Label="真空试验介质" runat="server" LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtVacuumTestPressure" Label="真空试验压力" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTightnessTestTime" Label="严密性试验时间" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTightnessTestTemp" Label="严密性试验温度" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTightnessTest" Label="严密性试验压力" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTestPressure" Label="耐压试验压力" runat="server" LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtTestPressureTemp" Label="耐压试验温度" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTestPressureTime" Label="耐压试验时间" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtOperationMedium" Label="操作介质" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtPurgingMedium" Label="吹扫介质" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtCleaningMedium" Label="清扫介质" runat="server" LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtLeakageTestService" Label="泄露性试验介质" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtLeakageTestPressure" Label="泄露性试验压力" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtAllowSeepage" Label="允许渗水量" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtFactSeepage" Label="实际渗水量" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtRemark" Label="备注" runat="server" LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpModifier" Label="修改人" runat="server" EnableEdit="true" LabelWidth="120px">
</f:DropDownList>
<f:DatePicker ID="txtModifyDate" Label="修改日期" runat="server" DateFormatString="yyyy-MM-dd" LabelWidth="120px">
</f:DatePicker>
<f:DropDownList ID="drpTabler" Label="建档人" runat="server" EnableEdit="true" LabelWidth="120px" ShowRedStar="true" Required="true" >
</f:DropDownList>
<f:DatePicker ID="txtTableDate" Label="建档日期" runat="server" DateFormatString="yyyy-MM-dd" LabelWidth="120px" ShowRedStar="true" Required="true" >
</f:DatePicker>
<f:CheckBox runat="server" ID="ckSelect" Label="只显示选中项" LabelWidth="120px" AutoPostBack="true"
OnCheckedChanged="ckSelect_OnCheckedChanged"></f:CheckBox>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
<Items>
<f:Form ID="Form2" ShowBorder="true" ShowHeader="true" AutoScroll="true" Title="查询条件" EnableCollapse="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" Collapsed="true">
<Rows>
<f:FormRow>
<Items>
<f:DropDownList ID="drpWorkArea" Label="区域" runat="server" LabelWidth="80px" EnableEdit="true"
AutoPostBack="true" OnSelectedIndexChanged="Find_OnSelectedIndexChanged" >
</f:DropDownList>
<f:DropDownList ID="drpMedium" Label="介质" runat="server" LabelWidth="80px" EnableEdit="true"
AutoPostBack="true" OnSelectedIndexChanged="Find_OnSelectedIndexChanged" >
</f:DropDownList>
<f:DropDownList ID="drpPipingClass" Label="管线等级" runat="server" LabelWidth="80px" EnableEdit="true"
AutoPostBack="true" OnSelectedIndexChanged="Find_OnSelectedIndexChanged" >
</f:DropDownList>
<f:DropDownList ID="drpMaterial" Label="主材质" runat="server" LabelWidth="80px" EnableEdit="true"
AutoPostBack="true" OnSelectedIndexChanged="Find_OnSelectedIndexChanged" >
</f:DropDownList>
<f:NumberBox ID="txtDia" runat="server" Label="外径>=" LabelWidth="80px"></f:NumberBox>
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="试压包"
TitleToolTip="试压包" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:Button ID="btnSave" Text="保存" ToolTip="保存试压包信息" ValidateForms="SimpleForm1" Icon="SystemSave" runat="server" OnClick="btnSave_Click">
</f:Button>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="试压包明细" EnableCollapse="true" Collapsed="false"
runat="server" BoxFlex="1" DataKeyNames="PipelineId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineId" AllowSorting="true"
SortField="WorkAreaCode,PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="100"
OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True" >
<Columns>
<f:CheckBoxField ColumnID="ckbIsSelected" Width="50px" RenderAsStaticField="false" HeaderText="选择"
AutoPostBack="true" CommandName="IsSelected" HeaderTextAlign="Center"/>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="55px" HeaderTextAlign="Center" TextAlign="Center"/>
<f:RenderField HeaderText="工作区" ColumnID="WorkAreaCode" DataField="WorkAreaCode" SortField="WorkAreaCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
</f:RenderField>
<f:RenderField HeaderText="管线编号" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="220px">
</f:RenderField>
<f:RenderField HeaderText="设计压力" ColumnID="DesignPressure" DataField="DesignPressure" SortField="DesignPressure"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="设计温度" ColumnID="DesignTemperature" DataField="DesignTemperature" SortField="DesignTemperature"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="试验压力" ColumnID="TestPressure" DataField="TestPressure" SortField="TestPressure"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="试验温度" ColumnID="TestTemperature" DataField="TestTemperature" SortField="TestTemperature"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="介质" ColumnID="MediumName" DataField="MediumName" SortField="MediumName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="单线图号" ColumnID="SingleNumber" DataField="SingleNumber" SortField="SingleNumber"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="规格" ColumnID="Specification" DataField="Specification" SortField="Specification"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="100" Value="100" />
<f:ListItem Text="150" Value="150" />
<f:ListItem Text="200" Value="200" />
<f:ListItem Text="250" Value="250" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnAllSelect" OnClick="btnAllSelect_Click" EnablePostBack="true"
runat="server" Text="全选" Icon="Accept">
</f:MenuButton>
<f:MenuButton ID="btnNoSelect" OnClick="btnNoSelect_Click" EnablePostBack="true"
runat="server" Text="全不选" Icon="Cancel">
</f:MenuButton>
</f:Menu>
</form>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="true" Title="试压包" AutoScroll="true" EnableCollapse="true" Collapsed="false"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtTestPackageNo" Label="试压包号" ShowRedStar="true" Required="true" runat="server" FocusOnPageLoad="true" LabelWidth="120px">
</f:TextBox>
<f:DropDownList ID="drpUnit" Label="单位" runat="server" ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="120px"
AutoPostBack="true" OnSelectedIndexChanged="drpUnit_OnSelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpInstallation" Label="装置名称" runat="server" ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="120px"
AutoPostBack="true" OnSelectedIndexChanged="drpInstallation_OnSelectedIndexChanged">
</f:DropDownList>
<f:TextBox ID="txtTestPackageName" Label="系统名称" runat="server" LabelWidth="120px">
</f:TextBox>
<f:DropDownList ID="drpTestType" Label="试验类型" runat="server" EnableEdit="true" LabelWidth="120px">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtTestService" Label="试验介质" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTestHeat" Label="试验压力" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTestAmbientTemp" Label="试验环境温度" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTestMediumTemp" Label="试验介质温度" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtVacuumTestService" Label="真空试验介质" runat="server" LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtVacuumTestPressure" Label="真空试验压力" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTightnessTestTime" Label="严密性试验时间" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTightnessTestTemp" Label="严密性试验温度" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTightnessTest" Label="严密性试验压力" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTestPressure" Label="耐压试验压力" runat="server" LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtTestPressureTemp" Label="耐压试验温度" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtTestPressureTime" Label="耐压试验时间" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtOperationMedium" Label="操作介质" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtPurgingMedium" Label="吹扫介质" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtCleaningMedium" Label="清扫介质" runat="server" LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtLeakageTestService" Label="泄露性试验介质" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtLeakageTestPressure" Label="泄露性试验压力" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtAllowSeepage" Label="允许渗水量" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtFactSeepage" Label="实际渗水量" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtRemark" Label="备注" runat="server" LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpModifier" Label="修改人" runat="server" EnableEdit="true" LabelWidth="120px">
</f:DropDownList>
<f:DatePicker ID="txtModifyDate" Label="修改日期" runat="server" DateFormatString="yyyy-MM-dd" LabelWidth="120px">
</f:DatePicker>
<f:DropDownList ID="drpTabler" Label="建档人" runat="server" EnableEdit="true" LabelWidth="120px" ShowRedStar="true" Required="true">
</f:DropDownList>
<f:DatePicker ID="txtTableDate" Label="建档日期" runat="server" DateFormatString="yyyy-MM-dd" LabelWidth="120px" ShowRedStar="true" Required="true">
</f:DatePicker>
<f:CheckBox runat="server" ID="ckSelect" Label="只显示选中项" LabelWidth="120px" AutoPostBack="true"
OnCheckedChanged="ckSelect_OnCheckedChanged">
</f:CheckBox>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
<Items>
<f:Form ID="Form2" ShowBorder="true" ShowHeader="true" AutoScroll="true" Title="查询条件" EnableCollapse="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" Collapsed="false">
<Rows>
<f:FormRow>
<Items>
<f:DropDownList ID="drpWorkArea" Label="区域" runat="server" LabelWidth="80px" EnableEdit="true"
AutoPostBack="true" OnSelectedIndexChanged="Find_OnSelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpMedium" Label="介质" runat="server" LabelWidth="80px" EnableEdit="true"
AutoPostBack="true" OnSelectedIndexChanged="Find_OnSelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpPipingClass" Label="管线等级" runat="server" LabelWidth="80px" EnableEdit="true"
AutoPostBack="true" OnSelectedIndexChanged="Find_OnSelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpMaterial" Label="主材质" runat="server" LabelWidth="80px" EnableEdit="true"
AutoPostBack="true" OnSelectedIndexChanged="Find_OnSelectedIndexChanged">
</f:DropDownList>
<f:NumberBox ID="txtDia" runat="server" Label="外径>=" LabelWidth="80px"></f:NumberBox>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="试压包明细" EnableCollapse="true" Collapsed="false"
runat="server" BoxFlex="1" DataKeyNames="PipelineId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineId" AllowSorting="true"
SortField="WorkAreaCode,PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="100"
OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
<Columns>
<f:CheckBoxField ColumnID="ckbIsSelected" Width="50px" RenderAsStaticField="false" HeaderText="选择"
AutoPostBack="true" CommandName="IsSelected" HeaderTextAlign="Center" />
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="55px" HeaderTextAlign="Center" TextAlign="Center" />
<f:RenderField HeaderText="工作区" ColumnID="WorkAreaCode" DataField="WorkAreaCode" SortField="WorkAreaCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
</f:RenderField>
<f:RenderField ID="WorkAreaId" ColumnID="WorkAreaId" DataField="WorkAreaId" runat="server" Hidden="true"></f:RenderField>
<f:RenderField HeaderText="管线编号" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="220px">
</f:RenderField>
<f:RenderField HeaderText="部分/全部焊口" Width="200" RendererFunction="selectData" ColumnID="isALL" DataField="WeldJonintCode" >
<Editor>
<f:DropDownBox runat="server" ID="txtIsAll" EmptyText="全部"
EnableMultiSelect="true" TopSpaceFirst="true" AutoShowClearIcon="true" >
<PopPanel>
<f:Grid ID="Grid2" Width="300" ShowBorder="true" ShowHeader="false" runat="server" EnableCheckBoxSelect="true" KeepCurrentSelection="true"
Hidden="true" DataKeyNames="PipelineId" DataIDField="WeldJointCode" DataTextField="WeldJointCode" EnableMultiSelect="true"
AllowPaging="true" PageSize="10" ShowPagingMessage="false" PagingType="NumberButton">
<Columns>
<f:RenderField ColumnID="WeldJointCode" ExpandUnusedSpace="true" DataField="WeldJointCode" HeaderText="焊口号" />
</Columns>
</f:Grid>
</PopPanel>
</f:DropDownBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="设计压力" ColumnID="DesignPressure" DataField="DesignPressure" SortField="DesignPressure"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="设计温度" ColumnID="DesignTemperature" DataField="DesignTemperature" SortField="DesignTemperature"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="试验压力" ColumnID="TestPressure" DataField="TestPressure" SortField="TestPressure"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="试验温度" ColumnID="TestTemperature" DataField="TestTemperature" SortField="TestTemperature"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="介质" ColumnID="MediumName" DataField="MediumName" SortField="MediumName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="单线图号" ColumnID="SingleNumber" DataField="SingleNumber" SortField="SingleNumber"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="规格" ColumnID="Specification" DataField="Specification" SortField="Specification"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="100" Value="100" />
<f:ListItem Text="150" Value="150" />
<f:ListItem Text="200" Value="200" />
<f:ListItem Text="250" Value="250" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnAllSelect" OnClick="btnAllSelect_Click" EnablePostBack="true"
runat="server" Text="全选" Icon="Accept">
</f:MenuButton>
<f:MenuButton ID="btnNoSelect" OnClick="btnNoSelect_Click" EnablePostBack="true"
runat="server" Text="全不选" Icon="Cancel">
</f:MenuButton>
</f:Menu>
</form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
var txtIsAllClientID = '<%= txtIsAll.ClientID %>';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
@ -219,6 +239,16 @@
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
function selectData(value) {
if (value == '')
return '全部';
var ddlHobby = F(txtIsAllClientID);
var hobbies = value.split(',');
console.log(hobbies);
}
</script>
</body>
</html>

View File

@ -3,7 +3,9 @@ using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web.ModelBinding;
using BLL;
using Model;
using Newtonsoft.Json.Linq;
namespace FineUIPro.Web.WeldingProcess.TestPackageManage
@ -103,6 +105,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
}
}
this.PageInfoLoad(); ///加载页面
}
}
#endregion
@ -170,6 +173,14 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
}
this.txtRemark.Text = testPackageManage.Remark;
var items = Funs.DB.PTP_PipelineList.Where(t => t.PTP_ID == testPackageManage.PTP_ID)
.Select(t=>t.WorkAreaId).FirstOrDefault();
if (items != null)
{
drpWorkArea.SelectedValue = items;
}
this.BindGrid(); ////初始化页面
this.ShowGridItem();
}
@ -192,22 +203,46 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
/// </summary>
private void BindGrid()
{
string strSql = @"SELECT IsoInfo.ProjectId,IsoInfo.WorkAreaId,WorkArea.WorkAreaCode,IsoInfo.PipelineId,IsoInfo.PipelineCode,
IsoInfo.DesignPressure,IsoInfo.DesignTemperature, WorkArea.InstallationId,IsoInfo.UnitId,
IsoInfo.TestPressure,IsoInfo.TestTemperature,bs.MediumName,IsoInfo.SingleNumber,
IsoInfo.Specification,IsoInfo.PipingClassId,IsoInfo.MainMaterialId,IsoList.PT_PipeId,IsoList.PTP_ID
FROM dbo.Pipeline_Pipeline AS IsoInfo
LEFT JOIN DBO.Project_WorkArea AS WorkArea ON IsoInfo.WorkAreaId =WorkArea.WorkAreaId
LEFT JOIN dbo.Base_Medium AS bs ON bs.MediumId = IsoInfo.MediumId
LEFT JOIN dbo.PTP_PipelineList AS IsoList ON IsoList.PipelineId = IsoInfo.PipelineId
string strSql = string.Empty;
if (string.IsNullOrEmpty(this.PTP_ID))
{
strSql = @"SELECT
IsoInfo.ProjectId,IsoInfo.WorkAreaId,WorkArea.WorkAreaCode,IsoInfo.PipelineId,IsoInfo.PipelineCode,
IsoInfo.DesignPressure,IsoInfo.DesignTemperature, WorkArea.InstallationId,IsoInfo.UnitId,
IsoInfo.TestPressure,IsoInfo.TestTemperature,bs.MediumName,IsoInfo.SingleNumber
FROM dbo.Pipeline_Pipeline AS IsoInfo
LEFT JOIN DBO.Project_WorkArea AS WorkArea ON IsoInfo.WorkAreaId =WorkArea.WorkAreaId
LEFT JOIN dbo.Base_Medium AS bs ON bs.MediumId = IsoInfo.MediumId
WHERE IsoInfo.ProjectId= @ProjectId AND IsoInfo.UnitId= @UnitId
AND WorkArea.InstallationId= @InstallationId AND (IsoList.PTP_ID IS NULL OR IsoList.PTP_ID = @PTP_ID)";
AND WorkArea.InstallationId= @InstallationId
AND NOT EXISTS(select 1 from PTP_PipelineList where IsoInfo.PipelineId=PTP_PipelineList.PipelineId and isAll=1) ";
}
else
{
strSql = @"SELECT
IsoInfo.ProjectId,IsoInfo.WorkAreaId,WorkArea.WorkAreaCode,IsoInfo.PipelineId,IsoInfo.PipelineCode,
IsoInfo.DesignPressure,IsoInfo.DesignTemperature, WorkArea.InstallationId,IsoInfo.UnitId,
IsoInfo.TestPressure,IsoInfo.TestTemperature,bs.MediumName,IsoInfo.SingleNumber,
IsoList.isAll,(case when (isnull(IsoList.WeldJonintCode,'')='') then '' else IsoList.WeldJonintCode end) as WeldJonintCode
FROM dbo.Pipeline_Pipeline AS IsoInfo
LEFT JOIN DBO.Project_WorkArea AS WorkArea ON IsoInfo.WorkAreaId =WorkArea.WorkAreaId
LEFT JOIN dbo.Base_Medium AS bs ON bs.MediumId = IsoInfo.MediumId
LEFT JOIN dbo.PTP_PipelineList AS IsoList ON IsoList.PipelineId = IsoInfo.PipelineId and IsoInfo.WorkAreaId=IsoList.WorkAreaId
WHERE IsoInfo.ProjectId= @ProjectId AND IsoInfo.UnitId= @UnitId
AND WorkArea.InstallationId= @InstallationId ";
}
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@PTP_ID", this.PTP_ID));
listStr.Add(new SqlParameter("@UnitId", this.drpUnit.SelectedValue));
listStr.Add(new SqlParameter("@InstallationId", this.drpInstallation.SelectedValue));
if (!string.IsNullOrEmpty(this.PTP_ID))
{
strSql += " AND IsoList.PTP_ID=@PTP_ID";
listStr.Add(new SqlParameter("@PTP_ID", this.PTP_ID));
}
if (this.drpWorkArea.SelectedValue != Const._Null && drpWorkArea.SelectedValue!=null)
{
strSql += " AND IsoInfo.WorkAreaId = @WorkAreaId";
@ -283,6 +318,8 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
this.GetInitGrid1Data();
}
/// <summary>
@ -491,15 +528,26 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
BLL.TestPackageManageEditService.AddTestPackage(testPackage);
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.TestPackageManageEditMenuId, Const.BtnAdd, this.PTP_ID);
}
JArray teamGroupData = Grid1.GetMergedData();
foreach (var item in listSelects)
foreach (JObject teamGroupRow in teamGroupData)
{
Model.PTP_PipelineList newitem = new Model.PTP_PipelineList();
newitem.PTP_ID = this.PTP_ID;
newitem.PipelineId = item;
BLL.TestPackageManageEditService.AddPipelineList(newitem);
string PipelineId = teamGroupRow["id"].ToString();
string status = teamGroupRow.Value<string>("status");
if (listSelects.Contains(PipelineId))
{
JObject values = teamGroupRow.Value<JObject>("values");
string WeldJonintCodes = values.Value<string>("isALL");
string workAreaId = values.Value<string>("WorkAreaId");
Model.PTP_PipelineList newitem = new Model.PTP_PipelineList();
newitem.PTP_ID = this.PTP_ID;
newitem.PipelineId = PipelineId;
newitem.IsAll = WeldJonintCodes=="全部" ? true : false;
newitem.WeldJonintCode = WeldJonintCodes;
newitem.WorkAreaId = workAreaId;
BLL.TestPackageManageEditService.AddPipelineList(newitem);
}
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(this.PTP_ID)
+ ActiveWindow.GetHidePostBackReference());
@ -512,6 +560,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
}
#endregion
#region Grid页面信息
/// <summary>
/// 收集Grid页面信息
@ -532,9 +581,57 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
listSelects.Add(rowID);
}
}
}
#endregion
#region Grid2列表
private void GetInitGrid1Data()
{
for (int i = 0; i < Grid1.Rows.Count; i++)
{
string rowID = Grid1.DataKeys[i][0].ToString();
this.GetBindGrid2Data(rowID);
}
}
private void GetBindGrid2Data(string PipelineID)
{
this.Grid2.DataSource = GetDataJointGrid2(PipelineID);
this.Grid2.DataBind();
}
private List<View_Pipeline_WeldJoint> GetDataJointGrid2(string PipelineID)
{
string[] arr = null;
var tempData=Funs.DB.PTP_PipelineList.Where(t=>t.PipelineId == PipelineID && t.IsAll==false)
.Select(t=>t.WeldJonintCode).FirstOrDefault();
if (tempData != null)
{
arr = tempData.Split(',');
}
var query = Funs.DB.View_Pipeline_WeldJoint.Where(t => t.PipelineId == PipelineID )
.OrderBy(t => t.WeldJointCode).AsQueryable();
if (arr != null)
{
query = query.Where(t => !arr.Contains(t.WeldJointCode));
}
return query.ToList();
}
private Dictionary<int, Dictionary<string, object>> GetModifiedDict()
{
Dictionary<int, Dictionary<string, object>> modifiedDict = Grid2.GetModifiedDict();
return modifiedDict;
}
#endregion
#region Grid
/// <summary>
/// 全选
@ -600,5 +697,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
this.ShowGridItem();
}
#endregion
}
}

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.WeldingProcess.TestPackageManage {
namespace FineUIPro.Web.WeldingProcess.TestPackageManage
{
public partial class TestPackageManageItemEdit {
public partial class TestPackageManageItemEdit
{
/// <summary>
/// Head1 控件。
@ -426,6 +428,33 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage {
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// WorkAreaId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RenderField WorkAreaId;
/// <summary>
/// txtIsAll 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownBox txtIsAll;
/// <summary>
/// Grid2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid2;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>