11
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
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"
|
||||
<f:TextBox ID="txtSpecification" Label="规格" runat="server"
|
||||
LabelWidth="100px" ShowRedStar="true" Required="true" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpWeldTypeCode" Label="焊缝类型"
|
||||
|
||||
@@ -81,26 +81,15 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
this.txtWeldJointCode.Text = joint.WeldJointCode;
|
||||
|
||||
if (!string.IsNullOrEmpty(joint.Material1Id))
|
||||
{
|
||||
this.drpMaterial1.SelectedValue = joint.Material1Id;
|
||||
@@ -166,14 +155,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
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;
|
||||
@@ -181,35 +163,12 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
{
|
||||
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 (!string.IsNullOrEmpty(isTwoJoint))
|
||||
{
|
||||
//string perfix = txtPipelineCode.Text + "/Z-";
|
||||
string perfix = pipeline.PipelineCode + "/";
|
||||
this.txtWeldJointCode.Text = perfix;
|
||||
|
||||
// txtWeldJointCode.Text = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_WeldJoint", "WeldJointCode", this.CurrUser.LoginProjectId, perfix);
|
||||
|
||||
// txtWeldJointCode.Text = txtWeldJointCode.Text.Replace(perfix, "");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -234,8 +193,6 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
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, "维护 - ")));
|
||||
}
|
||||
@@ -249,23 +206,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
{
|
||||
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))
|
||||
{
|
||||
@@ -282,7 +223,6 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
/// </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.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("页面必填项不能为空", MessageBoxIcon.Warning);
|
||||
@@ -294,24 +234,10 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
joint.PipelineId = this.PipelineId;
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
joint.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</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"
|
||||
EnableColumnLines="true" ClicksToEdit="2" DataIDField="WeldJointId" AllowSorting="true"
|
||||
SortField="WeldJointCode" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Columns>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BLL;
|
||||
using BLL.Common;
|
||||
using FineUIPro.Web.HJGL.WeldingManage;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NPOI.POIFS.Properties;
|
||||
using Org.BouncyCastle.Asn1.Tsp;
|
||||
@@ -16,17 +17,8 @@ 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;
|
||||
}
|
||||
}
|
||||
public static Dictionary<string, List<Model.HJGL_WeldJoint>> WeldJointlist = new Dictionary<string, List<Model.HJGL_WeldJoint>>();
|
||||
|
||||
|
||||
private string ISO_ID
|
||||
{
|
||||
@@ -86,7 +78,15 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
FileId = Request.Params["FileId"];
|
||||
URL = Funs.SGGLUrl + Request.Params["pdfurl"];
|
||||
this.IsPDMS = "0";
|
||||
WeldJointlist = new List<Model.HJGL_WeldJoint>();
|
||||
if (!WeldJointlist.ContainsKey(CurrUser.PersonId))
|
||||
{
|
||||
WeldJointlist.Add(CurrUser.PersonId, new List<Model.HJGL_WeldJoint>());
|
||||
}
|
||||
else
|
||||
{
|
||||
WeldJointlist[ CurrUser.PersonId]= new List<Model.HJGL_WeldJoint>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -96,10 +96,17 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
|
||||
Grid1.RecordCount = WeldJointlist.Count;
|
||||
Grid1.DataSource = WeldJointlist;
|
||||
Grid1.DataBind();
|
||||
if (!WeldJointlist.ContainsKey(CurrUser.PersonId))
|
||||
{
|
||||
Grid1.RecordCount = WeldJointlist[CurrUser.PersonId].Count;
|
||||
Grid1.DataSource = WeldJointlist[CurrUser.PersonId];
|
||||
}
|
||||
else
|
||||
{
|
||||
Grid1.RecordCount = 0;
|
||||
Grid1.DataSource = null;
|
||||
}
|
||||
Grid1.DataBind();
|
||||
|
||||
}
|
||||
#endregion
|
||||
@@ -118,7 +125,9 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
}
|
||||
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, "维护 - ")));
|
||||
DataInEdit.dic[Grid1.SelectedRowID] = WeldJointlist[CurrUser.PersonId].FirstOrDefault(x => x.WeldJointId == Grid1.SelectedRowID);
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataInEdit.aspx?WeldJointId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -142,7 +151,8 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
Alert.ShowInTop("请选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataInEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
DataInEdit.dic[Grid1.SelectedRowID] = WeldJointlist[CurrUser.PersonId].FirstOrDefault(x=>x.WeldJointId == Grid1.SelectedRowID);
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataInEdit.aspx?WeldJointId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -168,8 +178,8 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var WeldJoint = WeldJointlist.FirstOrDefault(x => x.WeldJointId == rowID);
|
||||
WeldJointlist.Remove(WeldJoint);
|
||||
var WeldJoint = WeldJointlist[CurrUser.PersonId].FirstOrDefault(x => x.WeldJointId == rowID);
|
||||
WeldJointlist[CurrUser.PersonId].Remove(WeldJoint);
|
||||
}
|
||||
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
@@ -229,8 +239,9 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
protected void btnSaveMethod(string LoginProjectId, string UserId, string IsPDMS)
|
||||
{
|
||||
//beginProgress();
|
||||
Funs.DB.HJGL_WeldJoint.InsertAllOnSubmit(WeldJointlist);
|
||||
Funs.DB.HJGL_WeldJoint.InsertAllOnSubmit(WeldJointlist[CurrUser.PersonId]);
|
||||
Funs.DB.SubmitChanges();
|
||||
WeldJointlist.Remove(CurrUser.PersonId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -254,8 +265,8 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
if (iso != null)
|
||||
{
|
||||
var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId == iso.UnitId);
|
||||
|
||||
WeldJointlist = new List<Model.HJGL_WeldJoint>();
|
||||
|
||||
WeldJointlist[CurrUser.PersonId] = new List<Model.HJGL_WeldJoint>();
|
||||
for (int i = 0; i < jsonArray.Count; i++)
|
||||
{
|
||||
JObject item = jsonArray[i] as JObject;
|
||||
@@ -272,7 +283,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
newDataInTemp.Y2 = item.Value<string>("y2");
|
||||
newDataInTemp.AttachSourceId = FileId;
|
||||
newDataInTemp.WeldingMode = "手动";
|
||||
WeldJointlist.Add(newDataInTemp);
|
||||
WeldJointlist[CurrUser.PersonId].Add(newDataInTemp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user