新增管道颜色标识导入功能及API控制器
更新了多个服务和页面,增加了导入管道颜色标识数据的功能,并实现了包装管理、车次管理、管道组件和焊口信息的API控制器。修正了文件路径错误,优化了分页和排序逻辑,删除了不再使用的API方法。
This commit is contained in:
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="07/10/2025 10:54:01" ReportInfo.Modified="07/10/2025 11:05:43" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="07/10/2025 10:54:01" ReportInfo.Modified="10/20/2025 18:54:19" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||
<Dictionary/>
|
||||
<ReportPage Name="Page1" Landscape="true" PaperWidth="297" PaperHeight="210" LeftMargin="20" TopMargin="25" RightMargin="20" BottomMargin="20" FirstPageSource="4" OtherPagesSource="4" Guides="0,964.11,84.21,65.31,74.76,169.26,103.11,486.36,794.85,187.32,271.53,336.84,411.6,570.57,654.78,720.09">
|
||||
<PageHeaderBand Name="PageHeader1" Width="971.46" Height="604.93" Guides="0,604.93,30.08,90.24,60.16,129.77,169.3,208.83,248.36,287.89,327.42,366.95,237.98">
|
||||
@@ -56,15 +56,15 @@
|
||||
</TableRow>
|
||||
<TableRow Name="Row4" Height="39.53">
|
||||
<TableCell Name="Cell16" Border.Lines="All" Text="液压试验" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell17" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell18" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell19" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell20" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell44" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell45" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell46" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell47" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell48" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell17" Border.Lines="All" Text="冷凝水, 苯酚, 双酚A" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell18" Border.Lines="All" Text="20 GB/8163" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell19" Border.Lines="All" Text="15.1" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell20" Border.Lines="All" Text="1.05" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell44" Border.Lines="All" Text="215/215" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell45" Border.Lines="All" Text="清洁水" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell46" Border.Lines="All" Text="1.73" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell47" Border.Lines="All" Text="25" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell48" Border.Lines="All" Text="10/30" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell49" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row5" Height="39.53">
|
||||
@@ -74,7 +74,7 @@
|
||||
<TableCell Name="Cell24" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell25" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell50" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell51" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell51" Border.Lines="All" Text="空气" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell52" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell53" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell54" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
@@ -87,7 +87,7 @@
|
||||
<TableCell Name="Cell59" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell60" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell61" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell62" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell62" Border.Lines="All" Text="水-空气" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell63" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell64" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell65" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
@@ -100,7 +100,7 @@
|
||||
<TableCell Name="Cell70" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell71" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell72" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell73" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell73" Border.Lines="All" Text="空气" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell74" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell75" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell76" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
@@ -113,7 +113,7 @@
|
||||
<TableCell Name="Cell81" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell82" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell83" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell84" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell84" Border.Lines="All" Text="空气" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell85" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell86" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell87" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="07/10/2025 23:00:23" ReportInfo.Modified="09/18/2025 09:57:11" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="07/10/2025 23:00:23" ReportInfo.Modified="10/24/2025 10:01:55" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||
<ScriptText>using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@@ -42,11 +42,12 @@ namespace FastReport
|
||||
}
|
||||
</ScriptText>
|
||||
<Dictionary>
|
||||
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRF9V3vp1e4jkmMexvV+/syL">
|
||||
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWREvkfDKV6KbUlDGWyOEseoj">
|
||||
<TableDataSource Name="Data" DataType="System.Int32" PropName="Accident_AccidentHandle" Enabled="true" TableName="Data">
|
||||
<Column Name="PipelineCode" DataType="System.String" PropName="AccidentHandleId"/>
|
||||
<Column Name="ManterialCode" DataType="System.String" PropName="ProjectId"/>
|
||||
<Column Name="Specification" DataType="System.String" PropName="AccidentHandleCode"/>
|
||||
<Column Name="MaterialColor" DataType="System.Int32" PropName="Column" Calculated="true" Expression=""/>
|
||||
</TableDataSource>
|
||||
</MsSqlDataConnection>
|
||||
<Parameter Name="ProjectName" DataType="System.String"/>
|
||||
@@ -107,7 +108,7 @@ namespace FastReport
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
</PageHeaderBand>
|
||||
<DataBand Name="Data1" Top="154.32" Width="623.7" Height="47.25" Guides="0,47.25">
|
||||
<DataBand Name="Data1" Top="155.2" Width="623.7" Height="47.25" Guides="0,47.25">
|
||||
<TableObject Name="Table2" Width="623.53" Height="47.25" Border.Lines="Left, Right, Bottom" ManualBuildEvent="Table2_ManualBuild">
|
||||
<TableColumn Name="Column12" Width="122.85"/>
|
||||
<TableColumn Name="Column13" Width="28.35"/>
|
||||
@@ -125,7 +126,7 @@ namespace FastReport
|
||||
<TableCell Name="Cell67" Border.Lines="All" Text="[Data.ManterialCode]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell68" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TableCell Name="Cell69" Border.Lines="All" Text="[Data.Specification]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TableCell Name="Cell70" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TableCell Name="Cell70" Border.Lines="All" Text="[Data.MaterialColor]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TableCell Name="Cell71" Border.Lines="All" Text="完整" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell72" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TableCell Name="Cell73" Border.Lines="All" Text="弯头、三通、半管接头、大小头、法兰" HorzAlign="Center" VertAlign="Center" Font="楷体, 9pt"/>
|
||||
@@ -135,8 +136,8 @@ namespace FastReport
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
</DataBand>
|
||||
<ColumnFooterBand Name="ColumnFooter1" Top="255.07" Width="623.7">
|
||||
<ChildBand Name="Child1" Top="204.7" Width="623.7" Height="47.25" Guides="0,47.25" FillUnusedSpace="true">
|
||||
<ColumnFooterBand Name="ColumnFooter1" Top="257.7" Width="623.7">
|
||||
<ChildBand Name="Child1" Top="206.45" Width="623.7" Height="47.25" Guides="0,47.25" FillUnusedSpace="true">
|
||||
<TableObject Name="Table3" Width="623.53" Height="47.25" Border.Lines="Left, Right, Bottom">
|
||||
<TableColumn Name="Column23" Width="122.85"/>
|
||||
<TableColumn Name="Column24" Width="28.35"/>
|
||||
@@ -165,7 +166,7 @@ namespace FastReport
|
||||
</TableObject>
|
||||
</ChildBand>
|
||||
</ColumnFooterBand>
|
||||
<PageFooterBand Name="PageFooter1" Top="258.2" Width="623.7" Height="111.01" Guides="0,111.01,38.56,79.51">
|
||||
<PageFooterBand Name="PageFooter1" Top="261.7" Width="623.7" Height="111.01" Guides="0,111.01,38.56,79.51">
|
||||
<TableObject Name="Table4" Width="623.7" Height="111.01" Border.Lines="Left, Top">
|
||||
<TableColumn Name="Column34" Width="311.85"/>
|
||||
<TableColumn Name="Column35" Width="311.85"/>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="03/13/2022 11:00:20" ReportInfo.Modified="09/29/2025 10:46:03" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="03/13/2022 11:00:20" ReportInfo.Modified="10/20/2025 10:51:41" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||
<ScriptText>using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@@ -42,7 +42,7 @@ namespace FastReport
|
||||
}
|
||||
</ScriptText>
|
||||
<Dictionary>
|
||||
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWREGG2jpnNd1x+f84FNsJb9q"/>
|
||||
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRFlf1WEwspad7DkFpDk3K8w"/>
|
||||
<TableDataSource Name="Data" ReferenceName="Data" DataType="System.Int32" Enabled="true">
|
||||
<Column Name="PipelineComponentId" DataType="System.String"/>
|
||||
<Column Name="PipelineComponentCode" DataType="System.String"/>
|
||||
|
||||
@@ -1487,7 +1487,7 @@
|
||||
<Content Include="HJGL\BaseInfo\MaterialCodeLibIn.aspx" />
|
||||
<Content Include="HJGL\BaseInfo\MaterialColor.aspx" />
|
||||
<Content Include="HJGL\BaseInfo\MaterialColorEdit.aspx" />
|
||||
<Content Include="HJGL\BaseInfo\MaterialColorInaspx.aspx" />
|
||||
<Content Include="HJGL\BaseInfo\MaterialColorIn.aspx" />
|
||||
<Content Include="HJGL\BaseInfo\MaterialEdit.aspx" />
|
||||
<Content Include="HJGL\BaseInfo\MaterialView.aspx" />
|
||||
<Content Include="HJGL\BaseInfo\Medium.aspx" />
|
||||
@@ -10108,12 +10108,12 @@
|
||||
<Compile Include="HJGL\BaseInfo\MaterialColorEdit.aspx.designer.cs">
|
||||
<DependentUpon>MaterialColorEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\BaseInfo\MaterialColorInaspx.aspx.cs">
|
||||
<DependentUpon>MaterialColorInaspx.aspx</DependentUpon>
|
||||
<Compile Include="HJGL\BaseInfo\MaterialColorIn.aspx.cs">
|
||||
<DependentUpon>MaterialColorIn.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\BaseInfo\MaterialColorInaspx.aspx.designer.cs">
|
||||
<DependentUpon>MaterialColorInaspx.aspx</DependentUpon>
|
||||
<Compile Include="HJGL\BaseInfo\MaterialColorIn.aspx.designer.cs">
|
||||
<DependentUpon>MaterialColorIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\BaseInfo\MaterialEdit.aspx.cs">
|
||||
<DependentUpon>MaterialEdit.aspx</DependentUpon>
|
||||
@@ -16835,12 +16835,11 @@
|
||||
<VersionMinor>3</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>primary</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v17.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v18.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
|
||||
@@ -43,9 +43,12 @@
|
||||
<f:Button ID="btnNew" ToolTip="新增" Text="新增" Hidden="true" Icon="Add" runat="server"
|
||||
OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnImport" Text="导入" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
@@ -57,7 +60,7 @@
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="150px" ColumnID="MaterialCode" DataField="MaterialCode" SortField="MaterialCode"
|
||||
FieldType="String" HeaderText="材质id" TextAlign="Left" HeaderTextAlign="Center" >
|
||||
FieldType="String" HeaderText="材质" TextAlign="Left" HeaderTextAlign="Center" >
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="ColorName" DataField="ColorName" SortField="ColorName"
|
||||
FieldType="String" HeaderText="颜色名称" TextAlign="Left" HeaderTextAlign="Center" >
|
||||
@@ -66,7 +69,7 @@
|
||||
FieldType="String" HeaderText="色卡号" TextAlign="Left" HeaderTextAlign="Center" >
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="RGB" DataField="RGB" SortField="RGB"
|
||||
FieldType="String" HeaderText="" TextAlign="Left" HeaderTextAlign="Center" >
|
||||
FieldType="String" HeaderText="RGB" TextAlign="Left" HeaderTextAlign="Center" >
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="Remark" DataField="Remark" SortField="Remark"
|
||||
FieldType="String" HeaderText="备注" TextAlign="Left" HeaderTextAlign="Center" >
|
||||
|
||||
@@ -238,6 +238,13 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 导入按钮
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MaterialColorIn.aspx?", "导入 - ")));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -68,6 +68,15 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialColorIn.aspx.cs" Inherits="FineUIPro.Web.HJGL.BaseInfo.MaterialColorIn" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<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="Panel1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" runat="server" Position="Bottom">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnImport" Icon="DoorIn" runat="server" Text="导入" ToolTip="数据导入" ValidateForms="SimpleForm1"
|
||||
OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" Text="下载模板" ToolTip="下载模板" OnClick="btnDownLoad_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="请选择导入的Eexce文件" Width="500px">
|
||||
</f:FileUpload>
|
||||
<f:HiddenField ID="hdFileName" runat="server"></f:HiddenField>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,142 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
{
|
||||
public partial class MaterialColorIn : PageBase
|
||||
{
|
||||
#region 加载
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 导入
|
||||
|
||||
/// <summary>
|
||||
/// 导入
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
var message = string.Empty;
|
||||
errorInfos = string.Empty;
|
||||
if (fuAttachUrl.HasFile == false)
|
||||
{
|
||||
ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
var IsXls = Path.GetExtension(fuAttachUrl.FileName).Trim().ToLower();
|
||||
if (IsXls != ".xlsx")
|
||||
{
|
||||
ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(errorInfos)) errorInfos = string.Empty;
|
||||
var rootPath = Server.MapPath("~/");
|
||||
var initFullPath = rootPath + initPath;
|
||||
if (!Directory.Exists(initFullPath)) Directory.CreateDirectory(initFullPath);
|
||||
//指定上传文件名称
|
||||
hdFileName.Text = Funs.GetNewFileName() + IsXls;
|
||||
//上传文件路径
|
||||
var filePath = initFullPath + hdFileName.Text;
|
||||
//文件上传服务器
|
||||
fuAttachUrl.PostedFile.SaveAs(filePath);
|
||||
//文件上传服务器后的名称
|
||||
var fileName = rootPath + initPath + hdFileName.Text;
|
||||
|
||||
ResponeData responeData;
|
||||
responeData = TwInOutplanmasterService.ImportData(fuAttachUrl.FileName, fileName, this.CurrUser.LoginProjectId, this.CurrUser.PersonId);
|
||||
|
||||
|
||||
if (responeData.code == 1)
|
||||
{
|
||||
ShowNotify("数据导入成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert alert = new Alert();
|
||||
alert.Message = responeData.message;
|
||||
alert.MessageBoxIcon = MessageBoxIcon.Error;
|
||||
alert.Show();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 定义项
|
||||
|
||||
/// <summary>
|
||||
/// 上传预设的虚拟路径
|
||||
/// </summary>
|
||||
private readonly string initPath = Const.ExcelUrl; //"File\\Excel\\DataIn\\";
|
||||
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static string errorInfos = string.Empty;
|
||||
|
||||
#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")
|
||||
{
|
||||
var rootPath = Server.MapPath("~/");
|
||||
var uploadfilepath = rootPath + Const.Tw_InPlanMasteTemplateUrl;
|
||||
var filePath = Const.Tw_InPlanMasteTemplateUrl;
|
||||
var fileName = Path.GetFileName(filePath);
|
||||
var info = new FileInfo(uploadfilepath);
|
||||
var fileSize = info.Length;
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition",
|
||||
"attachment;filename=" + HttpUtility.UrlEncode(fileName, Encoding.UTF8));
|
||||
Response.ContentType = "excel/plain";
|
||||
Response.ContentEncoding = Encoding.UTF8;
|
||||
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
|
||||
Response.TransmitFile(uploadfilepath, 0, fileSize);
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
{
|
||||
|
||||
|
||||
public partial class MaterialColorIn
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnDownLoad 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDownLoad;
|
||||
|
||||
/// <summary>
|
||||
/// fuAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FileUpload fuAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdFileName;
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialColorInaspx.aspx.cs" Inherits="FineUIPro.Web.HJGL.BaseInfo.MaterialColorInaspx" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,12 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
{
|
||||
public partial class MaterialColorInaspx : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码是由工具生成的。
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
{
|
||||
|
||||
|
||||
public partial class MaterialColorInaspx
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@
|
||||
<f:TextBox ID="txtPipelineCode" runat="server" Label="管线号"
|
||||
EmptyText="输入查询条件" Width="280px" LabelWidth="80px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
|
||||
<f:HiddenField runat="server" ID="hdUnitWorkId"></f:HiddenField>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
@@ -56,6 +57,11 @@
|
||||
EmptyText="输入查询条件"
|
||||
Width="240px" LabelWidth="100px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpTypeStr" runat="server" Label="类型" Width="280px" LabelWidth="80px" LabelAlign="Right">
|
||||
<f:ListItem Text="全部" Value=""></f:ListItem>
|
||||
<f:ListItem Text="预制组件" Value="预制组件"></f:ListItem>
|
||||
<f:ListItem Text="预制散件" Value="预制散件"></f:ListItem>
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSearch" Icon="SystemSearch" Text="查询"
|
||||
@@ -69,9 +75,9 @@
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="组件信息" ForceFit="false"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="id" AllowCellEditing="true"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="id"
|
||||
AllowSorting="true" SortField="PipelineCode,PipelineComponentCode" SortDirection="ASC" OnSort="Grid1_Sort" EnableTextSelection="true"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="Id"
|
||||
AllowSorting="true" SortField="PipelineCode,Code" SortDirection="ASC" OnSort="Grid1_Sort" EnableTextSelection="true"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
|
||||
@@ -80,15 +86,15 @@
|
||||
FieldType="String" HeaderText="管线号" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="Stype" DataField="Stype" SortField="Stype"
|
||||
<f:RenderField Width="100px" ColumnID="TypeStr" DataField="TypeStr" SortField="TypeStr"
|
||||
FieldType="String" HeaderText="类型" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="PipelineComponentCode" DataField="PipelineComponentCode" SortField="PipelineComponentCode"
|
||||
FieldType="String" HeaderText="组件编号" HeaderTextAlign="Center"
|
||||
<f:RenderField Width="120px" ColumnID="Code" DataField="Code" SortField="Code"
|
||||
FieldType="String" HeaderText="组件编号/材料编码" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="320px" ColumnID="matdef" DataField="matdef"
|
||||
<f:RenderField Width="320px" ColumnID="Matdef" DataField="Matdef"
|
||||
FieldType="String" HeaderText="预制散件材料描述" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
@@ -104,7 +110,7 @@
|
||||
FieldType="String" HeaderText="车次" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="FlowingSection" DataField="FlowingSection"
|
||||
<f:RenderField Width="150px" ColumnID="FlowingSection" DataField="FlowingSection"
|
||||
FieldType="String" HeaderText="流水段" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BLL;
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -12,7 +13,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
public partial class InstallList : PageBase
|
||||
{
|
||||
public int pageSize = 20;
|
||||
public static DataTable GridDataTable = new DataTable();
|
||||
public static IQueryable<View_HJGL_InstallData> GridDataTable = null;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -213,11 +214,10 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
private void BindGrid()
|
||||
{
|
||||
if (tvControlItem.SelectedNode == null) return;
|
||||
DataTable tb = BindData();
|
||||
GridDataTable = tb;
|
||||
// 2.获取当前分页数据
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
var view_HJGL_InstallDatas = BindData(Grid1.PageIndex+1, Grid1.PageSize,out int totalCount);
|
||||
// 2.获取当前分页数据
|
||||
Grid1.RecordCount = totalCount;
|
||||
var table = view_HJGL_InstallDatas;
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
@@ -226,63 +226,33 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private DataTable BindData()
|
||||
private List<View_HJGL_InstallData> BindData(int pageIndex, int pageSize, out int totalCount)
|
||||
{
|
||||
string strSql = @"WITH cte as (select newid()as id,pipeline.PipelineCode as PipelineCode,
|
||||
comonent.PipelineComponentCode as PipelineComponentCode,
|
||||
'预制组件' as Stype,
|
||||
'' as matdef,
|
||||
packdetail.Number as Number,
|
||||
pack.PackagingCode as PackagingCode,
|
||||
trainnumber.TrainNumber as TrainNumber,
|
||||
pipeline.FlowingSection as FlowingSection,
|
||||
pipeline.UnitWorkId as UnitWorkId
|
||||
from HJGL_Pipeline pipeline
|
||||
left join HJGL_PackagingManageDetail packdetail on pipeline.PipelineId = packdetail.PipelineId
|
||||
left join HJGL_Pipeline_Component comonent
|
||||
on packdetail.PipelineComponentId = comonent.PipelineComponentId
|
||||
left join HJGL_PackagingManage pack on packdetail.PackagingManageId = pack.PackagingManageId
|
||||
left join HJGL_TrainNumberManage trainnumber on pack.TrainNumberId = TrainNumber.Id
|
||||
where (packdetail.PipelineComponentId is not null or packdetail.PipelineComponentId != '')
|
||||
union all
|
||||
select newid()as id,pipeline.PipelineCode as PipelineCode,
|
||||
packdetail.MaterialCode as PipelineComponentCode,
|
||||
'预制散件' as Stype,
|
||||
matlib.MaterialDef as matdef,
|
||||
packdetail.Number as Number,
|
||||
pack.PackagingCode as PackagingCode,
|
||||
trainnumber.TrainNumber as TrainNumber,
|
||||
pipeline.FlowingSection as FlowingSection,
|
||||
pipeline.UnitWorkId as UnitWorkId
|
||||
from HJGL_Pipeline pipeline
|
||||
left join HJGL_PackagingManageDetail packdetail on pipeline.PipelineId = packdetail.PipelineId
|
||||
left join HJGL_MaterialCodeLib matlib on packdetail.MaterialCode = matlib.MaterialCode
|
||||
left join HJGL_PackagingManage pack on packdetail.PackagingManageId = pack.PackagingManageId
|
||||
left join HJGL_TrainNumberManage trainnumber on pack.TrainNumberId = TrainNumber.Id
|
||||
where (packdetail.PipelineComponentId is null or packdetail.PipelineComponentId = ''))
|
||||
SELECT * FROM cte WHERE 1=1 ";
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
var baseQuery=from x in Funs.DB.View_HJGL_InstallData
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2)
|
||||
{
|
||||
strSql += " and cte.UnitWorkId =@UnitWorkId";
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
baseQuery = baseQuery.Where(x => x.UnitWorkId == tvControlItem.SelectedNode.NodeID);
|
||||
}
|
||||
else if (tvControlItem.SelectedNode.CommandName == "流水段")
|
||||
{
|
||||
strSql += " and cte.FlowingSection = @FlowingSection ";
|
||||
listStr.Add(new SqlParameter("@FlowingSection", this.tvControlItem.SelectedNode.Text));
|
||||
}
|
||||
baseQuery = baseQuery.Where(x => x.UnitWorkId == tvControlItem.SelectedNode.ParentNode.NodeID && x.FlowingSection == tvControlItem.SelectedNode.Text);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(txtPipelineCode2.Text))
|
||||
{
|
||||
strSql += " AND cte.PipelineCode like @PipelineCode";
|
||||
listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode2.Text.Trim() + "%"));
|
||||
}
|
||||
baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(txtPipelineCode2.Text.Trim()));
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtPipelineComponentCode.Text))
|
||||
{
|
||||
strSql += " AND cte.PipelineComponentCode like @PipelineComponentCode";
|
||||
listStr.Add(new SqlParameter("@PipelineComponentCode", "%" + this.txtPipelineComponentCode.Text.Trim() + "%"));
|
||||
baseQuery = baseQuery.Where(x => x.Code.Contains(txtPipelineComponentCode.Text.Trim()));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(drpTypeStr.SelectedValue))
|
||||
{
|
||||
baseQuery = baseQuery.Where(x => x.TypeStr.Contains(drpTypeStr.SelectedValue));
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
|
||||
//{
|
||||
@@ -291,13 +261,17 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
//}
|
||||
if (!string.IsNullOrEmpty(txtPipelineCode.Text))
|
||||
{
|
||||
strSql += " AND cte.PipelineCode like @pipeline";
|
||||
listStr.Add(new SqlParameter("@pipeline", "%" + this.txtPipelineCode.Text.Trim() + "%"));
|
||||
}
|
||||
strSql += " ORDER BY PipelineCode,PipelineComponentCode ";
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
return tb;
|
||||
baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(txtPipelineCode.Text.Trim()));
|
||||
|
||||
}
|
||||
baseQuery = baseQuery.OrderBy(x => x.PipelineCode).ThenBy(x => x.Code);
|
||||
totalCount = baseQuery.Count();
|
||||
GridDataTable = baseQuery;
|
||||
// 分页保护
|
||||
if (pageIndex <= 0) pageIndex = 1;
|
||||
if (pageSize <= 0) pageSize = 10;
|
||||
var query = baseQuery.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList();
|
||||
return query;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -392,17 +366,17 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
if (GridDataTable != null)
|
||||
{
|
||||
var q = (from x in GridDataTable.AsEnumerable()
|
||||
var q = (from x in GridDataTable
|
||||
select new
|
||||
{
|
||||
管线号 = x.Field<string>("PipelineCode"),
|
||||
类型 = x.Field<string>("Stype"),
|
||||
组件编号 = x.Field<string>("PipelineComponentCode"),
|
||||
预制散件材料描述 = !string.IsNullOrWhiteSpace(x.Field<string>("matdef")) ? x.Field<string>("matdef") : "-",
|
||||
数量 = x.Field<decimal?>("Number"),
|
||||
所在包装编号 = x.Field<string>("PackagingCode"),
|
||||
车次 = x.Field<string>("TrainNumber"),
|
||||
流水段 = x.Field<string>("FlowingSection")
|
||||
管线号 = x.PipelineCode,
|
||||
类型 = x.TypeStr,
|
||||
编号 = x.Code,
|
||||
预制散件材料描述 = x.Matdef??"-",
|
||||
数量 = x.Number,
|
||||
所在包装编号 = x.PackagingCode,
|
||||
车次 = x.TrainNumber,
|
||||
流水段 = x.FlowingSection
|
||||
});
|
||||
string path = Funs.RootPath + @"File\Excel\Temp\PrePipelineInstallList.xlsx";
|
||||
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ".xlsx");
|
||||
|
||||
@@ -131,6 +131,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPipelineComponentCode;
|
||||
|
||||
/// <summary>
|
||||
/// drpTypeStr 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpTypeStr;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill2 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
<f:RenderField Width="250px" ColumnID="PackagingCode" DataField="PackagingCode"
|
||||
FieldType="String" HeaderText="包装编号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="CategoryString" DataField="CategoryString"
|
||||
FieldType="String" HeaderText="包装分类" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="TypeString" DataField="TypeString"
|
||||
FieldType="String" HeaderText="货物类型" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
@@ -17,11 +17,19 @@
|
||||
<f:TextBox ID="txtPackagingCode" runat="server" Label="包装编号" LabelAlign="Right"
|
||||
LabelWidth="140px">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpTypeInt" runat="server" Label="货物类型" ColumnWidth="20%" OnSelectedIndexChanged="drpTypeInt_SelectedIndexChanged" AutoPostBack="true"
|
||||
LabelWidth="140px" LabelAlign="Right" Width="170px">
|
||||
</f:DropDownList>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="droCategoryInt" runat="server" Label="包装分类" ColumnWidth="20%" AutoSelectFirstItem="false" EmptyText="-请选择-" Required="true" ShowRedStar="true"
|
||||
LabelWidth="140px" LabelAlign="Right" Width="170px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpTypeInt" runat="server" Label="货物类型" ColumnWidth="20%" OnSelectedIndexChanged="drpTypeInt_SelectedIndexChanged" AutoPostBack="true"
|
||||
LabelWidth="140px" LabelAlign="Right" Width="170px" EmptyText="-请选择-" >
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownBox runat="server" ID="dropPipelineComponentCode" EmptyText="请从下拉表格中选择" Label="预制组件" LabelWidth="140px" LabelAlign="Right" EnableMultiSelect="true" MatchFieldWidth="false" Hidden="true">
|
||||
@@ -77,7 +85,7 @@
|
||||
<%-- <f:TextBox ID="txtTrainNumber" runat="server" Label="车次" LabelAlign="Right"
|
||||
LabelWidth="180px">
|
||||
</f:TextBox>--%>
|
||||
<f:DropDownList runat="server" ID="drpTrainNumber" EnableEdit="true" ForceSelection="false" Label="车次" LabelWidth="140px" LabelAlign="Right">
|
||||
<f:DropDownList runat="server" ID="drpTrainNumber" EnableEdit="true" ForceSelection="false" Label="发货编号" LabelWidth="140px" LabelAlign="Right" AutoSelectFirstItem="false" EmptyText="-请选择-">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
@@ -30,7 +30,10 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
drpTypeInt.DataSource = HJGLPackagingmanageService.TypeIntMap;
|
||||
drpTypeInt.DataBind();
|
||||
|
||||
|
||||
droCategoryInt.DataTextField = "Key";
|
||||
droCategoryInt.DataValueField = "Value";
|
||||
droCategoryInt.DataSource = HJGLPackagingmanageService.CategoryIntMap;
|
||||
droCategoryInt.DataBind();
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
if (!string.IsNullOrEmpty(PackagingManageId))
|
||||
{
|
||||
@@ -41,6 +44,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
txtStackingPosition.Text = model.StackingPosition;
|
||||
drpTrainNumber.SelectedValue = model.TrainNumberId;
|
||||
drpTypeInt.SelectedValue = model.TypeInt.ToString();
|
||||
droCategoryInt.SelectedValue = model.CategoryInt.ToString();
|
||||
if (model.State == HJGLPackagingmanageService.state_0)
|
||||
{
|
||||
btnSave.Hidden = false;
|
||||
@@ -92,6 +96,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
//table.ContactPhone = txtContactPhone.Text;
|
||||
table.TrainNumberId = drpTrainNumber.SelectedValue;
|
||||
table.TypeInt = int.Parse(drpTypeInt.SelectedValue);
|
||||
table.CategoryInt = int.Parse(droCategoryInt.SelectedValue);
|
||||
table.CompileMan = this.CurrUser.PersonId;
|
||||
table.CompileDate = DateTime.Now;
|
||||
if (drpTypeInt.SelectedValue == ((int)HJGLPackagingmanageService.TypeInt.预制组件).ToString())
|
||||
@@ -115,6 +120,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
//table.ContactPhone =txtContactPhone.Text;
|
||||
table.TrainNumberId = drpTrainNumber.SelectedValue;
|
||||
table.TypeInt = int.Parse(drpTypeInt.SelectedValue);
|
||||
table.CategoryInt = int.Parse(droCategoryInt.SelectedValue);
|
||||
if (drpTypeInt.SelectedValue == ((int)HJGLPackagingmanageService.TypeInt.预制组件).ToString())
|
||||
{
|
||||
table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values);
|
||||
|
||||
@@ -50,6 +50,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPackagingCode;
|
||||
|
||||
/// <summary>
|
||||
/// droCategoryInt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList droCategoryInt;
|
||||
|
||||
/// <summary>
|
||||
/// drpTypeInt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtTrainNumber" runat="server" Label="车次" MaxLength="200">
|
||||
<f:TextBox ID="txtTrainNumber" runat="server" Label="发货编号" MaxLength="200">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtLicensePlateNumber" runat="server" Label="车牌号" MaxLength="200">
|
||||
</f:TextBox>
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtTrainNumber.Text = TrainNumberManageService.GetNewTrainNumber(this.CurrUser.LoginProjectId);
|
||||
this.txtTrainNumber.Text = TrainNumberManageService.GetNewTrainNumber(this.CurrUser.LoginProjectId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</f:TemplateField>
|
||||
|
||||
<f:RenderField Width="150px" ColumnID="TrainNumber" DataField="TrainNumber" SortField="TrainNumber"
|
||||
FieldType="String" HeaderText="车次" TextAlign="Left" HeaderTextAlign="Center">
|
||||
FieldType="String" HeaderText="发货编号" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="DriverName" DataField="DriverName" SortField="DriverName"
|
||||
FieldType="String" HeaderText="驾驶员姓名" TextAlign="Left" HeaderTextAlign="Center">
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
Model.HJGL_TrainNumberManage table = new Model.HJGL_TrainNumberManage();
|
||||
table.ProjectId = this.CurrUser.LoginProjectId;
|
||||
var tb = BLL.TrainNumberManageService.GetListByQueryModle(table, Grid1.PageIndex, Grid1.PageSize);
|
||||
var tb = BLL.TrainNumberManageService.GetListByQueryModle(table, Grid1.PageIndex+1, Grid1.PageSize);
|
||||
Grid1.RecordCount = tb.Total;
|
||||
Grid1.DataSource = tb.Data;
|
||||
Grid1.DataBind();
|
||||
|
||||
@@ -134,6 +134,10 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
||||
tn1.Text = q.UnitWorkName + "(已完成" + unitWorkTestPackagePassPercent + "%)";
|
||||
tn1.ToolTip = "施工单位:" + unitNamesUnitIds;
|
||||
tn1.CommandName = "单位工程";
|
||||
if (unitWorkTestPackagePassPercent==100)
|
||||
{
|
||||
tn1.CssClass = "Green";
|
||||
}
|
||||
rootNode1.Nodes.Add(tn1);
|
||||
var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList();
|
||||
BindNodes(tn1, testPackageUnitList);
|
||||
@@ -151,6 +155,10 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
||||
tn2.Text = q.UnitWorkName + "(已完成" + unitWorkTestPackagePassPercent + "%)";
|
||||
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
|
||||
tn2.CommandName = "单位工程";
|
||||
if (unitWorkTestPackagePassPercent == 100)
|
||||
{
|
||||
tn2.CssClass = "Green";
|
||||
}
|
||||
rootNode2.Nodes.Add(tn2);
|
||||
var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList();
|
||||
BindNodes(tn2, testPackageUnitList);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<f:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center" Layout="VBox"
|
||||
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server" AutoScroll="true">
|
||||
<Items>
|
||||
<f:GroupPanel ID="GroupPanel2" Layout="Anchor" Title="焊接环境设置" runat="server" >
|
||||
<f:GroupPanel ID="GroupPanel2" Layout="Anchor" Title="焊接环境设置" runat="server">
|
||||
<Items>
|
||||
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="false" Layout="VBox"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
@@ -49,7 +49,15 @@
|
||||
<Items>
|
||||
<f:CheckBox ID="ckPressMustCheckBItem" runat="server" Label="压力试验尾项条件" Text="必须B项整改完成" LabelWidth="200">
|
||||
</f:CheckBox>
|
||||
</Items>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow runat="server">
|
||||
<Items>
|
||||
<f:RadioButtonList ID="rbMaterialColorAttribute" runat="server" Label="材质标识关联属性" LabelWidth="200">
|
||||
<f:RadioItem Value="1" Text="颜色名称" Selected="true" />
|
||||
<f:RadioItem Value="2" Text="色卡号" />
|
||||
</f:RadioButtonList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
@@ -99,8 +107,8 @@
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
<f:GroupPanel ID="GroupPanel3" Layout="Anchor" Title="模型颜色设置" runat="server">
|
||||
</f:GroupPanel>
|
||||
<f:GroupPanel ID="GroupPanel3" Layout="Anchor" Title="模型颜色设置" runat="server">
|
||||
<Items>
|
||||
<f:Form ID="Form3" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
Layout="VBox" BodyPadding="10px" runat="server" RedStarPosition="BeforeText"
|
||||
@@ -109,16 +117,16 @@
|
||||
<f:FormRow runat="server">
|
||||
<Items>
|
||||
<f:NumberBox ID="txtPipelineNOComplete" Label="未完成(透明显示)" runat="server" MaxValue="100" Hidden="true"
|
||||
LabelWidth="180px" NoNegative="true" NoDecimal="true">
|
||||
LabelWidth="180px" NoNegative="true" NoDecimal="true">
|
||||
</f:NumberBox>
|
||||
<f:NumberBox ID="txtPipelineComplete" Label="已完成(透明显示)" runat="server" MaxValue="100" Hidden="true"
|
||||
LabelWidth="180px" NoNegative="true" NoDecimal="true">
|
||||
LabelWidth="180px" NoNegative="true" NoDecimal="true">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow runat="server">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpJointNOCompleteColor" Label="未完成(颜色)" runat="server" LabelWidth="180px">
|
||||
<f:DropDownList ID="drpJointNOCompleteColor" Label="未完成(颜色)" runat="server" LabelWidth="180px">
|
||||
<f:ListItem Value="#FF0000" Text="红" />
|
||||
<f:ListItem Value="#FFFF00" Text="黄" />
|
||||
<f:ListItem Value="#00FF00" Text="绿" />
|
||||
@@ -131,7 +139,6 @@
|
||||
</f:DropDownList>
|
||||
<%--<f:TextBox ID="txtJointNOCompleteColor" runat="server" Label="焊口未完成" LabelWidth="180px"></f:TextBox>
|
||||
<f:TextBox ID="txtJointCompleteColor" runat="server" Label="焊口已完成" LabelWidth="180px"></f:TextBox>--%>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using FineUIPro;
|
||||
|
||||
namespace FineUIPro.Web.common.ProjectSet
|
||||
{
|
||||
@@ -48,595 +50,292 @@ namespace FineUIPro.Web.common.ProjectSet
|
||||
ShowNotify("请选择项目!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
#region 焊接
|
||||
// 焊接
|
||||
Model.Project_Sys_Set dayReport = BLL.Project_SysSetService.GetSysSetBySetId("1", projectId);
|
||||
Model.Project_Sys_Set point = BLL.Project_SysSetService.GetSysSetBySetId("2", projectId);
|
||||
Model.Project_Sys_Set trust = BLL.Project_SysSetService.GetSysSetBySetId("3", projectId);
|
||||
Model.Project_Sys_Set pdms = BLL.Project_SysSetService.GetSysSetBySetId("4", projectId);
|
||||
Model.Project_Sys_Set batch = BLL.Project_SysSetService.GetSysSetBySetId("5", projectId);
|
||||
Model.Project_Sys_Set jointB = BLL.Project_SysSetService.GetSysSetBySetId("6", projectId);
|
||||
Model.Project_Sys_Set thickness = BLL.Project_SysSetService.GetSysSetBySetId("7", projectId);
|
||||
Model.Project_Sys_Set pressUnit = BLL.Project_SysSetService.GetSysSetBySetId("8", projectId);
|
||||
Model.Project_Sys_Set AvevaNetUrl = BLL.Project_SysSetService.GetSysSetBySetId("9", projectId);
|
||||
Model.Project_Sys_Set PressMustCheckBItem = BLL.Project_SysSetService.GetSysSetBySetId("10", projectId);
|
||||
if (PressMustCheckBItem != null)
|
||||
{
|
||||
if (this.ckPressMustCheckBItem.Checked)
|
||||
{
|
||||
PressMustCheckBItem.IsAuto = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
PressMustCheckBItem.IsAuto = false;
|
||||
}
|
||||
BLL.Project_SysSetService.UpdateSet(PressMustCheckBItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Project_Sys_Set newPressMustCheckBItem = new Model.Project_Sys_Set();
|
||||
newPressMustCheckBItem.SetId = "10";
|
||||
newPressMustCheckBItem.ProjectId = projectId;
|
||||
if (this.ckPressMustCheckBItem.Checked)
|
||||
{
|
||||
newPressMustCheckBItem.IsAuto = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newPressMustCheckBItem.IsAuto = false;
|
||||
}
|
||||
BLL.Project_SysSetService.AddSet(newPressMustCheckBItem);
|
||||
}
|
||||
if (jointB != null)
|
||||
{
|
||||
if (this.ckbJointB.Checked)
|
||||
{
|
||||
jointB.IsAuto = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
jointB.IsAuto = false;
|
||||
}
|
||||
BLL.Project_SysSetService.UpdateSet(jointB);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Project_Sys_Set newJointB = new Model.Project_Sys_Set();
|
||||
newJointB.SetId = "6";
|
||||
newJointB.ProjectId = projectId;
|
||||
if (this.ckbJointB.Checked)
|
||||
{
|
||||
newJointB.IsAuto = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newJointB.IsAuto = false;
|
||||
}
|
||||
BLL.Project_SysSetService.AddSet(newJointB);
|
||||
}
|
||||
if (pressUnit != null)
|
||||
{
|
||||
pressUnit.SetValue = this.rblPressUnit.SelectedValue;
|
||||
BLL.Project_SysSetService.UpdateSet(pressUnit);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Project_Sys_Set newPressUnit = new Model.Project_Sys_Set();
|
||||
newPressUnit.SetId = "8";
|
||||
newPressUnit.SetValue = this.rblPressUnit.SelectedValue;
|
||||
newPressUnit.ProjectId = projectId;
|
||||
BLL.Project_SysSetService.AddSet(newPressUnit);
|
||||
}
|
||||
if (AvevaNetUrl != null)
|
||||
{
|
||||
AvevaNetUrl.SetValue = this.AvevaNetUrl.Text.Trim();
|
||||
BLL.Project_SysSetService.UpdateSet(AvevaNetUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Project_Sys_Set newAvevaNetUrl = new Model.Project_Sys_Set();
|
||||
newAvevaNetUrl.SetId = "9";
|
||||
newAvevaNetUrl.SetName = "AVEVA NET 地址";
|
||||
newAvevaNetUrl.SetValue = this.AvevaNetUrl.Text.Trim();
|
||||
newAvevaNetUrl.ProjectId = projectId;
|
||||
BLL.Project_SysSetService.AddSet(newAvevaNetUrl);
|
||||
}
|
||||
if (thickness != null)
|
||||
{
|
||||
if (this.ckbThickness.Checked)
|
||||
{
|
||||
thickness.IsAuto = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
thickness.IsAuto = false;
|
||||
}
|
||||
BLL.Project_SysSetService.UpdateSet(thickness);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Project_Sys_Set newThickness = new Model.Project_Sys_Set();
|
||||
newThickness.SetId = "7";
|
||||
newThickness.ProjectId = projectId;
|
||||
if (this.ckbThickness.Checked)
|
||||
{
|
||||
newThickness.IsAuto = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newThickness.IsAuto = false;
|
||||
}
|
||||
BLL.Project_SysSetService.AddSet(newThickness);
|
||||
}
|
||||
if (this.ckbPdms.Checked)
|
||||
{
|
||||
pdms.IsAuto = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pdms.IsAuto = false;
|
||||
}
|
||||
|
||||
if (ckbDayReport.Checked)
|
||||
{
|
||||
dayReport.IsAuto = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
dayReport.IsAuto = false;
|
||||
}
|
||||
SaveWeldingSettings(projectId);
|
||||
SaveColorModelSettings(projectId);
|
||||
SaveQualitySettings(projectId);
|
||||
|
||||
if (ckbPoint.Checked)
|
||||
{
|
||||
point.IsAuto = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
point.IsAuto = false;
|
||||
}
|
||||
|
||||
if (robStandard.SelectedValue == "1")
|
||||
{
|
||||
trust.IsAuto = true;
|
||||
trust.SetValue = null;
|
||||
}
|
||||
else if (robStandard.SelectedValue == "2")
|
||||
{
|
||||
trust.IsAuto = false;
|
||||
trust.SetValue = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
trust.IsAuto = null;
|
||||
trust.SetValue = robStandard.SelectedValue;
|
||||
}
|
||||
string lists = string.Empty;
|
||||
if (cb1.Checked)
|
||||
{
|
||||
lists += "1|";
|
||||
}
|
||||
if (cb2.Checked)
|
||||
{
|
||||
lists += "2|";
|
||||
}
|
||||
if (cb3.Checked)
|
||||
{
|
||||
lists += "3|";
|
||||
}
|
||||
if (cb4.Checked)
|
||||
{
|
||||
lists += "4|";
|
||||
}
|
||||
if (cb5.Checked)
|
||||
{
|
||||
lists += "5|";
|
||||
}
|
||||
if (cb6.Checked)
|
||||
{
|
||||
lists += "6|";
|
||||
}
|
||||
if (cb7.Checked)
|
||||
{
|
||||
lists += "7|";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(lists))
|
||||
{
|
||||
lists = lists.Substring(0, lists.LastIndexOf('|'));
|
||||
batch.IsAuto = true;
|
||||
batch.SetValue = lists;
|
||||
}
|
||||
|
||||
BLL.Project_SysSetService.UpdateSet(dayReport);
|
||||
BLL.Project_SysSetService.UpdateSet(point);
|
||||
BLL.Project_SysSetService.UpdateSet(pdms);
|
||||
BLL.Project_SysSetService.UpdateSet(trust);
|
||||
BLL.Project_SysSetService.UpdateSet(batch);
|
||||
//this.Show(projectId);
|
||||
#endregion
|
||||
#region 颜色模型设置
|
||||
Model.Project_Sys_Set Model_PipelineNOComplete = BLL.Project_SysSetService.GetSysSetBySetName("管线未完成", this.CurrUser.LoginProjectId);
|
||||
if (Model_PipelineNOComplete != null)
|
||||
{
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtPipelineNOComplete.Text.Trim()))
|
||||
{
|
||||
Model_PipelineNOComplete.SetValue = this.txtPipelineNOComplete.Text.Trim();
|
||||
BLL.Project_SysSetService.UpdateSet(Model_PipelineNOComplete);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtPipelineNOComplete.Text.Trim()))
|
||||
{
|
||||
Model.Project_Sys_Set newModel_PipelineNOComplete = new Model.Project_Sys_Set()
|
||||
{
|
||||
SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)),
|
||||
ProjectId = this.CurrUser.LoginProjectId,
|
||||
SetName = "管线未完成",
|
||||
SetValue = this.txtPipelineNOComplete.Text.Trim(),
|
||||
};
|
||||
BLL.Project_SysSetService.AddSet(newModel_PipelineNOComplete);
|
||||
}
|
||||
}
|
||||
Model.Project_Sys_Set Model_PipelineComplete = BLL.Project_SysSetService.GetSysSetBySetName("管线已完成", this.CurrUser.LoginProjectId);
|
||||
if (Model_PipelineComplete != null)
|
||||
{
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtPipelineComplete.Text.Trim()))
|
||||
{
|
||||
Model_PipelineComplete.SetValue = this.txtPipelineComplete.Text.Trim();
|
||||
BLL.Project_SysSetService.UpdateSet(Model_PipelineComplete);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtPipelineComplete.Text.Trim()))
|
||||
{
|
||||
Model.Project_Sys_Set newModel = new Model.Project_Sys_Set()
|
||||
{
|
||||
SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)),
|
||||
ProjectId = this.CurrUser.LoginProjectId,
|
||||
SetName = "管线已完成",
|
||||
SetValue = this.txtPipelineComplete.Text.Trim(),
|
||||
};
|
||||
|
||||
BLL.Project_SysSetService.AddSet(newModel);
|
||||
}
|
||||
}
|
||||
Model.Project_Sys_Set Model_JointNOCompleteColor = BLL.Project_SysSetService.GetSysSetBySetName("焊口未完成", this.CurrUser.LoginProjectId);
|
||||
if (Model_JointNOCompleteColor != null)
|
||||
{
|
||||
|
||||
if (!string.IsNullOrEmpty(this.drpJointNOCompleteColor.SelectedValue.Trim()))
|
||||
{
|
||||
Model_JointNOCompleteColor.SetValue = this.drpJointNOCompleteColor.SelectedValue.Trim();
|
||||
BLL.Project_SysSetService.UpdateSet(Model_JointNOCompleteColor);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.drpJointNOCompleteColor.SelectedValue.Trim()))
|
||||
{
|
||||
Model.Project_Sys_Set newModel = new Model.Project_Sys_Set()
|
||||
{
|
||||
SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)),
|
||||
ProjectId = this.CurrUser.LoginProjectId,
|
||||
SetName = "焊口未完成",
|
||||
SetValue = this.drpJointNOCompleteColor.SelectedValue.Trim(),
|
||||
};
|
||||
|
||||
BLL.Project_SysSetService.AddSet(newModel);
|
||||
}
|
||||
}
|
||||
Model.Project_Sys_Set Model_JointCompleteColor = BLL.Project_SysSetService.GetSysSetBySetName("焊口已完成", this.CurrUser.LoginProjectId);
|
||||
if (Model_JointCompleteColor != null)
|
||||
{
|
||||
|
||||
if (!string.IsNullOrEmpty(this.drpJointCompleteColor.SelectedValue.Trim()))
|
||||
{
|
||||
Model_JointCompleteColor.SetValue = this.drpJointCompleteColor.SelectedValue.Trim();
|
||||
BLL.Project_SysSetService.UpdateSet(Model_JointCompleteColor);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.drpJointCompleteColor.SelectedValue.Trim()))
|
||||
{
|
||||
Model.Project_Sys_Set newModel = new Model.Project_Sys_Set()
|
||||
{
|
||||
SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)),
|
||||
ProjectId = this.CurrUser.LoginProjectId,
|
||||
SetName = "焊口已完成",
|
||||
SetValue = this.drpJointCompleteColor.SelectedValue.Trim(),
|
||||
};
|
||||
|
||||
BLL.Project_SysSetService.AddSet(newModel);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region 质量
|
||||
|
||||
Model.Project_Sys_Set CheckEquipmentDay = BLL.Project_SysSetService.GetSysSetBySetName("检试验设备到期提醒天数", this.CurrUser.LoginProjectId);
|
||||
if (CheckEquipmentDay != null)
|
||||
{
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtRemindDay.Text.Trim()))
|
||||
{
|
||||
CheckEquipmentDay.SetValue = this.txtRemindDay.Text.Trim();
|
||||
BLL.Project_SysSetService.UpdateSet(CheckEquipmentDay);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtRemindDay.Text.Trim()))
|
||||
{
|
||||
Model.Project_Sys_Set newCheckEquipmentDay = new Model.Project_Sys_Set();
|
||||
newCheckEquipmentDay.SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set));
|
||||
|
||||
newCheckEquipmentDay.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newCheckEquipmentDay.SetName = "检试验设备到期提醒天数";
|
||||
newCheckEquipmentDay.SetValue = this.txtRemindDay.Text.Trim();
|
||||
BLL.Project_SysSetService.AddSet(newCheckEquipmentDay);
|
||||
}
|
||||
}
|
||||
Model.Project_Sys_Set CheckMonthStartDay = BLL.Project_SysSetService.GetSysSetBySetName("月报开始日期", this.CurrUser.LoginProjectId);
|
||||
if (CheckMonthStartDay != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtStarTime.Text.Trim()))
|
||||
{
|
||||
CheckMonthStartDay.SetValue = this.txtStarTime.Text.Trim();
|
||||
BLL.Project_SysSetService.UpdateSet(CheckMonthStartDay);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtStarTime.Text.Trim()))
|
||||
{
|
||||
Model.Project_Sys_Set newCheckEquipmentDay = new Model.Project_Sys_Set();
|
||||
newCheckEquipmentDay.SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set));
|
||||
newCheckEquipmentDay.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newCheckEquipmentDay.SetName = "月报开始日期";
|
||||
newCheckEquipmentDay.SetValue = this.txtStarTime.Text.Trim();
|
||||
BLL.Project_SysSetService.AddSet(newCheckEquipmentDay);
|
||||
}
|
||||
}
|
||||
Model.Project_Sys_Set CheckMonthEndDay = BLL.Project_SysSetService.GetSysSetBySetName("月报结束日期", this.CurrUser.LoginProjectId);
|
||||
if (CheckMonthEndDay != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim()))
|
||||
{
|
||||
CheckMonthEndDay.SetValue = this.txtEndTime.Text.Trim();
|
||||
BLL.Project_SysSetService.UpdateSet(CheckMonthEndDay);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim()))
|
||||
{
|
||||
Model.Project_Sys_Set newCheckEquipmentDay = new Model.Project_Sys_Set();
|
||||
newCheckEquipmentDay.SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set));
|
||||
newCheckEquipmentDay.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newCheckEquipmentDay.SetName = "月报结束日期";
|
||||
newCheckEquipmentDay.SetValue = this.txtEndTime.Text.Trim();
|
||||
BLL.Project_SysSetService.AddSet(newCheckEquipmentDay);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
// 刷新界面
|
||||
this.Show(projectId);
|
||||
|
||||
//BLL.Sys_LogService.AddLog(BLL.Const.System_1, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, "提交项目环境设置");
|
||||
Alert.ShowInTop("提交成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
|
||||
private void SaveWeldingSettings(string projectId)
|
||||
{
|
||||
// Booleans stored in IsAuto
|
||||
UpsertIsAutoById("1", projectId, this.ckbDayReport.Checked);
|
||||
UpsertIsAutoById("2", projectId, this.ckbPoint.Checked);
|
||||
// trust (id 3) uses special mapping: 1->IsAuto=true, 2->IsAuto=false, otherwise IsAuto=null and SetValue holds value
|
||||
UpsertTrustSetting("3", projectId, this.robStandard.SelectedValue);
|
||||
UpsertIsAutoById("4", projectId, this.ckbPdms.Checked);
|
||||
// batch (id 5) is a list of checked items
|
||||
UpsertBatchSetting("5", projectId);
|
||||
UpsertIsAutoById("6", projectId, this.ckbJointB.Checked);
|
||||
UpsertIsAutoById("7", projectId, this.ckbThickness.Checked);
|
||||
UpsertValueById("8", projectId, this.rblPressUnit.SelectedValue);
|
||||
UpsertValueById("9", projectId, this.AvevaNetUrl.Text.Trim(), setName: "AVEVA NET 地址");
|
||||
UpsertIsAutoById("10", projectId, this.ckPressMustCheckBItem.Checked);
|
||||
UpsertValueById("11", projectId, this.rbMaterialColorAttribute.SelectedValue);
|
||||
}
|
||||
|
||||
private void SaveColorModelSettings(string projectId)
|
||||
{
|
||||
UpsertByName("管线未完成", projectId, this.txtPipelineNOComplete.Text.Trim());
|
||||
UpsertByName("管线已完成", projectId, this.txtPipelineComplete.Text.Trim());
|
||||
UpsertByName("焊口未完成", projectId, this.drpJointNOCompleteColor.SelectedValue.Trim());
|
||||
UpsertByName("焊口已完成", projectId, this.drpJointCompleteColor.SelectedValue.Trim());
|
||||
}
|
||||
|
||||
private void SaveQualitySettings(string projectId)
|
||||
{
|
||||
UpsertByName("检试验设备到期提醒天数", projectId, this.txtRemindDay.Text.Trim());
|
||||
UpsertByName("月报开始日期", projectId, this.txtStarTime.Text.Trim());
|
||||
UpsertByName("月报结束日期", projectId, this.txtEndTime.Text.Trim());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Upsert Helpers
|
||||
private void UpsertIsAutoById(string setId, string projectId, bool value)
|
||||
{
|
||||
var existing = BLL.Project_SysSetService.GetSysSetBySetId(setId, projectId);
|
||||
if (existing != null)
|
||||
{
|
||||
existing.IsAuto = value;
|
||||
BLL.Project_SysSetService.UpdateSet(existing);
|
||||
}
|
||||
else
|
||||
{
|
||||
var newSet = new Model.Project_Sys_Set
|
||||
{
|
||||
SetId = setId,
|
||||
ProjectId = projectId,
|
||||
IsAuto = value
|
||||
};
|
||||
BLL.Project_SysSetService.AddSet(newSet);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpsertValueById(string setId, string projectId, string value, string setName = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value)) return;
|
||||
var existing = BLL.Project_SysSetService.GetSysSetBySetId(setId, projectId);
|
||||
if (existing != null)
|
||||
{
|
||||
existing.SetValue = value;
|
||||
if (!string.IsNullOrEmpty(setName)) existing.SetName = setName;
|
||||
BLL.Project_SysSetService.UpdateSet(existing);
|
||||
}
|
||||
else
|
||||
{
|
||||
var newSet = new Model.Project_Sys_Set
|
||||
{
|
||||
SetId = setId,
|
||||
ProjectId = projectId,
|
||||
SetValue = value,
|
||||
SetName = setName
|
||||
};
|
||||
BLL.Project_SysSetService.AddSet(newSet);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpsertByName(string setName, string projectId, string value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value)) return;
|
||||
var existing = BLL.Project_SysSetService.GetSysSetBySetName(setName, projectId);
|
||||
if (existing != null)
|
||||
{
|
||||
existing.SetValue = value;
|
||||
BLL.Project_SysSetService.UpdateSet(existing);
|
||||
}
|
||||
else
|
||||
{
|
||||
var newSet = new Model.Project_Sys_Set
|
||||
{
|
||||
SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)),
|
||||
ProjectId = projectId,
|
||||
SetName = setName,
|
||||
SetValue = value
|
||||
};
|
||||
BLL.Project_SysSetService.AddSet(newSet);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpsertTrustSetting(string setId, string projectId, string selectedValue)
|
||||
{
|
||||
var existing = BLL.Project_SysSetService.GetSysSetBySetId(setId, projectId);
|
||||
if (existing != null)
|
||||
{
|
||||
if (selectedValue == "1")
|
||||
{
|
||||
existing.IsAuto = true;
|
||||
existing.SetValue = null;
|
||||
}
|
||||
else if (selectedValue == "2")
|
||||
{
|
||||
existing.IsAuto = false;
|
||||
existing.SetValue = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
existing.IsAuto = null;
|
||||
existing.SetValue = selectedValue;
|
||||
}
|
||||
BLL.Project_SysSetService.UpdateSet(existing);
|
||||
}
|
||||
else
|
||||
{
|
||||
var newSet = new Model.Project_Sys_Set
|
||||
{
|
||||
SetId = setId,
|
||||
ProjectId = projectId
|
||||
};
|
||||
if (selectedValue == "1")
|
||||
{
|
||||
newSet.IsAuto = true;
|
||||
}
|
||||
else if (selectedValue == "2")
|
||||
{
|
||||
newSet.IsAuto = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
newSet.IsAuto = null;
|
||||
newSet.SetValue = selectedValue;
|
||||
}
|
||||
BLL.Project_SysSetService.AddSet(newSet);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpsertBatchSetting(string setId, string projectId)
|
||||
{
|
||||
var items = new List<string>();
|
||||
if (cb1.Checked) items.Add("1");
|
||||
if (cb2.Checked) items.Add("2");
|
||||
if (cb3.Checked) items.Add("3");
|
||||
if (cb4.Checked) items.Add("4");
|
||||
if (cb5.Checked) items.Add("5");
|
||||
if (cb6.Checked) items.Add("6");
|
||||
if (cb7.Checked) items.Add("7");
|
||||
|
||||
if (items.Count == 0) return;
|
||||
|
||||
var lists = string.Join("|", items);
|
||||
var existing = BLL.Project_SysSetService.GetSysSetBySetId(setId, projectId);
|
||||
if (existing != null)
|
||||
{
|
||||
existing.IsAuto = true;
|
||||
existing.SetValue = lists;
|
||||
BLL.Project_SysSetService.UpdateSet(existing);
|
||||
}
|
||||
else
|
||||
{
|
||||
var newSet = new Model.Project_Sys_Set
|
||||
{
|
||||
SetId = setId,
|
||||
ProjectId = projectId,
|
||||
IsAuto = true,
|
||||
SetValue = lists
|
||||
};
|
||||
BLL.Project_SysSetService.AddSet(newSet);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 页面呈现
|
||||
/// <summary>
|
||||
///
|
||||
/// 页面呈现
|
||||
/// </summary>
|
||||
private void Show(string projectId)
|
||||
{
|
||||
var q = from x in Funs.DB.Project_Sys_Set where x.ProjectId == projectId select x;
|
||||
if (q.Count() > 0)
|
||||
if (q.Any())
|
||||
{
|
||||
foreach (var s in q)
|
||||
{
|
||||
if (s.SetId == "1")
|
||||
{
|
||||
if (s.IsAuto == true)
|
||||
{
|
||||
this.ckbDayReport.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ckbDayReport.Checked = false;
|
||||
}
|
||||
}
|
||||
else if (s.SetId == "2")
|
||||
{
|
||||
if (s.IsAuto == true)
|
||||
{
|
||||
this.ckbPoint.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ckbPoint.Checked = false;
|
||||
}
|
||||
}
|
||||
else if (s.SetId == "3")
|
||||
{
|
||||
if (s.IsAuto == true)
|
||||
{
|
||||
this.robStandard.SelectedValue = "1";
|
||||
}
|
||||
if (s.IsAuto == false)
|
||||
{
|
||||
this.robStandard.SelectedValue = "2";
|
||||
}
|
||||
if (s.SetValue == "3")
|
||||
{
|
||||
this.robStandard.SelectedValue = "3";
|
||||
}
|
||||
if (s.SetValue == "4")
|
||||
{
|
||||
this.robStandard.SelectedValue = "4";
|
||||
}
|
||||
}
|
||||
else if (s.SetId == "4")
|
||||
{
|
||||
if (s.IsAuto == true)
|
||||
{
|
||||
this.ckbPdms.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ckbPdms.Checked = false;
|
||||
}
|
||||
}
|
||||
else if (s.SetId == "5")
|
||||
{
|
||||
cb4.Checked = false;
|
||||
cb5.Checked = false;
|
||||
cb6.Checked = false;
|
||||
cb7.Checked = false;
|
||||
var lists = s.SetValue.Split('|');
|
||||
foreach (var item in lists)
|
||||
{
|
||||
if (item == "1")
|
||||
{
|
||||
cb1.Checked = true;
|
||||
}
|
||||
else if (item == "2")
|
||||
{
|
||||
cb2.Checked = true;
|
||||
}
|
||||
else if (item == "3")
|
||||
{
|
||||
cb3.Checked = true;
|
||||
}
|
||||
else if (item == "4")
|
||||
{
|
||||
cb4.Checked = true;
|
||||
}
|
||||
else if (item == "5")
|
||||
{
|
||||
cb5.Checked = true;
|
||||
}
|
||||
else if (item == "6")
|
||||
{
|
||||
cb6.Checked = true;
|
||||
}
|
||||
else if (item == "7")
|
||||
{
|
||||
cb7.Checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (s.SetId == "6")
|
||||
{
|
||||
if (s.IsAuto == true)
|
||||
{
|
||||
this.ckbJointB.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ckbJointB.Checked = false;
|
||||
}
|
||||
}
|
||||
else if (s.SetId == "7")
|
||||
{
|
||||
if (s.IsAuto == true)
|
||||
{
|
||||
this.ckbThickness.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ckbThickness.Checked = false;
|
||||
}
|
||||
}
|
||||
else if (s.SetId == "8")
|
||||
{
|
||||
if (s.SetValue == "1")
|
||||
{
|
||||
this.rblPressUnit.SelectedValue = "1";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.rblPressUnit.SelectedValue = "2";
|
||||
}
|
||||
}
|
||||
else if (s.SetId == "9")
|
||||
{
|
||||
var dict = q.ToDictionary(x => x.SetId, x => x);
|
||||
|
||||
this.AvevaNetUrl.Text = s.SetValue;
|
||||
}
|
||||
else if (s.SetId == "10")
|
||||
{
|
||||
if (s.IsAuto == true)
|
||||
{
|
||||
this.ckPressMustCheckBItem.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ckPressMustCheckBItem.Checked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
SetCheckFromDict(dict, "1", this.ckbDayReport);
|
||||
SetCheckFromDict(dict, "2", this.ckbPoint);
|
||||
SetRobStandardFromDict(dict, "3");
|
||||
SetCheckFromDict(dict, "4", this.ckbPdms);
|
||||
SetBatchFromDict(dict, "5");
|
||||
SetCheckFromDict(dict, "6", this.ckbJointB);
|
||||
SetCheckFromDict(dict, "7", this.ckbThickness);
|
||||
SetRadioValueFromDict(dict, "8", this.rblPressUnit, defaultValue: "2");
|
||||
if (dict.ContainsKey("9")) this.AvevaNetUrl.Text = dict["9"].SetValue;
|
||||
SetCheckFromDict(dict, "10", this.ckPressMustCheckBItem);
|
||||
if (dict.ContainsKey("11")) this.rbMaterialColorAttribute.SelectedValue = dict["11"].SetValue == "1" ? "1" : "2";
|
||||
}
|
||||
|
||||
//颜色模型设置
|
||||
Model.Project_Sys_Set Model_PipelineNOComplete = BLL.Project_SysSetService.GetSysSetBySetName("管线未完成", this.CurrUser.LoginProjectId);
|
||||
if (Model_PipelineNOComplete != null)
|
||||
{
|
||||
this.txtPipelineNOComplete.Text = Model_PipelineNOComplete.SetValue;
|
||||
}
|
||||
Model.Project_Sys_Set Model_PipelineComplete = BLL.Project_SysSetService.GetSysSetBySetName("管线已完成", this.CurrUser.LoginProjectId);
|
||||
if (Model_PipelineComplete != null)
|
||||
{
|
||||
this.txtPipelineComplete.Text = Model_PipelineComplete.SetValue;
|
||||
}
|
||||
Model.Project_Sys_Set Model_JointNOCompleteColor = BLL.Project_SysSetService.GetSysSetBySetName("焊口未完成", this.CurrUser.LoginProjectId);
|
||||
if (Model_JointNOCompleteColor != null)
|
||||
{
|
||||
this.drpJointNOCompleteColor.SelectedValue = Model_JointNOCompleteColor.SetValue;
|
||||
}
|
||||
Model.Project_Sys_Set Model_JointCompleteColor = BLL.Project_SysSetService.GetSysSetBySetName("焊口已完成", this.CurrUser.LoginProjectId);
|
||||
if (Model_JointCompleteColor != null)
|
||||
{
|
||||
this.drpJointCompleteColor.SelectedValue = Model_JointCompleteColor.SetValue;
|
||||
}
|
||||
var m1 = BLL.Project_SysSetService.GetSysSetBySetName("管线未完成", this.CurrUser.LoginProjectId);
|
||||
if (m1 != null) this.txtPipelineNOComplete.Text = m1.SetValue;
|
||||
var m2 = BLL.Project_SysSetService.GetSysSetBySetName("管线已完成", this.CurrUser.LoginProjectId);
|
||||
if (m2 != null) this.txtPipelineComplete.Text = m2.SetValue;
|
||||
var m3 = BLL.Project_SysSetService.GetSysSetBySetName("焊口未完成", this.CurrUser.LoginProjectId);
|
||||
if (m3 != null) this.drpJointNOCompleteColor.SelectedValue = m3.SetValue;
|
||||
var m4 = BLL.Project_SysSetService.GetSysSetBySetName("焊口已完成", this.CurrUser.LoginProjectId);
|
||||
if (m4 != null) this.drpJointCompleteColor.SelectedValue = m4.SetValue;
|
||||
|
||||
///质量页面呈现
|
||||
Model.Project_Sys_Set CheckEquipmentDay = BLL.Project_SysSetService.GetSysSetBySetName("检试验设备到期提醒天数", this.CurrUser.LoginProjectId);
|
||||
if (CheckEquipmentDay != null)
|
||||
var c1 = BLL.Project_SysSetService.GetSysSetBySetName("检试验设备到期提醒天数", this.CurrUser.LoginProjectId);
|
||||
if (c1 != null) this.txtRemindDay.Text = c1.SetValue;
|
||||
var c2 = BLL.Project_SysSetService.GetSysSetBySetName("月报开始日期", this.CurrUser.LoginProjectId);
|
||||
if (c2 != null) this.txtStarTime.Text = c2.SetValue; else this.txtStarTime.Text = "25";
|
||||
var c3 = BLL.Project_SysSetService.GetSysSetBySetName("月报结束日期", this.CurrUser.LoginProjectId);
|
||||
if (c3 != null) this.txtEndTime.Text = c3.SetValue; else this.txtEndTime.Text = "24";
|
||||
}
|
||||
|
||||
private void SetCheckFromDict(Dictionary<string, Model.Project_Sys_Set> dict, string setId, CheckBox checkBox)
|
||||
{
|
||||
if (!dict.ContainsKey(setId)) return;
|
||||
var s = dict[setId];
|
||||
checkBox.Checked = s.IsAuto == true;
|
||||
}
|
||||
|
||||
private void SetRobStandardFromDict(Dictionary<string, Model.Project_Sys_Set> dict, string setId)
|
||||
{
|
||||
if (!dict.ContainsKey(setId)) return;
|
||||
var s = dict[setId];
|
||||
if (s.IsAuto == true) this.robStandard.SelectedValue = "1";
|
||||
else if (s.IsAuto == false) this.robStandard.SelectedValue = "2";
|
||||
else if (s.SetValue == "3") this.robStandard.SelectedValue = "3";
|
||||
else if (s.SetValue == "4") this.robStandard.SelectedValue = "4";
|
||||
}
|
||||
|
||||
private void SetBatchFromDict(Dictionary<string, Model.Project_Sys_Set> dict, string setId)
|
||||
{
|
||||
if (!dict.ContainsKey(setId)) return;
|
||||
// reset some checkboxes first
|
||||
cb1.Checked = cb2.Checked = cb3.Checked = cb4.Checked = cb5.Checked = cb6.Checked = cb7.Checked = false;
|
||||
var s = dict[setId];
|
||||
if (string.IsNullOrEmpty(s.SetValue)) return;
|
||||
var items = s.SetValue.Split('|');
|
||||
foreach (var item in items)
|
||||
{
|
||||
this.txtRemindDay.Text = CheckEquipmentDay.SetValue;
|
||||
switch (item)
|
||||
{
|
||||
case "1": cb1.Checked = true; break;
|
||||
case "2": cb2.Checked = true; break;
|
||||
case "3": cb3.Checked = true; break;
|
||||
case "4": cb4.Checked = true; break;
|
||||
case "5": cb5.Checked = true; break;
|
||||
case "6": cb6.Checked = true; break;
|
||||
case "7": cb7.Checked = true; break;
|
||||
}
|
||||
}
|
||||
Model.Project_Sys_Set CheckMonthStartDay = BLL.Project_SysSetService.GetSysSetBySetName("月报开始日期", this.CurrUser.LoginProjectId);
|
||||
if (CheckMonthStartDay != null)
|
||||
}
|
||||
|
||||
private void SetRadioValueFromDict(Dictionary<string, Model.Project_Sys_Set> dict, string setId, RadioButtonList rbl, string defaultValue = null)
|
||||
{
|
||||
if (!dict.ContainsKey(setId))
|
||||
{
|
||||
this.txtStarTime.Text = CheckMonthStartDay.SetValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtStarTime.Text = "25";
|
||||
}
|
||||
Model.Project_Sys_Set CheckMonthEndDay = BLL.Project_SysSetService.GetSysSetBySetName("月报结束日期", this.CurrUser.LoginProjectId);
|
||||
if (CheckMonthEndDay != null)
|
||||
{
|
||||
this.txtEndTime.Text = CheckMonthEndDay.SetValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtEndTime.Text = "24";
|
||||
if (defaultValue != null) rbl.SelectedValue = defaultValue;
|
||||
return;
|
||||
}
|
||||
var s = dict[setId];
|
||||
rbl.SelectedValue = s.SetValue ?? defaultValue;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -113,6 +113,15 @@ namespace FineUIPro.Web.common.ProjectSet
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckPressMustCheckBItem;
|
||||
|
||||
/// <summary>
|
||||
/// rbMaterialColorAttribute 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rbMaterialColorAttribute;
|
||||
|
||||
/// <summary>
|
||||
/// ckbDayReport 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user