11
This commit is contained in:
@@ -0,0 +1,199 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataInEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.JoinMarking.DataInEdit" %>
|
||||
|
||||
<!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" />
|
||||
<f:Form runat="server" ShowBorder="true" ShowHeader="false" ID="SimpForm">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:Button ID="btnAttachUrl" Text="详情" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"/>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpForm" OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:GroupPanel ID="GroupPanel3" Layout="Anchor" Title="管线数据" runat="server">
|
||||
<Items>
|
||||
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" BodyPadding="10px"
|
||||
runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtPipelineCode" Label="管线号"
|
||||
runat="server" FocusOnPageLoad="true" LabelWidth="120px" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpPipingClass" Label="管道等级" runat="server"
|
||||
LabelWidth="120px" Readonly="true">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpDetectionRate" Label="探伤比例" runat="server"
|
||||
LabelWidth="120px" Readonly="true">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtDetectionType" Label="探伤类型" runat="server" LabelWidth="120px" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
<f:GroupPanel ID="GroupPanel1" Layout="Anchor" Title="设计基础数据" runat="server">
|
||||
<Items>
|
||||
<f:Form runat="server" ShowHeader="false" ShowBorder="false" ID="form3">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtWeldJointCode" Label="焊口号" Readonly="false"
|
||||
runat="server" LabelWidth="100px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:Label runat="server"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
|
||||
<f:DropDownList ID="drpMaterial1" Label="材质1"
|
||||
runat="server" ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpMaterial2" Label="材质2"
|
||||
runat="server" ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
<f:NumberBox ID="txtDia" Label="外径" runat="server"
|
||||
LabelWidth="100px" DecimalPrecision="4" NoNegative="true"
|
||||
EnableBlurEvent="true" OnBlur="txtText_TextChanged" LabelAlign="Right">
|
||||
</f:NumberBox>
|
||||
<f:TextBox ID="txtDNDia" Label="公称直径" runat="server" LabelWidth="100px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtSize" Label="达因" runat="server" Readonly="true"
|
||||
LabelWidth="100px" DecimalPrecision="4" NoNegative="true" ShowRedStar="true" Required="true" LabelAlign="Right">
|
||||
</f:NumberBox>
|
||||
<f:NumberBox ID="txtThickness" Label="壁厚" runat="server"
|
||||
LabelWidth="100px" DecimalPrecision="4" NoNegative="true" ShowRedStar="true" Required="true"
|
||||
EnableBlurEvent="true" OnBlur="txtText_TextChanged" LabelAlign="Right">
|
||||
</f:NumberBox>
|
||||
<f:TextBox ID="txtSpecification" Label="规格" runat="server" Readonly="true"
|
||||
LabelWidth="100px" ShowRedStar="true" Required="true" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpWeldTypeCode" Label="焊缝类型"
|
||||
runat="server" EnableEdit="true" AutoPostBack="true" Required="true" ShowRedStar="true" LabelWidth="100px" OnSelectedIndexChanged="drpWeldTypeCode_SelectedIndexChanged" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpDetectionTypeId" Label="检测类型" runat="server"
|
||||
LabelWidth="100px" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtRemark" runat="server" Label="备注" MaxLength="200" LabelAlign="Right"
|
||||
LabelWidth="100px">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpJointAttribute" Label="焊口属性" AutoPostBack="true"
|
||||
runat="server" ShowRedStar="true" Required="true" LabelWidth="100px"
|
||||
Width="180px" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList runat="server" ID="DropTwoJointType" Label="二次新增类型" LabelAlign="Right" LabelWidth="140px" AutoPostBack="true">
|
||||
<f:ListItem Text="新增口" Value="新增口" />
|
||||
<f:ListItem Text="修改口" Value="修改口" />
|
||||
</f:DropDownList>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpIsHotProess" runat="server" Label="是否热处理" LabelAlign="Right"
|
||||
LabelWidth="100px" >
|
||||
<f:ListItem Value="False" Text="否" Selected="true" />
|
||||
<f:ListItem Value="True" Text="是" />
|
||||
</f:DropDownList>
|
||||
<f:Label runat="server"></f:Label>
|
||||
<f:Label runat="server"></f:Label>
|
||||
<f:Label runat="server"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
|
||||
<f:GroupPanel ID="GroupPanel2" Layout="Anchor" Title="施工基础数据" runat="server">
|
||||
<Items>
|
||||
<f:Form runat="server" ShowHeader="false" ShowBorder="false">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpWeldingMethodId" Label="焊接方法" Enabled="false"
|
||||
runat="server" ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
<f:Panel ID="Panel3" Width="300px" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
|
||||
<Items>
|
||||
<f:TextBox ID="txtWPQCode" Label="WPS编号" runat="server" ShowRedStar="true" Required="true" Enabled="false"
|
||||
LabelWidth="100px" Width="250px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:Button ID="search" OnClick="search_Click" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" runat="server">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:DropDownList ID="drpGrooveType" Label="坡口类型" runat="server" Enabled="false"
|
||||
EnableEdit="true" LabelWidth="100px" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpWeldingRod" Label="焊条" runat="server"
|
||||
EnableEdit="true" LabelWidth="100px" AutoPostBack="true" OnSelectedIndexChanged="drpWeldingRod_SelectedIndexChanged" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpWeldingWire" Label="焊丝" runat="server"
|
||||
EnableEdit="true" LabelWidth="100px" AutoPostBack="true" OnSelectedIndexChanged="drpWeldingWire_SelectedIndexChanged" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtPreTemperature" runat="server" Label="预热温度" MaxLength="50" LabelAlign="Right" Enabled="false"
|
||||
LabelWidth="100px">
|
||||
</f:TextBox>
|
||||
|
||||
<f:Label runat="server"></f:Label>
|
||||
<f:Label runat="server"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtWpqId" Label="" runat="server"
|
||||
LabelWidth="100px" ShowRedStar="true" Required="true" Hidden="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" ID="txtIsHotProess" Hidden="true"></f:TextBox>
|
||||
<f:TextBox runat="server" ID="hdWeldingMethodId" Hidden="true"></f:TextBox>
|
||||
<f:TextBox runat="server" ID="hdGrooveType" Hidden="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
|
||||
</Items>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" Title="弹出窗体" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
|
||||
IsModal="true" Width="1200px" Height="620px" OnClose="Window1_Close">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="附件" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,765 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
{
|
||||
public partial class DataInEdit : PageBase
|
||||
{
|
||||
public static Dictionary<string, HJGL_WeldJoint> dic = new Dictionary<string, HJGL_WeldJoint>();
|
||||
|
||||
/// <summary>
|
||||
/// 管线主键
|
||||
/// </summary>
|
||||
public string PipelineId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["PipelineId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["PipelineId"] = value;
|
||||
}
|
||||
}
|
||||
public string WeldJointId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["WeldJointId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["WeldJointId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Base_PipingClassService.InitPipingClassDropDownList(this.drpPipingClass, this.CurrUser.LoginProjectId, true, "请选择");//管线等级
|
||||
Base_DetectionRateService.InitDetectionRateDropDownList(drpDetectionRate, true);
|
||||
BLL.Base_MaterialService.InitMaterialDropDownList(this.drpMaterial1, true, "请选择");//材质1
|
||||
BLL.Base_MaterialService.InitMaterialDropDownList(this.drpMaterial2, true, "请选择");//材质2
|
||||
BLL.Base_WeldTypeService.InitWeldTypeDropDownList(this.drpWeldTypeCode, "请选择", true);//焊缝类型
|
||||
|
||||
BLL.Base_GrooveTypeService.InitGrooveTypeDropDownList(this.drpGrooveType, true, "请选择");//坡口类型
|
||||
BLL.Base_WeldingMethodService.InitWeldingMethodDropDownList(this.drpWeldingMethodId, true, "请选择");//焊接方法
|
||||
BLL.Base_ConsumablesService.InitConsumablesDropDownList(this.drpWeldingRod, true, "2", "请选择");//焊丝类型
|
||||
BLL.Base_ConsumablesService.InitConsumablesDropDownList(this.drpWeldingWire, true, "1", "请选择");//焊条类型
|
||||
Funs.FineUIPleaseSelect(DropTwoJointType, "请选择");
|
||||
|
||||
//焊口属性
|
||||
this.drpJointAttribute.DataTextField = "Text";
|
||||
this.drpJointAttribute.DataValueField = "Value";
|
||||
this.drpJointAttribute.DataSource = BLL.DropListService.HJGL_JointAttribute();
|
||||
this.drpJointAttribute.DataBind();
|
||||
|
||||
//BLL.Base_ComponentsService.InitComponentsDropDownList(this.drpComponent1, this.CurrUser.LoginProjectId, true, "请选择");//组件1
|
||||
//BLL.Base_ComponentsService.InitComponentsDropDownList(this.drpComponent2, this.CurrUser.LoginProjectId, true, "请选择");//组件2
|
||||
this.drpDetectionTypeId.DataValueField = "DetectionTypeId";
|
||||
this.drpDetectionTypeId.DataTextField = "DetectionTypeCode";
|
||||
//Funs.FineUIPleaseSelect(this.drpDetectionTypeId);
|
||||
string flag = Request.Params["flag"];
|
||||
WeldJointId = Request.Params["WeldJointId"];
|
||||
string isTwoJoint = Request.Params["IsTwoJoint"];
|
||||
|
||||
|
||||
if (flag == "2")
|
||||
{
|
||||
GroupPanel2.Hidden = false;
|
||||
IsReadOnly(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
GroupPanel2.Hidden = true;
|
||||
IsReadOnly(false);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(WeldJointId))
|
||||
{
|
||||
Model.HJGL_WeldJoint joint = dic[WeldJointId];
|
||||
Model.WPQ_WPQList list = BLL.WPQListServiceService.GetWPQById(joint.WPQId);
|
||||
this.txtWpqId.Text = joint.WPQId;
|
||||
|
||||
if (joint != null)
|
||||
{
|
||||
this.PipelineId = joint.PipelineId;
|
||||
if (list != null)
|
||||
{
|
||||
this.txtWPQCode.Text = list.WPQCode;
|
||||
this.txtWpqId.Text = list.WPQId;
|
||||
}
|
||||
if (Request.Params["Type"] == "add") //插入焊口
|
||||
{
|
||||
var baseWeldJoints = BLL.WeldJointService.GetBaseWeldJointsByWeldJointId(WeldJointId);
|
||||
this.txtWeldJointCode.Text = joint.WeldJointCode + "Z-" + (baseWeldJoints.Count + 1).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtWeldJointCode.Text = joint.WeldJointCode;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(joint.Material1Id))
|
||||
{
|
||||
this.drpMaterial1.SelectedValue = joint.Material1Id;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(joint.Material2Id))
|
||||
{
|
||||
this.drpMaterial2.SelectedValue = joint.Material2Id;
|
||||
}
|
||||
this.txtSize.Text = Convert.ToString(joint.Size);
|
||||
this.txtDia.Text = Convert.ToString(joint.Dia);
|
||||
this.txtDNDia.Text = joint.DNDia;
|
||||
this.txtThickness.Text = Convert.ToString(joint.Thickness);
|
||||
if (!string.IsNullOrEmpty(joint.WeldingMethodId))
|
||||
{
|
||||
drpWeldingMethodId.SelectedValue = joint.WeldingMethodId;
|
||||
hdWeldingMethodId.Text = joint.WeldingMethodId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(joint.WeldingRod))
|
||||
{
|
||||
drpWeldingRod.SelectedValue = joint.WeldingRod;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(joint.WeldingWire))
|
||||
{
|
||||
drpWeldingWire.SelectedValue = joint.WeldingWire;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(joint.GrooveTypeId))
|
||||
{
|
||||
drpGrooveType.SelectedValue = joint.GrooveTypeId;
|
||||
hdGrooveType.Text = joint.GrooveTypeId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(joint.WeldTypeId))
|
||||
{
|
||||
drpWeldTypeCode.SelectedValue = joint.WeldTypeId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(joint.TwoJointType))
|
||||
{
|
||||
DropTwoJointType.SelectedValue = joint.TwoJointType;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(joint.DetectionTypeId))
|
||||
{
|
||||
List<Model.Base_DetectionType> dList = new List<Model.Base_DetectionType>();
|
||||
if (drpWeldTypeCode.SelectedItem.Text.Contains("B"))
|
||||
{
|
||||
Model.Base_DetectionType rt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("RT");
|
||||
Model.Base_DetectionType ut = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("UT");
|
||||
dList.Add(rt);
|
||||
dList.Add(ut);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Base_DetectionType mt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("MT");
|
||||
Model.Base_DetectionType pt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("PT");
|
||||
dList.Add(mt);
|
||||
dList.Add(pt);
|
||||
}
|
||||
this.drpDetectionTypeId.DataSource = dList;
|
||||
this.drpDetectionTypeId.DataBind();
|
||||
this.drpDetectionTypeId.SelectedValue = joint.DetectionTypeId;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(joint.JointAttribute))
|
||||
{
|
||||
drpJointAttribute.SelectedValue = joint.JointAttribute;
|
||||
}
|
||||
|
||||
//if (!string.IsNullOrEmpty(joint.Components1Id))
|
||||
//{
|
||||
// drpComponent1.SelectedValue = joint.Components1Id;
|
||||
//}
|
||||
//if (!string.IsNullOrEmpty(joint.Components2Id))
|
||||
//{
|
||||
// drpComponent2.SelectedValue = joint.Components2Id;
|
||||
//}
|
||||
this.txtPreTemperature.Text = joint.PreTemperature;
|
||||
this.txtSpecification.Text = joint.Specification;
|
||||
txtRemark.Text = joint.Remark;
|
||||
if (joint.IsHotProess != null)
|
||||
{
|
||||
drpIsHotProess.SelectedValue = joint.IsHotProess.Value.ToString();
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(joint.DesignIsHotProess.ToString()))
|
||||
//{
|
||||
// drpDesignIsHotProess.SelectedValue = joint.DesignIsHotProess.Value.ToString();
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Request.Params["PipelineId"]))
|
||||
{
|
||||
this.PipelineId = Request.Params["PipelineId"];
|
||||
}
|
||||
|
||||
}
|
||||
Model.View_HJGL_Pipeline pipeline = BLL.PipelineService.GetViewPipelineByPipelineId(this.PipelineId);
|
||||
if (pipeline != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(pipeline.PipingClassId))
|
||||
{
|
||||
this.drpPipingClass.SelectedValue = pipeline.PipingClassId;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(pipeline.DetectionRateId))
|
||||
{
|
||||
this.drpDetectionRate.SelectedValue = pipeline.DetectionRateId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pipeline.DetectionType))
|
||||
{
|
||||
string[] dtype = pipeline.DetectionType.Split('|');
|
||||
string DetectionTypestr = "";
|
||||
for (int i = 0; i < dtype.Length; i++)
|
||||
{
|
||||
var DetectionType = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(dtype[i].ToString());
|
||||
if (i == 0)
|
||||
{
|
||||
DetectionTypestr = DetectionType.DetectionTypeCode;
|
||||
}
|
||||
else
|
||||
{
|
||||
DetectionTypestr += "," + DetectionType.DetectionTypeCode;
|
||||
}
|
||||
}
|
||||
this.txtDetectionType.Text = DetectionTypestr;
|
||||
}
|
||||
this.txtPipelineCode.Text = pipeline.PipelineCode;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(isTwoJoint))
|
||||
{
|
||||
//string perfix = txtPipelineCode.Text + "/Z-";
|
||||
string perfix = txtPipelineCode.Text + "/";
|
||||
this.txtWeldJointCode.Text = perfix;
|
||||
|
||||
// txtWeldJointCode.Text = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_WeldJoint", "WeldJointCode", this.CurrUser.LoginProjectId, perfix);
|
||||
|
||||
// txtWeldJointCode.Text = txtWeldJointCode.Text.Replace(perfix, "");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void IsReadOnly(bool isReadOnly)
|
||||
{
|
||||
drpMaterial1.Readonly = isReadOnly;
|
||||
drpMaterial2.Readonly = isReadOnly;
|
||||
txtDia.Readonly = isReadOnly;
|
||||
txtSize.Readonly = isReadOnly;
|
||||
txtThickness.Readonly = isReadOnly;
|
||||
drpWeldTypeCode.Readonly = isReadOnly;
|
||||
}
|
||||
|
||||
protected void search_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_WeldJointMenuId, BLL.Const.BtnModify))
|
||||
{
|
||||
if (this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("材质1、材质2不能为空", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.PipelineId);
|
||||
//PageContext.RegisterStartupScript(Window1.GetSaveStateReference(txtWpqId.ClientID, txtWPQCode.ClientID, drpWeldingRod.ClientID, drpWeldingWire.ClientID, drpWeldingMethodId.ClientID, drpGrooveType.ClientID, txtPreTemperature.ClientID, drpMaterial1.ClientID,drpMaterial2.ClientID,txtIsHotProess.ClientID)
|
||||
// + Window1.GetShowReference(String.Format("SelectWPS.aspx?Material1={0}&Material2={1}&Dia={2}&Thickness={3}&UnitId={4}&WeldingMethod={5}&WeldType={6}", this.drpMaterial1.SelectedValue, this.drpMaterial2.SelectedValue, this.txtDia.Text, this.txtThickness.Text,pipeline.UnitId,this.drpWeldingMethodId.SelectedText,this.drpWeldTypeCode.SelectedText, "维护 - ")));
|
||||
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(txtWpqId.ClientID, txtWPQCode.ClientID, drpWeldingRod.ClientID, drpWeldingWire.ClientID, drpWeldingMethodId.ClientID, hdWeldingMethodId.ClientID, drpGrooveType.ClientID, hdGrooveType.ClientID, txtPreTemperature.ClientID, txtIsHotProess.ClientID)
|
||||
+ Window1.GetShowReference(String.Format("SelectWPS.aspx?Material1={0}&Material2={1}&Dia={2}&Thickness={3}&UnitId={4}&WeldingMethod={5}&WeldType={6}", this.drpMaterial1.SelectedValue, this.drpMaterial2.SelectedValue, this.txtDia.Text, this.txtThickness.Text, pipeline.UnitId, this.drpWeldingMethodId.SelectedText, this.drpWeldTypeCode.SelectedText, "维护 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
string weldJointCode = string.Empty;
|
||||
|
||||
int joint = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
|
||||
|
||||
if (joint != 0)
|
||||
{
|
||||
if (joint < 10)
|
||||
{
|
||||
weldJointCode = "0" + Convert.ToString(joint);
|
||||
}
|
||||
else
|
||||
{
|
||||
weldJointCode = Convert.ToString(joint);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
weldJointCode = this.txtWeldJointCode.Text;
|
||||
}
|
||||
|
||||
if (BLL.WeldJointService.IsExistWeldJointCode(weldJointCode, this.PipelineId, WeldJointId))
|
||||
{
|
||||
Alert.ShowInTop("该管线焊口已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
SaveData(true);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 提交数据
|
||||
/// </summary>
|
||||
private void SaveData(bool isClosed)
|
||||
{
|
||||
// if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.hdWeldingMethodId.Text) || string.IsNullOrEmpty(this.txtWpqId.Text.Trim()))
|
||||
if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("页面必填项不能为空", MessageBoxIcon.Warning);
|
||||
Alert.ShowInTop("请完善必填项!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.HJGL_WeldJoint joint = dic[WeldJointId];
|
||||
string weldJointId = WeldJointId;
|
||||
joint.PipelineId = this.PipelineId;
|
||||
joint.PipelineCode = txtPipelineCode.Text.Trim();
|
||||
joint.ProjectId = this.CurrUser.LoginProjectId;
|
||||
|
||||
//if (!this.txtWeldJointCode.Text.Contains("G"))
|
||||
//{
|
||||
int jointCode = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
|
||||
if (jointCode != 0)
|
||||
{
|
||||
if (jointCode < 10)
|
||||
{
|
||||
joint.WeldJointCode = "0" + Convert.ToString(jointCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
joint.WeldJointCode = Convert.ToString(jointCode);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
joint.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Alert.ShowInTop("焊口编号不能包含G!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
|
||||
if (this.drpMaterial1.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
joint.Material1Id = this.drpMaterial1.SelectedValue;
|
||||
}
|
||||
if (this.drpMaterial2.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
joint.Material2Id = this.drpMaterial2.SelectedValue;
|
||||
}
|
||||
joint.Size = Funs.GetNewDecimal(this.txtSize.Text.Trim());
|
||||
joint.Dia = Funs.GetNewDecimal(this.txtDia.Text.Trim());
|
||||
joint.DNDia = txtDNDia.Text.Trim();
|
||||
joint.Thickness = Funs.GetNewDecimal(this.txtThickness.Text.Trim());
|
||||
//if (this.drpComponent1.SelectedValue != BLL.Const._Null)
|
||||
//{
|
||||
// joint.Components1Id = this.drpComponent1.SelectedValue;
|
||||
//}
|
||||
//if (this.drpComponent2.SelectedValue != BLL.Const._Null)
|
||||
//{
|
||||
// joint.Components2Id = this.drpComponent2.SelectedValue;
|
||||
//}
|
||||
joint.JointAttribute = drpJointAttribute.SelectedValue;
|
||||
|
||||
if (!string.IsNullOrEmpty(this.hdWeldingMethodId.Text.Trim()))
|
||||
{
|
||||
joint.WeldingMethodId = this.hdWeldingMethodId.Text.Trim();
|
||||
}
|
||||
if (this.drpWeldingRod.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
joint.WeldingRod = drpWeldingRod.SelectedValue;
|
||||
}
|
||||
if (this.drpWeldingWire.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
joint.WeldingWire = drpWeldingWire.SelectedValue;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.hdGrooveType.Text.Trim()))
|
||||
{
|
||||
joint.GrooveTypeId = this.hdGrooveType.Text.Trim();
|
||||
}
|
||||
if (this.drpWeldTypeCode.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
joint.WeldTypeId = drpWeldTypeCode.SelectedValue;
|
||||
}
|
||||
if (this.DropTwoJointType.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
joint.TwoJointType = DropTwoJointType.SelectedValue;
|
||||
}
|
||||
joint.PreTemperature = this.txtPreTemperature.Text;
|
||||
joint.Specification = this.txtSpecification.Text;
|
||||
//var DetectionType = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode(this.txtDetectionTypeId.Text.Trim());
|
||||
if (this.drpDetectionTypeId.SelectedValue != null)
|
||||
{
|
||||
joint.DetectionTypeId = this.drpDetectionTypeId.SelectedValue;
|
||||
}
|
||||
//bool flag = false;
|
||||
//if (Convert.ToBoolean(drpDesignIsHotProess.SelectedValue))
|
||||
//{
|
||||
// flag = true;
|
||||
//}
|
||||
//if (flag)
|
||||
//{
|
||||
// joint.IsHotProess = true;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// joint.IsHotProess = false;
|
||||
//}
|
||||
joint.IsHotProess = Convert.ToBoolean(drpIsHotProess.SelectedValue);
|
||||
//joint.DesignIsHotProess = Convert.ToBoolean(drpDesignIsHotProess.SelectedValue);
|
||||
joint.Remark = txtRemark.Text.Trim();
|
||||
joint.SubmitMan = CurrUser.PersonId;
|
||||
|
||||
if (this.txtWpqId.Text != "")
|
||||
{
|
||||
joint.WPQId = this.txtWpqId.Text;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(weldJointId))
|
||||
{
|
||||
if (string.IsNullOrEmpty(Request.Params["Type"])) //非插入焊口
|
||||
{
|
||||
joint.WeldJointId = weldJointId;
|
||||
BLL.WeldJointService.UpdateWeldJoint(joint);
|
||||
}
|
||||
else //插入焊口
|
||||
{
|
||||
string newId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldJoint));
|
||||
joint.WeldJointId = newId;
|
||||
joint.BaseWeldJointId = weldJointId;
|
||||
WeldJointId = joint.WeldJointId;
|
||||
BLL.WeldJointService.AddWeldJoint(joint);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string newId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldJoint));
|
||||
joint.WeldJointId = newId;
|
||||
WeldJointId = joint.WeldJointId;
|
||||
if (Request.Params["IsTwoJoint"] == "1")
|
||||
{
|
||||
joint.IsTwoJoint = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
joint.IsTwoJoint = null;
|
||||
}
|
||||
|
||||
BLL.WeldJointService.AddWeldJoint(joint);
|
||||
}
|
||||
if (isClosed)
|
||||
{
|
||||
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据焊缝类型获取探伤类型
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpWeldTypeCode_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.drpDetectionTypeId.Items.Clear();
|
||||
if (this.drpWeldTypeCode.SelectedValue != Const._Null)
|
||||
{
|
||||
List<Model.Base_DetectionType> dList = new List<Model.Base_DetectionType>();
|
||||
if (drpWeldTypeCode.SelectedItem.Text.Contains("B"))
|
||||
{
|
||||
Model.Base_DetectionType rt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("RT");
|
||||
Model.Base_DetectionType ut = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("UT");
|
||||
dList.Add(rt);
|
||||
dList.Add(ut);
|
||||
this.drpDetectionTypeId.DataSource = dList;
|
||||
this.drpDetectionTypeId.DataBind();
|
||||
this.drpDetectionTypeId.SelectedValue = rt.DetectionTypeId;
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Base_DetectionType mt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("MT");
|
||||
Model.Base_DetectionType pt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("PT");
|
||||
dList.Add(mt);
|
||||
dList.Add(pt);
|
||||
this.drpDetectionTypeId.DataSource = dList;
|
||||
this.drpDetectionTypeId.DataBind();
|
||||
this.drpDetectionTypeId.SelectedValue = pt.DetectionTypeId;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 焊丝
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpWeldingRod_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(txtWpqId.Text))
|
||||
{
|
||||
var wps = BLL.WPQListServiceService.GetWPQById(txtWpqId.Text.Trim());
|
||||
|
||||
if (drpMaterial1.SelectedValue != Const._Null)
|
||||
{
|
||||
var mat = BLL.Base_MaterialService.GetMaterialByMaterialId(drpMaterial1.SelectedValue);
|
||||
string matClass = mat.MaterialClass;
|
||||
if (matClass == "Fe-1" || matClass == "Fe-3")
|
||||
{
|
||||
var wpsRod = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(wps.WeldingRod);
|
||||
var matRod = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(drpWeldingRod.SelectedValue);
|
||||
if (wpsRod != null && matRod != null && IsCoverClass(wpsRod.SteelType, matRod.SteelType))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("焊口焊材强度需大于等于WPS焊材强度!", MessageBoxIcon.Warning);
|
||||
drpWeldingWire.SelectedValue = wps.WeldingRod;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
drpWeldingWire.SelectedValue = wps.WeldingRod;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 焊条
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpWeldingWire_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(txtWpqId.Text))
|
||||
{
|
||||
var wps = BLL.WPQListServiceService.GetWPQById(txtWpqId.Text.Trim());
|
||||
|
||||
if (drpMaterial1.SelectedValue != Const._Null)
|
||||
{
|
||||
var mat = BLL.Base_MaterialService.GetMaterialByMaterialId(drpMaterial1.SelectedValue);
|
||||
string matClass = mat.MaterialClass;
|
||||
if (matClass == "Fe-1" || matClass == "Fe-3")
|
||||
{
|
||||
var wpsWire = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(wps.WeldingWire);
|
||||
var matWire = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(drpWeldingWire.SelectedValue);
|
||||
if (wpsWire != null && matWire != null && IsCoverClass(wpsWire.SteelType, matWire.SteelType))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("焊口焊材强度需大于等于WPS焊材强度!", MessageBoxIcon.Warning);
|
||||
drpWeldingWire.SelectedValue = wps.WeldingWire;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
drpWeldingWire.SelectedValue = wps.WeldingWire;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断耗材强度是否大于WPS耗材强度,如是为true,否则为false
|
||||
/// </summary>
|
||||
/// <param name="wpsClass"></param>
|
||||
/// <param name="matClass"></param>
|
||||
/// <returns></returns>
|
||||
private bool IsCoverClass(string wpsClass, string matClass)
|
||||
{
|
||||
bool isCover = false;
|
||||
int wpsSn = 0;
|
||||
int matSn = 0;
|
||||
string wpsPre = wpsClass.Substring(0, wpsClass.Length - 2);
|
||||
string matPre = matClass.Substring(0, matClass.Length - 2);
|
||||
|
||||
string wps = wpsClass.Substring(wpsClass.Length - 1, 1);
|
||||
wpsSn = Funs.GetNewInt(wps).HasValue ? Funs.GetNewInt(wps).Value : 0;
|
||||
|
||||
string mat = matClass.Substring(matClass.Length - 1, 1);
|
||||
matSn = Funs.GetNewInt(mat).HasValue ? Funs.GetNewInt(mat).Value : 0;
|
||||
|
||||
if (wpsPre == matPre && matSn >= wpsSn)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return isCover;
|
||||
}
|
||||
|
||||
#region 外径、壁厚输入框事件
|
||||
/// <summary>
|
||||
/// 选择外径和壁厚自动获取规格
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtText_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
string dn = string.Empty;
|
||||
string s = string.Empty;
|
||||
//this.txtSize.Text = string.Empty;
|
||||
this.txtSpecification.Text = string.Empty;
|
||||
if (!string.IsNullOrEmpty(this.txtDia.Text.Trim()))
|
||||
{
|
||||
dn = this.txtDia.Text.Trim();
|
||||
decimal dia = Funs.GetNewDecimalOrZero(this.txtDia.Text.Trim());
|
||||
var inch = BLL.Base_DNCompareService.GetSizeByDia(dia);
|
||||
|
||||
if (inch != null)
|
||||
{
|
||||
this.txtSize.Text = Convert.ToString(inch);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtThickness.Text.Trim()))
|
||||
{
|
||||
decimal thickness = Funs.GetNewDecimalOrZero(this.txtThickness.Text.Trim());
|
||||
//是否根据壁厚计算达因
|
||||
Model.Project_Sys_Set thicknessSet = BLL.Project_SysSetService.GetSysSetBySetId("7", this.CurrUser.LoginProjectId);
|
||||
if (thicknessSet != null && thicknessSet.IsAuto == true)
|
||||
{
|
||||
if (inch != null)
|
||||
{
|
||||
this.txtSize.Text = BLL.WeldJointService.GetSizeByThickness(inch, thickness).ToString();
|
||||
}
|
||||
}
|
||||
this.txtSpecification.Text = "Φ" + dn + "*" + this.txtThickness.Text.Trim();
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtDNDia.Text.Trim()))
|
||||
{
|
||||
dn = this.txtDNDia.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.txtThickness.Text.Trim()))
|
||||
{
|
||||
this.txtSpecification.Text = dn + "*" + this.txtThickness.Text.Trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
var IsHotProess = this.txtIsHotProess.Text;
|
||||
if (IsHotProess == "True")
|
||||
{
|
||||
this.drpIsHotProess.SelectedValue = "True";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpIsHotProess.SelectedValue = "False";
|
||||
//if (!Convert.ToBoolean(drpDesignIsHotProess.SelectedValue))
|
||||
//{
|
||||
// this.drpIsHotProess.SelectedValue = "False";
|
||||
//}
|
||||
}
|
||||
//获取可替代焊丝焊条
|
||||
var weldingRods = from x in Funs.DB.Base_Consumables where x.ConsumablesType == "2" select x;
|
||||
var weldingWires = from x in Funs.DB.Base_Consumables where x.ConsumablesType == "1" select x;
|
||||
List<Model.Base_Consumables> weldingRodList = new List<Model.Base_Consumables>();
|
||||
List<Model.Base_Consumables> weldingWireList = new List<Model.Base_Consumables>();
|
||||
string weldingRodId = this.drpWeldingRod.SelectedValue;
|
||||
var mat = BLL.Base_MaterialService.GetMaterialByMaterialId(this.drpMaterial1.SelectedValue);
|
||||
string matClass = mat.MaterialClass;
|
||||
var matRod = weldingRods.FirstOrDefault(x => x.ConsumablesId == weldingRodId);
|
||||
if (matRod != null)
|
||||
{
|
||||
foreach (var item in weldingRods)
|
||||
{
|
||||
if (matClass == "Fe-1" || matClass == "Fe-3")
|
||||
{
|
||||
if (IsCoverClass(matRod.SteelType, item.SteelType))
|
||||
{
|
||||
weldingRodList.Add(item);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (matRod.SteelType == item.SteelType)
|
||||
{
|
||||
weldingRodList.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
weldingRodList.Add(matRod);
|
||||
weldingRodList = weldingRodList.Distinct().ToList();
|
||||
this.drpWeldingRod.DataSource = weldingRodList;
|
||||
this.drpWeldingRod.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpWeldingRod);
|
||||
this.drpWeldingRod.SelectedValue = weldingRodId;
|
||||
}
|
||||
string weldingWireId = this.drpWeldingWire.SelectedValue;
|
||||
var matWire = weldingWires.FirstOrDefault(x => x.ConsumablesId == weldingWireId);
|
||||
if (matWire != null)
|
||||
{
|
||||
foreach (var item in weldingWires)
|
||||
{
|
||||
if (matClass == "Fe-1" || matClass == "Fe-3")
|
||||
{
|
||||
if (IsCoverClass(matWire.SteelType, item.SteelType))
|
||||
{
|
||||
weldingWireList.Add(item);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (matWire.SteelType == item.SteelType)
|
||||
{
|
||||
weldingWireList.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
weldingWireList.Add(matWire);
|
||||
weldingWireList = weldingWireList.Distinct().ToList();
|
||||
this.drpWeldingWire.DataSource = weldingWireList;
|
||||
this.drpWeldingWire.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpWeldingWire);
|
||||
this.drpWeldingWire.SelectedValue = weldingWireId;
|
||||
}
|
||||
}
|
||||
|
||||
//protected void drpDesignIsHotProess_SelectedIndexChanged(object sender, EventArgs e)
|
||||
//{
|
||||
// if (drpDesignIsHotProess.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// if (Convert.ToBoolean(drpDesignIsHotProess.SelectedValue))
|
||||
// {
|
||||
// this.drpIsHotProess.SelectedValue = "True";
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (this.txtIsHotProess.Text == "False")
|
||||
// {
|
||||
// this.drpIsHotProess.SelectedValue = "False";
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.WeldJointId))
|
||||
{
|
||||
SaveData(false);
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldJoint&menuId={1}", WeldJointId, BLL.Const.HJGL_JotTwoDesignMenuId)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,404 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
{
|
||||
|
||||
|
||||
public partial class DataInEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpForm 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpForm;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.GroupPanel GroupPanel3;
|
||||
|
||||
/// <summary>
|
||||
/// Form2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form2;
|
||||
|
||||
/// <summary>
|
||||
/// txtPipelineCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPipelineCode;
|
||||
|
||||
/// <summary>
|
||||
/// drpPipingClass 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpPipingClass;
|
||||
|
||||
/// <summary>
|
||||
/// drpDetectionRate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDetectionRate;
|
||||
|
||||
/// <summary>
|
||||
/// txtDetectionType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtDetectionType;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.GroupPanel GroupPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// form3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form form3;
|
||||
|
||||
/// <summary>
|
||||
/// txtWeldJointCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWeldJointCode;
|
||||
|
||||
/// <summary>
|
||||
/// drpMaterial1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpMaterial1;
|
||||
|
||||
/// <summary>
|
||||
/// drpMaterial2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpMaterial2;
|
||||
|
||||
/// <summary>
|
||||
/// txtDia 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtDia;
|
||||
|
||||
/// <summary>
|
||||
/// txtDNDia 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtDNDia;
|
||||
|
||||
/// <summary>
|
||||
/// txtSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtSize;
|
||||
|
||||
/// <summary>
|
||||
/// txtThickness 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtThickness;
|
||||
|
||||
/// <summary>
|
||||
/// txtSpecification 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSpecification;
|
||||
|
||||
/// <summary>
|
||||
/// drpWeldTypeCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWeldTypeCode;
|
||||
|
||||
/// <summary>
|
||||
/// drpDetectionTypeId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDetectionTypeId;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// drpJointAttribute 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpJointAttribute;
|
||||
|
||||
/// <summary>
|
||||
/// DropTwoJointType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropTwoJointType;
|
||||
|
||||
/// <summary>
|
||||
/// drpIsHotProess 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpIsHotProess;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.GroupPanel GroupPanel2;
|
||||
|
||||
/// <summary>
|
||||
/// drpWeldingMethodId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWeldingMethodId;
|
||||
|
||||
/// <summary>
|
||||
/// Panel3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel3;
|
||||
|
||||
/// <summary>
|
||||
/// txtWPQCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWPQCode;
|
||||
|
||||
/// <summary>
|
||||
/// search 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button search;
|
||||
|
||||
/// <summary>
|
||||
/// drpGrooveType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpGrooveType;
|
||||
|
||||
/// <summary>
|
||||
/// drpWeldingRod 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWeldingRod;
|
||||
|
||||
/// <summary>
|
||||
/// drpWeldingWire 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWeldingWire;
|
||||
|
||||
/// <summary>
|
||||
/// txtPreTemperature 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPreTemperature;
|
||||
|
||||
/// <summary>
|
||||
/// txtWpqId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWpqId;
|
||||
|
||||
/// <summary>
|
||||
/// txtIsHotProess 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtIsHotProess;
|
||||
|
||||
/// <summary>
|
||||
/// hdWeldingMethodId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox hdWeldingMethodId;
|
||||
|
||||
/// <summary>
|
||||
/// hdGrooveType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox hdGrooveType;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JoinMarking.aspx.cs" Inherits="FineUIPro.Web.HJGL.JoinMarking.JoinMarking" %>
|
||||
|
||||
<!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><asp:Literal runat="server" Text="焊口标注"/></title>
|
||||
</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="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="300px" Title="焊口标注" ShowBorder="true" Layout="VBox"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
|
||||
|
||||
<Items>
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Height="500px" Title="轴测图" OnNodeCommand="tvControlItem_NodeCommand"
|
||||
runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true" AutoLeafIdentification="true"
|
||||
EnableSingleExpand="true" EnableTextSelection="true">
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel ID="mainPanel" CssClass="centerregion" ShowHeader="false" RegionPosition="Center" ShowBorder="true" BodyPadding="5px"
|
||||
EnableIFrame="true" IFrameName="mainframe" runat="server">
|
||||
</f:Panel>
|
||||
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var leftTreeID = '<%= tvControlItem.ClientID %>';
|
||||
var mainPanelID = '<%= mainPanel.ClientID %>';
|
||||
function selectMenu(menuClassName) {
|
||||
// 选中当前菜单
|
||||
$('#header .topmenu').removeClass('ui-state-active');
|
||||
$('#header .topmenu.' + menuClassName).addClass('ui-state-active');
|
||||
|
||||
// 展开树的第一个节点,并选中第一个节点下的第一个子节点(在右侧IFrame中打开)
|
||||
var tree = F(leftTreeID);
|
||||
var treeFirstChild = tree.getRootNode().children[0];
|
||||
// var treeFirstChild = tree.nodes[0];
|
||||
|
||||
// 展开第一个节点(如果想要展开全部节点,调用 tree.expandAll();)
|
||||
tree.expandNode(treeFirstChild);
|
||||
|
||||
// 选中第一个链接节点,并在右侧IFrame中打开此链接
|
||||
// var treeFirstLink = treeFirstChild.children[0];
|
||||
var treeFirstLink = treeFirstChild;
|
||||
tree.selectNode(treeFirstLink);
|
||||
|
||||
// 在主区域内打开链接
|
||||
F(mainPanelID).setIFrameUrl(treeFirstLink.href);
|
||||
//window.frames['mainframe'].location.href = treeFirstLink.href;
|
||||
|
||||
}
|
||||
|
||||
F.ready(function () {
|
||||
selectMenu('menu-mail');
|
||||
});
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,120 @@
|
||||
using BLL;
|
||||
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
{
|
||||
public partial class JoinMarking : PageBase
|
||||
{
|
||||
|
||||
public string treeNodeId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["treeNodeId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["treeNodeId"] = value;
|
||||
}
|
||||
}
|
||||
private string ISO_ID
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ISO_ID"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ISO_ID"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
ISO_ID = Request.Params["ISO_ID"];
|
||||
|
||||
this.InitTreeMenu();//加载树
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载树装置-单位-工作区
|
||||
/// <summary>
|
||||
/// 加载树
|
||||
/// </summary>
|
||||
private void InitTreeMenu()
|
||||
{
|
||||
this.tvControlItem.Nodes.Clear();
|
||||
var attach = AttachFileService.GetAttachFileByToKeyId(ISO_ID);
|
||||
if (attach != null)
|
||||
{
|
||||
var source = attach.AttachSource;
|
||||
var array = JArray.Parse(source);
|
||||
for (int i = 0; i < array.Count; i++)
|
||||
{
|
||||
JObject item = array[i] as JObject;
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = item.Value<string>("name");
|
||||
newNode.NodeID = item.Value<string>("id");
|
||||
newNode.ToolTip = newNode.Text;
|
||||
newNode.NavigateUrl = "PDFMarking.aspx?ISO_ID=" + ISO_ID + "&FileId=" + newNode.NodeID + "&pdfurl=" + item.Value<string>("folder") + item.Value<string>("savedName");
|
||||
newNode.Target = "mainframe";
|
||||
tvControlItem.Nodes.Add(newNode);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 点击TreeView
|
||||
/// <summary>
|
||||
/// 点击TreeView
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
|
||||
treeNodeId = e.NodeID;
|
||||
// this.BindGrid(e.NodeID);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private bool GetButtonPower(string button)
|
||||
{
|
||||
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_PipelineMenuId, button);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
{
|
||||
|
||||
|
||||
public partial class JoinMarking
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree tvControlItem;
|
||||
|
||||
/// <summary>
|
||||
/// mainPanel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel mainPanel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JointShow.aspx.cs" Inherits="FineUIPro.Web.HJGL.JoinMarking.JointShow" %>
|
||||
|
||||
<!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><asp:Literal runat="server" Text="轴测图"/></title>
|
||||
</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="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="300px" Title="JointShow.aspx" ShowBorder="true" Layout="VBox"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtIsono" runat="server" Label="单线图号" EmptyText="请输入" AutoPostBack="true"
|
||||
OnTextChanged="Tree_TextChanged" Width="250px" LabelWidth="70px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Height="500px" Title="管线" OnNodeCommand="tvControlItem_NodeCommand"
|
||||
runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true"
|
||||
AutoLeafIdentification="true" EnableSingleExpand="true" EnableTextSelection="true"
|
||||
OnNodeExpand="tvControlItem_TreeNodeExpanded">
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel ID="mainPanel" ShowHeader="false" RegionPosition="Center" ShowBorder="true" BodyPadding="5px"
|
||||
EnableIFrame="true" IFrameName="mainframe" runat="server">
|
||||
</f:Panel>
|
||||
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var mainPanelID = '<%= mainPanel.ClientID %>';
|
||||
function selectMenu(menuClassName) {
|
||||
// 在主区域内打开链接
|
||||
F(mainPanelID).setIFrameUrl(href);
|
||||
}
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,171 @@
|
||||
using BLL;
|
||||
using FastReport.Editor;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
{
|
||||
public partial class JointShow : PageBase
|
||||
{
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.InitTreeMenu();//加载树
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Tree_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.InitTreeMenu();
|
||||
|
||||
}
|
||||
#region 加载树装置-单位-工作区
|
||||
|
||||
/// <summary>
|
||||
/// 加载树
|
||||
/// </summary>
|
||||
private void InitTreeMenu()
|
||||
{
|
||||
this.tvControlItem.Nodes.Clear();
|
||||
TreeNode rootNode = new TreeNode();
|
||||
rootNode.Text = "管线列表";
|
||||
rootNode.NodeID = "0";
|
||||
rootNode.Expanded = true;
|
||||
this.tvControlItem.Nodes.Add(rootNode);
|
||||
var iso = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
if (!string.IsNullOrEmpty(this.txtIsono.Text))
|
||||
{
|
||||
iso = iso.Where(e => e.PipelineCode.Contains(this.txtIsono.Text.Trim()));
|
||||
}
|
||||
iso = iso.OrderBy(x => x.PipelineCode);
|
||||
if (iso.Count() > 0)
|
||||
{
|
||||
foreach (var q in iso)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.NodeID = q.PipelineId;
|
||||
newNode.Text = q.PipelineCode;
|
||||
newNode.ToolTip = "管线";
|
||||
newNode.EnableClickEvent = true;
|
||||
newNode.EnableExpandEvent = true;
|
||||
rootNode.Nodes.Add(newNode);
|
||||
TreeNode newNodeTemp = new TreeNode();
|
||||
newNodeTemp.Text = "加载中...";
|
||||
newNodeTemp.NodeID = Guid.NewGuid().ToString();
|
||||
newNode.Nodes.Add(newNodeTemp);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 绑定树节点
|
||||
/// <summary>
|
||||
/// 绑定树节点
|
||||
/// </summary>
|
||||
/// <param name="node"></param>
|
||||
#endregion
|
||||
|
||||
#region 树展开事件
|
||||
/// <summary>
|
||||
/// 树展开事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
||||
{
|
||||
|
||||
e.Node.Nodes.Clear();
|
||||
if (e.Node.ToolTip == "管线")
|
||||
{
|
||||
e.Node.Nodes.Clear();
|
||||
var attach = AttachFileService.GetAttachFile(e.Node.NodeID, BLL.Const.HJGL_PipelineMenuId);
|
||||
if (attach != null)
|
||||
{
|
||||
var source = attach.AttachSource;
|
||||
var array = JArray.Parse(source);
|
||||
for (int i = 0; i < array.Count; i++)
|
||||
{
|
||||
JObject item = array[i] as JObject;
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = item.Value<string>("name");
|
||||
newNode.NodeID = item.Value<string>("id");
|
||||
newNode.ToolTip = newNode.Text;
|
||||
newNode.NavigateUrl = "PDFShow.aspx?ISO_ID=" + e.Node.NodeID + "&FileId=" + newNode.NodeID + "&pdfurl=" + item.Value<string>("folder") + item.Value<string>("savedName");
|
||||
newNode.Target = "mainframe";
|
||||
e.Node.Nodes.Add(newNode);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 点击TreeView
|
||||
/// <summary>
|
||||
/// 点击TreeView
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
{
|
||||
|
||||
|
||||
public partial class JointShow
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// txtIsono 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtIsono;
|
||||
|
||||
/// <summary>
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree tvControlItem;
|
||||
|
||||
/// <summary>
|
||||
/// mainPanel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel mainPanel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PDFMarking.aspx.cs" Inherits="FineUIPro.Web.HJGL.JoinMarking.PDFMarking" %>
|
||||
|
||||
<!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>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<%-- <script type="module" crossorigin="" src="./assets/main-DE8eQLmE.js"></script>
|
||||
<link rel="modulepreload" crossorigin="" href="./assets/pdf-lib-D5zKcp81.js">
|
||||
<link rel="modulepreload" crossorigin="" href="./assets/pdfjs-HfNT2Y4W.js">
|
||||
<link rel="modulepreload" crossorigin="" href="./assets/styles-Bno-H3Kc.js">
|
||||
<link rel="stylesheet" crossorigin="" href="./assets/styles-CDHjsf7D.css">
|
||||
<link rel="stylesheet" crossorigin="" href="./assets/main-DSskaVYi.css">--%>
|
||||
|
||||
|
||||
<script type="module" crossorigin src="./assets/main-BUyRx63y.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="./assets/pdf-lib-AfLQbX6n.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/pdfjs-DXqArq6h.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/styles-BZJ2tAi6.js">
|
||||
<link rel="stylesheet" crossorigin href="./assets/styles-DNToM_5G.css">
|
||||
<link rel="stylesheet" crossorigin href="./assets/main-C8AfvBIm.css">
|
||||
|
||||
<style type="text/css">
|
||||
.f-grid-row.red {
|
||||
background-color: LightCoral;
|
||||
}
|
||||
|
||||
.Label {
|
||||
font-size: larger;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<input id="hdpdfurl" type="hidden" value="<%=URL %>"/>
|
||||
<input id="hdjoinInfo" type="hidden" runat="server"/>
|
||||
<input id="hdworkRecord" type="hidden" runat="server"/>
|
||||
<input id="imgurl1" type="hidden" value="">
|
||||
<input id="imgurl2"type="hidden" value="">
|
||||
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Toolbars >
|
||||
<f:Toolbar runat="server" Position="Bottom" ToolbarAlign="Right" >
|
||||
<Items>
|
||||
<f:Button ID="btnNext" runat="server" Text="下一步" OnClick="btnNext_Click"></f:Button>
|
||||
<f:Button ID="btnClear" runat="server" Text="清空临时数据" Hidden="true" OnClick="btnClear_Click"></f:Button>
|
||||
<f:Button ID="btnImport" runat="server" Text="导入数据库" Hidden="true" OnClick="btnSave_Click"></f:Button>
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:ContentPanel ID="contentPanel" runat="server">
|
||||
<div id="app"></div>
|
||||
</f:ContentPanel>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊口标注" EnableCollapse="true" Hidden="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="WeldJointId" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableColumnLines="true" ClicksToEdit="2" DataIDField="TempId" AllowSorting="true"
|
||||
SortField="WeldJointCode" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
|
||||
Width="60px" HeaderTextAlign="Center" TextAlign="Center" ColumnID="tfNumber" />
|
||||
<f:RenderField HeaderText="焊口号" ColumnID="WeldJointCode" DataField="WeldJointCode" SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="180px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊口属性" ColumnID="JointAttribute" DataField="JointAttribute" SortField="JointAttribute" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:TemplateField Width="130px" HeaderText="材质1" HeaderTextAlign="Center"
|
||||
TextAlign="Center" SortField="Material1Id">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# ConvertMaterial(Eval("Material1Id")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
<f:TemplateField Width="130px" HeaderText="材质2" HeaderTextAlign="Center"
|
||||
TextAlign="Center" SortField="Material2Id">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# ConvertMaterial(Eval("Material2Id")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
<f:RenderField HeaderText="达因" ColumnID="Size" DataField="Size"
|
||||
SortField="Size" FieldType="Double" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="外径" ColumnID="Dia"
|
||||
DataField="Dia" SortField="Dia" FieldType="Double" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="DN公称直径" ColumnID="DNDia"
|
||||
DataField="DNDia" SortField="DNDia" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="壁厚" ColumnID="Thickness"
|
||||
DataField="Thickness" SortField="Thickness" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="规格" ColumnID="Specification"
|
||||
DataField="Specification" SortField="Specification" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px">
|
||||
</f:RenderField>
|
||||
|
||||
|
||||
<f:TemplateField Width="130px" HeaderText="焊缝类型" HeaderTextAlign="Center"
|
||||
TextAlign="Center" SortField="WeldTypeId">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# ConvertWeldType(Eval("WeldTypeId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
<f:RenderField HeaderText="备注" ColumnID="Remark" DataField="Remark"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊点坐标" ColumnID="WeldJointPoint" DataField="WeldJointPoint"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
<f:Window ID="Window1" Title="数据信息" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Top" EnableResize="true" runat="server" OnClose="Window1_Close"
|
||||
IsModal="true" Width="1200px" Height="600px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" ClientIDMode="Static" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||
runat="server" Text="编辑" Icon="TableEdit">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,319 @@
|
||||
using BLL;
|
||||
using BLL.Common;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NPOI.POIFS.Properties;
|
||||
using Org.BouncyCastle.Asn1.Tsp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
{
|
||||
public partial class PDFMarking : PageBase
|
||||
{
|
||||
public List<Model.HJGL_WeldJoint> WeldJointlist
|
||||
{
|
||||
get
|
||||
{
|
||||
return (List<Model.HJGL_WeldJoint>)ViewState["ISO_ID"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ISO_ID"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string ISO_ID
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ISO_ID"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ISO_ID"] = value;
|
||||
}
|
||||
}
|
||||
private string FileId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["FileId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["FileId"] = value;
|
||||
}
|
||||
}
|
||||
public string URL
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["URL"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["URL"] = value;
|
||||
}
|
||||
}
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 是否PDMS
|
||||
/// </summary>
|
||||
private string IsPDMS
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["IsPDMS"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["IsPDMS"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
ISO_ID = Request.Params["ISO_ID"];
|
||||
FileId = Request.Params["FileId"];
|
||||
URL = Funs.SGGLUrl + Request.Params["pdfurl"];
|
||||
this.IsPDMS = "0";
|
||||
WeldJointlist = new List<Model.HJGL_WeldJoint>();
|
||||
|
||||
}
|
||||
}
|
||||
#region 绑定数据
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
|
||||
Grid1.RecordCount = WeldJointlist.Count;
|
||||
Grid1.DataSource = WeldJointlist;
|
||||
Grid1.DataBind();
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region 双击事件
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_DataInMenuId, Const.BtnIn))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataInEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导入信息 维护
|
||||
/// <summary>
|
||||
/// 导入信息编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_DataInMenuId, BLL.Const.BtnIn))
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataInEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_DataInMenuId, Const.BtnIn))
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var WeldJoint = WeldJointlist.FirstOrDefault(x => x.WeldJointId == rowID);
|
||||
WeldJointlist.Remove(WeldJoint);
|
||||
}
|
||||
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
this.BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 分页 排序
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 保存审核事件
|
||||
/// <summary>
|
||||
/// 保存审核事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnSaveMethod(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, this.IsPDMS);
|
||||
|
||||
this.BindGrid();
|
||||
|
||||
}
|
||||
protected void btnRefresh_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
protected void btnSaveMethod(string LoginProjectId, string UserId, string IsPDMS)
|
||||
{
|
||||
//beginProgress();
|
||||
Funs.DB.HJGL_WeldJoint.InsertAllOnSubmit(WeldJointlist);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void btnNext_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnImport.Hidden = false;
|
||||
Grid1.Hidden = false;
|
||||
contentPanel.Hidden = true;
|
||||
btnNext.Hidden = true;
|
||||
btnClear.Hidden = false;
|
||||
var json = hdworkRecord.Value;
|
||||
if (json != "{}")
|
||||
{
|
||||
var jsonObc = JObject.Parse(json);
|
||||
var jsonArray = jsonObc.Value<JObject>("annotations").Value<JArray>("1");
|
||||
var iso = Funs.DB.HJGL_Pipeline.FirstOrDefault(x => x.PipelineId == ISO_ID);
|
||||
if (iso != null)
|
||||
{
|
||||
var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId == iso.UnitId);
|
||||
|
||||
WeldJointlist = new List<Model.HJGL_WeldJoint>();
|
||||
for (int i = 0; i < jsonArray.Count; i++)
|
||||
{
|
||||
JObject item = jsonArray[i] as JObject;
|
||||
|
||||
Model.HJGL_WeldJoint newDataInTemp = new Model.HJGL_WeldJoint();
|
||||
newDataInTemp.WeldJointId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldJoint));
|
||||
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDataInTemp.PipelineId = iso.PipelineId;
|
||||
newDataInTemp.PipelineCode = iso.PipelineCode;
|
||||
newDataInTemp.WeldJointCode = item.Value<string>("label");
|
||||
newDataInTemp.X = item.Value<string>("x");
|
||||
newDataInTemp.Y = item.Value<string>("y");
|
||||
newDataInTemp.X2 = item.Value<string>("x2");
|
||||
newDataInTemp.Y2 = item.Value<string>("y2");
|
||||
newDataInTemp.WeldingMode = "手动";
|
||||
WeldJointlist.Add(newDataInTemp);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
BindGrid();
|
||||
}
|
||||
public static string ConvertMaterial(object MaterialId)
|
||||
{
|
||||
if (MaterialId != null)
|
||||
{
|
||||
var material = Funs.DB.Base_Material.FirstOrDefault(x => x.MaterialId == MaterialId.ToString());
|
||||
if (material != null)
|
||||
{
|
||||
return material.MaterialCode;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static string ConvertWeldType(object WeldTypeId)
|
||||
{
|
||||
if (WeldTypeId != null)
|
||||
{
|
||||
var weldType = Funs.DB.Base_WeldType.FirstOrDefault(x => x.WeldTypeId == WeldTypeId.ToString());
|
||||
if (weldType != null)
|
||||
{
|
||||
return weldType.WeldTypeCode;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
protected void btnClear_Click(object sender, EventArgs e)
|
||||
{ ////先删除临时表中 该人员以前导入的数据
|
||||
WeldJointlist.Clear();
|
||||
this.BindGrid();
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
{
|
||||
|
||||
|
||||
public partial class PDFMarking
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// hdjoinInfo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdjoinInfo;
|
||||
|
||||
/// <summary>
|
||||
/// hdworkRecord 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdworkRecord;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// btnNext 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNext;
|
||||
|
||||
/// <summary>
|
||||
/// btnClear 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClear;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// contentPanel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel contentPanel;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// Label4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label4;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PDFShow.aspx.cs" Inherits="FineUIPro.Web.HJGL.JoinMarking.PDFShow" %>
|
||||
|
||||
<!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>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script type="module" crossorigin="" src="./assets/viewer-Dla4Cfl-.js"></script>
|
||||
<link rel="modulepreload" crossorigin="" href="./assets/pdf-lib-D5zKcp81.js">
|
||||
<link rel="modulepreload" crossorigin="" href="./assets/pdfjs-HfNT2Y4W.js">
|
||||
<link rel="modulepreload" crossorigin="" href="./assets/styles-Bno-H3Kc.js">
|
||||
<link rel="stylesheet" crossorigin="" href="./assets/styles-CDHjsf7D.css">
|
||||
<link rel="stylesheet" crossorigin="" href="./assets/viewer-BilNgxa5.css">
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<input id="hdpdfurl" type="hidden" value="<%=URL %>"/>
|
||||
<input id="annotionData" type="hidden" value='<%=JointData %>'/>
|
||||
<input id="hdworkRecord" type="hidden" runat="server"/>
|
||||
<input id="imgurl2" type="hidden" runat="server"/>
|
||||
<input id="imgurl1" type="hidden" runat="server"/>
|
||||
<input id="orgname" type="hidden" value="<%=UnitName %>">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:ContentPanel ID="contentPanel" runat="server">
|
||||
<div id="app"></div>
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,191 @@
|
||||
using BLL;
|
||||
using BLL.Common;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
{
|
||||
public partial class PDFShow : PageBase
|
||||
{
|
||||
private string ISO_ID
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ISO_ID"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ISO_ID"] = value;
|
||||
}
|
||||
}
|
||||
private string FileId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["FileId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["FileId"] = value;
|
||||
}
|
||||
}
|
||||
public string UnitName
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["UnitName"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["UnitName"] = value;
|
||||
}
|
||||
}
|
||||
public string URL
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["URL"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["URL"] = value;
|
||||
}
|
||||
}
|
||||
public string JointData
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["JointData"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["JointData"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
ISO_ID = Request.Params["ISO_ID"];
|
||||
FileId = Request.Params["FileId"];
|
||||
URL = Funs.SGGLUrl + Request.Params["pdfurl"];
|
||||
|
||||
var iso = Funs.DB.HJGL_Pipeline.FirstOrDefault(x => x.PipelineId == ISO_ID);
|
||||
if (iso != null)
|
||||
{
|
||||
UnitName = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId == iso.UnitId)?.UnitName;
|
||||
}
|
||||
|
||||
var jotids = Funs.DB.HJGL_WeldJoint.Where(x => x.PipelineId == ISO_ID && x.AttachSourceId == FileId).Select(x => x.WeldJointId).ToList();
|
||||
|
||||
string sqlData = @"select a.WeldJointId JOT_ID ,a.WeldJointCode JOT_JointNo,c.WelderCode WED_Code,a.WeldingLocationId JOT_Location,b.WeldingDate JOT_WeldDate ,'/' DetectionTypeCode ,'/' IsRepair,'/' IsHotProcess,x,y,x2,y2
|
||||
,(case PointState
|
||||
when '100' then '正常'
|
||||
when '102' then '扩透'
|
||||
when '101' then '点口'
|
||||
when '104' then '已切除' end) as JOT_JointStatus from HJGL_WeldJoint a
|
||||
left join HJGL_WeldingDaily b on a.WeldingDailyId=b.WeldingDailyId
|
||||
left join SitePerson_Person AS c ON a.BackingWelderId = c.SitePersonId
|
||||
LEFT JOIN dbo.HJGL_Batch_PointBatchItem pointItem ON pointItem.WeldJointId = a.WeldJointId
|
||||
WHERE a.ProjectId = @ProjectId and a.WeldJointId in ('" + string.Join("','", jotids) + "') ";
|
||||
SqlParameter[] parameter1 = new SqlParameter[] { new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId) };
|
||||
DataTable tb1 = SQLHelper.GetDataTableRunText(sqlData, parameter1);
|
||||
|
||||
string sqlTrust = @"select a.JOT_ID, c.DetectionTypeCode,b.CH_TrustType from CH_TrustItem AS a
|
||||
LEFT JOIN CH_Trust AS b ON a.CH_TrustID = b.CH_TrustID
|
||||
left join Base_DetectionType c on b.CH_NDTMethod = c.DetectionTypeId
|
||||
where a.JOT_ID in ('" + string.Join("','", jotids) + "') ";
|
||||
DataTable tbTrust = SQLHelper.GetDataTableRunText(sqlTrust, null);
|
||||
Dictionary<string, string> DetectionTypeDic = new Dictionary<string, string>();
|
||||
Dictionary<string, string> TrustTypeDic = new Dictionary<string, string>();
|
||||
if (tbTrust != null)
|
||||
{
|
||||
foreach (DataRow row in tbTrust.Rows)
|
||||
{
|
||||
string JOT_ID = row["JOT_ID"].ToString();
|
||||
string DetectionTypeCode = row["DetectionTypeCode"].ToString();
|
||||
string CH_TrustType = row["CH_TrustType"].ToString();
|
||||
if (!DetectionTypeDic.ContainsKey(JOT_ID))
|
||||
{
|
||||
DetectionTypeDic.Add(JOT_ID, DetectionTypeCode);
|
||||
}
|
||||
|
||||
if (!TrustTypeDic.ContainsKey(JOT_ID)&& CH_TrustType=="2")
|
||||
{
|
||||
TrustTypeDic.Add(JOT_ID, CH_TrustType);
|
||||
}
|
||||
}
|
||||
}
|
||||
string sqlCheck = @"
|
||||
select HotProessTrustId ,WeldJointId from HJGL_HotProess_TrustItem
|
||||
where WeldJointId in ('" + string.Join("','", jotids) + "') ";
|
||||
DataTable tbCheck = SQLHelper.GetDataTableRunText(sqlCheck, null);
|
||||
Dictionary<string, string> HotProessDic = new Dictionary<string, string>();
|
||||
if (tbCheck != null)
|
||||
{
|
||||
foreach (DataRow row in tbTrust.Rows)
|
||||
{
|
||||
string WeldJointId = row["WeldJointId"].ToString();
|
||||
string HotProessTrustId = row["HotProessTrustId"].ToString();
|
||||
if(!HotProessDic.ContainsKey(WeldJointId))
|
||||
{
|
||||
HotProessDic.Add(WeldJointId, HotProessTrustId);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tb1 != null)
|
||||
{
|
||||
foreach (DataRow row in tb1.Rows)
|
||||
{
|
||||
string JOT_ID = row["JOT_ID"].ToString();
|
||||
if (DetectionTypeDic.ContainsKey(JOT_ID))
|
||||
{
|
||||
row["DetectionTypeCode"] = DetectionTypeDic[JOT_ID];
|
||||
}
|
||||
else
|
||||
{
|
||||
row["DetectionTypeCode"] = "/";
|
||||
}
|
||||
if (TrustTypeDic.ContainsKey(JOT_ID))
|
||||
{
|
||||
row["IsRepair"] = "是";
|
||||
}
|
||||
else
|
||||
{
|
||||
row["IsRepair"] = "/";
|
||||
}
|
||||
if (HotProessDic.ContainsKey(JOT_ID))
|
||||
{
|
||||
row["IsHotProcess"] ="是";
|
||||
}
|
||||
else
|
||||
{
|
||||
row["IsHotProcess"] = "/";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
JointData = JsonConvert.SerializeObject(tb1);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
{
|
||||
|
||||
|
||||
public partial class PDFShow
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// hdworkRecord 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdworkRecord;
|
||||
|
||||
/// <summary>
|
||||
/// imgurl2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden imgurl2;
|
||||
|
||||
/// <summary>
|
||||
/// imgurl1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden imgurl1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// contentPanel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel contentPanel;
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
.menu-item[data-v-2bf4f503]:hover{background-color:#f3f4f6!important}.annotation-detail-panel[data-v-2bf4f503]{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;margin-bottom:16px;overflow:hidden}.panel-header[data-v-2bf4f503]{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;background:#334155;color:#fff}.close-btn[data-v-2bf4f503]{background:transparent;border:none;color:#fff;font-size:18px;cursor:pointer;padding:0 4px;line-height:1}.close-btn[data-v-2bf4f503]:hover{color:#fca5a5}.detail-content[data-v-2bf4f503]{padding:12px}.detail-row[data-v-2bf4f503]{display:flex;align-items:center;gap:8px;margin-bottom:10px}.detail-row label[data-v-2bf4f503]{min-width:70px;font-size:12px;color:#64748b}.detail-row.readonly[data-v-2bf4f503]{color:#94a3b8;font-size:12px}.detail-row.readonly span[data-v-2bf4f503]{color:#475569}.label-preview[data-v-2bf4f503]{flex:1;padding:6px 10px;background:#1e293b;color:#f1f5f9;border-radius:4px;font-family:monospace;font-size:13px;text-align:center}.detail-input[data-v-2bf4f503]{flex:1;padding:6px 8px;border:1px solid #d1d5db;border-radius:4px;font-size:12px}.detail-input[data-v-2bf4f503]:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f633}.detail-textarea[data-v-2bf4f503]{flex:1;padding:6px 8px;border:1px solid #d1d5db;border-radius:4px;font-size:12px;min-height:60px;resize:vertical;font-family:inherit}.detail-textarea[data-v-2bf4f503]:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f633}.detail-divider[data-v-2bf4f503]{height:1px;background:#e2e8f0;margin:12px 0}.detail-actions[data-v-2bf4f503]{display:flex;gap:8px;margin-top:12px}.detail-actions .btn-primary[data-v-2bf4f503]{flex:1;padding:8px;background:#3b82f6;color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:12px}.detail-actions .btn-primary[data-v-2bf4f503]:hover{background:#2563eb}.detail-actions .btn-danger[data-v-2bf4f503]{padding:8px 12px;background:#fee2e2;color:#dc2626;border:1px solid #fecaca;border-radius:4px;cursor:pointer;font-size:12px}.detail-actions .btn-danger[data-v-2bf4f503]:hover{background:#fecaca}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
.viewer-container[data-v-0899ee83]{display:flex;height:100vh;padding:12px;box-sizing:border-box}.viewer-main[data-v-0899ee83]{flex:1;display:flex;flex-direction:column;border:1px solid var(--border);border-radius:10px;background:var(--panel);box-shadow:0 10px 30px -18px #00000059;padding:8px;box-sizing:border-box}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -178,6 +178,10 @@
|
||||
FieldType="String" HeaderText="备注" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:WindowField TextAlign="Left" Width="90px" WindowID="Window4" HeaderText="焊口标注"
|
||||
Text="焊口标注" ToolTip="焊口标注"
|
||||
DataIFrameUrlFields="ISO_ID" DataIFrameUrlFormatString="../JoinMarking/JoinMarking.aspx?ISO_ID={0}"
|
||||
HeaderTextAlign="Center" />
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
|
||||
Reference in New Issue
Block a user