11
This commit is contained in:
@@ -145,17 +145,11 @@
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
|
||||
FieldType="String" TextAlign="Left" Width="150px">
|
||||
<Editor>
|
||||
<f:TextBox ID="tbxEditorQualityNo" Required="true" runat="server">
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
|
||||
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px">
|
||||
<Editor>
|
||||
<f:TextBox ID="txtEditorAcceptance" Required="true" runat="server">
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
|
||||
@@ -309,7 +309,7 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify(Resources.Lan.PleaseSelectModifyHotProessTrust, MessageBoxIcon.Warning);
|
||||
ShowNotify("请选择要处理的PMI委托", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -335,7 +335,8 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
//删除主表数据
|
||||
Funs.DB.PMI_Delegation.DeleteOnSubmit(trustManage);
|
||||
//删除 明细表
|
||||
|
||||
var details = Funs.DB.PMI_DelegationDetails.Where(t => t.PMIId == trustManage.Id).ToList();
|
||||
Funs.DB.PMI_DelegationDetails.DeleteAllOnSubmit(details);
|
||||
Funs.DB.SubmitChanges();
|
||||
Alert.ShowInTop(Resources.Lan.DeletedSuccessfully, MessageBoxIcon.Success);
|
||||
this.InitTreeMenu();
|
||||
|
||||
@@ -257,24 +257,6 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
||||
|
||||
/// <summary>
|
||||
/// tbxEditorQualityNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox tbxEditorQualityNo;
|
||||
|
||||
/// <summary>
|
||||
/// txtEditorAcceptance 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtEditorAcceptance;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.common.BaseInfo;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using NPOI.SS.Formula.PTG;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -159,16 +162,23 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
{
|
||||
weldJointIds = hdItemsString.Text.Substring(0, hdItemsString.Text.LastIndexOf('|'));
|
||||
|
||||
List<Model.View_PMI_DelegationDetails> lists = BLL.PMIDelegation_Service.GetPMI_DelegationAddItem(weldJointIds);
|
||||
var lists = GetGridDataTable(weldJointIds);
|
||||
this.BindGrid(lists);
|
||||
//获取单位
|
||||
string unitCode = Funs.DB.Base_Unit.FirstOrDefault(t => t.UnitId == drpUnitId.SelectedValue)?.UnitCode;
|
||||
//获取区域code
|
||||
var workdAreaIdList = lists.Select(t => t.WorkAreaId).ToList();
|
||||
if (string.IsNullOrEmpty(this.txtDelegationNo.Text))
|
||||
{
|
||||
//获取单位
|
||||
string unitCode = Funs.DB.Base_Unit.FirstOrDefault(t => t.UnitId == drpUnitId.SelectedValue)?.UnitCode;
|
||||
//获取区域code
|
||||
var workdAreaIdList = lists.Select(t => t.WorkAreaId).ToList();
|
||||
|
||||
var workAreaCode = Funs.DB.Project_WorkArea.AsQueryable().Where(t => workdAreaIdList.Contains(t.WorkAreaId)).Distinct().FirstOrDefault()?.WorkAreaCode;
|
||||
var workAreaCode = Funs.DB.Project_WorkArea.AsQueryable().Where(t => workdAreaIdList.Contains(t.WorkAreaId)).Distinct().FirstOrDefault()?.WorkAreaCode;
|
||||
|
||||
string perfix = string.Empty;
|
||||
perfix = $"PMI-{unitCode}-{workAreaCode}-PI-";
|
||||
this.txtDelegationNo.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode", "dbo.PMI_Delegation", "DelegationNo", this.CurrUser.LoginProjectId, perfix);
|
||||
|
||||
}
|
||||
|
||||
this.txtDelegationNo.Text = $"PMI-{unitCode}-{workAreaCode}-PI-";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -270,7 +280,59 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取Grid里面的数据返回集合
|
||||
private List<View_PMI_DelegationDetails> GetGridDataTable(string weldJointIds)
|
||||
{
|
||||
string[] arr = weldJointIds.Split('|');
|
||||
JArray mergedData = Grid1.GetMergedData();
|
||||
var result = Funs.DB.View_Pipeline_WeldJoint.Select(t => new View_PMI_DelegationDetails {
|
||||
WeldJointId= t.WeldJointId,
|
||||
PipelineCode= t.PipelineCode,
|
||||
ProjectId= t.ProjectId,
|
||||
Acceptance="",
|
||||
QualityNo="",
|
||||
WeldJointCode=t.WeldJointCode,
|
||||
Specification=t.Specification,
|
||||
MaterialCode=t.MaterialCode,
|
||||
WorkAreaId=t.WorkAreaId,
|
||||
Status=0,
|
||||
PMIId=this.PMIDelegationId
|
||||
}).Where(t => arr.Contains(t.WeldJointId)).ToList();
|
||||
result.ForEach(item =>
|
||||
{
|
||||
item.Id = SQLHelper.GetNewID(typeof(PMI_DelegationDetails));
|
||||
});
|
||||
if (mergedData.Count == 0)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (JObject mergedRow in mergedData)
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
Model.View_PMI_DelegationDetails newTrustItem = new Model.View_PMI_DelegationDetails();
|
||||
newTrustItem.Id = values.Value<string>("Id").ToString();
|
||||
newTrustItem.PipelineCode = values.Value<string>("PipelineCode").ToString();
|
||||
newTrustItem.WeldJointId = values.Value<string>("WeldJointId").ToString();
|
||||
newTrustItem.Acceptance = values.Value<string>("Acceptance").ToString();
|
||||
newTrustItem.QualityNo = values.Value<string>("QualityNo").ToString();
|
||||
newTrustItem.WeldJointCode = values.Value<string>("WeldJointCode").ToString();
|
||||
newTrustItem.Specification =HttpUtility.HtmlDecode(values.Value<string>("Specification").ToString());
|
||||
newTrustItem.MaterialCode = values.Value<string>("MaterialCode").ToString();
|
||||
newTrustItem.Status = 0;
|
||||
newTrustItem.PMIId = this.PMIDelegationId;
|
||||
result.Add(newTrustItem);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 收集Grid页面信息,提交明细
|
||||
|
||||
/// <summary>
|
||||
/// 收集Grid页面信息,提交明细
|
||||
/// </summary>
|
||||
@@ -309,28 +371,19 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
{
|
||||
this.hdItemsString.Text = this.hdItemsString.Text.Substring(0, this.hdItemsString.Text.LastIndexOf('|'));
|
||||
}
|
||||
var trust = Funs.DB.PMI_Delegation.FirstOrDefault(t=>t.Id==this.PMIDelegationId);
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
List<Model.View_PMI_DelegationDetails> GetHotProessTrustItem = new List<Model.View_PMI_DelegationDetails>();
|
||||
if (!string.IsNullOrEmpty(this.hdItemsString.Text))
|
||||
{
|
||||
GetHotProessTrustItem = BLL.PMIDelegation_Service.GetPMI_DelegationAddItem(this.hdItemsString.Text);
|
||||
}
|
||||
else if (string.IsNullOrEmpty(this.hdItemsString.Text) && this.PMIDelegationId != null)
|
||||
{
|
||||
GetHotProessTrustItem = BLL.PMIDelegation_Service.GetPMI_DelegationItem(this.CurrUser.LoginProjectId, this.PMIDelegationId);
|
||||
}
|
||||
var listData = GetGridDataTable("");
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var item = GetHotProessTrustItem.FirstOrDefault(x => x.WeldJointId == rowID);
|
||||
var item = listData.FirstOrDefault(x => x.WeldJointId == rowID);
|
||||
if (item != null)
|
||||
{
|
||||
GetHotProessTrustItem.Remove(item);
|
||||
listData.Remove(item);
|
||||
}
|
||||
}
|
||||
BindGrid(GetHotProessTrustItem);
|
||||
BindGrid(listData);
|
||||
ShowNotify(Resources.Lan.DeletedSuccessfully, MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
</f:Form>
|
||||
</Items>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="<%$ Resources:Lan,HotProessTrust %>"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ID"
|
||||
AllowCellEditing="true" AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2"
|
||||
DataIDField="ID" AllowSorting="true" SortField="PipelineCode,WeldJointCode"
|
||||
@@ -121,6 +121,8 @@
|
||||
</f:TextBox>
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
@@ -129,7 +131,7 @@
|
||||
Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,PipelineCode %>" ColumnID="PipelineCode"
|
||||
DataField="PipelineCode" SortField="PipelineCode" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="220px" Locked="true">
|
||||
TextAlign="Left" Width="200px" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,WeldingJointNumber %>" ColumnID="WeldJointCode"
|
||||
DataField="WeldJointCode" SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center"
|
||||
@@ -137,34 +139,55 @@
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,Specifications %>" ColumnID="Specification"
|
||||
DataField="Specification" SortField="Specification" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="170px">
|
||||
TextAlign="Left" Width="160px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,MaterialSpecificationCode %>" ColumnID="MaterialCode"
|
||||
DataField="MaterialCode" SortField="MaterialCode" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="120px">
|
||||
TextAlign="Center" Width="160px">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
|
||||
FieldType="String" TextAlign="Left" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
|
||||
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="检测日期" ColumnID="CreatedTime"
|
||||
DataField="CreatedTime" SortField="CreatedTime" FieldType="Date" Renderer="Date"
|
||||
<%-- 检测日期 --%>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,FilmDate %>" ColumnID="DelegationDate"
|
||||
DataField="DelegationDate" SortField="DelegationDate" FieldType="Date" Renderer="Date"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||
<Editor>
|
||||
<f:DatePicker ID="tbxTrustDate" DateFormatString="yyyy-MM-dd" Required="true" runat="server">
|
||||
</f:DatePicker>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="报告日期" FieldType="String" HeaderTextAlign="Center"
|
||||
<%-- 报告日期 --%>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,ReportDate %>" ColumnID="CreatedTime"
|
||||
DataField="CreatedTime" SortField="CreatedTime" FieldType="Date" Renderer="Date"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||
<Editor>
|
||||
<f:DatePicker ID="tbxCreatedTime" DateFormatString="yyyy-MM-dd" Required="true" runat="server">
|
||||
</f:DatePicker>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<%-- 报告编号 --%>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,ReportNo %>" ColumnID="reportNo"
|
||||
DataField="reportNo" SortField="reportNo" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="100px">
|
||||
<Editor>
|
||||
<f:TextBox ID="tbxreportNo" Required="true" runat="server">
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="报告编号" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="100px">
|
||||
</f:RenderField>
|
||||
|
||||
|
||||
<%-- 是否合格 --%>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,IsPass %>" ColumnID="StatusText"
|
||||
DataField="StatusText" SortField="status" FieldType="String" HeaderTextAlign="Center"
|
||||
DataField="StatusText" SortField="StatusText" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="100px">
|
||||
<Editor>
|
||||
<f:DropDownList ID="drpstatus" runat="server" ShowRedStar="true" Required="true" >
|
||||
<f:ListItem Value="合格" Text="合格" />
|
||||
<f:ListItem Value="不合格" Text="不合格" />
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
|
||||
@@ -9,6 +9,7 @@ using System.Collections;
|
||||
using Model;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
using FineUIPro.Web.common.ProjectSet;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
{
|
||||
@@ -105,7 +106,7 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
where x.UnitId == unitId
|
||||
&& x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.DelegationDate >= startTime && x.DelegationDate <= endTime
|
||||
&&( x.DelegationNo.Contains(searchCode)|| searchCode=="")
|
||||
&& (x.DelegationNo.Contains(searchCode) || searchCode == "")
|
||||
select x;
|
||||
//if (!string.IsNullOrWhiteSpace(searchCode))
|
||||
// ndt = ndt.Where(q => q.DelegationNo.Contains(searchCode));
|
||||
@@ -120,7 +121,7 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
node.Nodes.Add(newNode);
|
||||
BindNodes(newNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -189,13 +190,6 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
}
|
||||
}
|
||||
|
||||
private string StatusText(int status) {
|
||||
if (status == 0)
|
||||
return "合格";
|
||||
else
|
||||
return "不合格";
|
||||
}
|
||||
|
||||
#region 加载页面输入提交信息
|
||||
/// <summary>
|
||||
/// 加载页面输入提交信息
|
||||
@@ -208,26 +202,28 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
join n in Funs.DB.Project_Installation on x.InstallationId equals n.InstallationId
|
||||
join u in Funs.DB.Sys_User on x.DetectionStandard equals u.UserId into u1 //左连接查询
|
||||
from u in u1.DefaultIfEmpty()
|
||||
where x.Id==hdPMIId.Text
|
||||
select new { DelegationNo=x.DelegationNo,
|
||||
DelegationDate=x.DelegationDate,
|
||||
InstallationName=n.InstallationName,
|
||||
UnitName=y.UnitName,
|
||||
DetectionMethod="PMI光谱分析",
|
||||
Tabler=x.Tabler,
|
||||
Remark=x.Remark,
|
||||
DetectionStandard=x.DetectionStandard,
|
||||
where x.Id == hdPMIId.Text
|
||||
select new
|
||||
{
|
||||
DelegationNo = x.DelegationNo,
|
||||
DelegationDate = x.DelegationDate,
|
||||
InstallationName = n.InstallationName,
|
||||
UnitName = y.UnitName,
|
||||
DetectionMethod = "PMI光谱分析",
|
||||
Tabler = x.Tabler,
|
||||
Remark = x.Remark,
|
||||
DetectionStandard = x.DetectionStandard,
|
||||
}).ToList();
|
||||
if (pageInfo.Count>0)
|
||||
if (pageInfo.Count > 0)
|
||||
{
|
||||
this.txtDelegationNo.Text = pageInfo[0].DelegationNo;
|
||||
this.txtDelegationDate.Text = pageInfo[0].DelegationDate.ToString();
|
||||
this.txtDelegationDate.Text = pageInfo[0].DelegationDate.Value.ToString("yyyy-MM-dd");
|
||||
this.txtInstallationName.Text = pageInfo[0].InstallationName;
|
||||
this.txtUnitName.Text = pageInfo[0].UnitName;
|
||||
this.txtDetectionMethod.Text = pageInfo[0].DetectionMethod;
|
||||
this.txtTabler.Text = pageInfo[0].Tabler;
|
||||
this.txtRemark.Text = pageInfo[0].Remark;
|
||||
this.txtDetectionStandard.Text= pageInfo[0].DetectionStandard;
|
||||
this.txtDetectionStandard.Text = pageInfo[0].DetectionStandard;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -325,5 +321,60 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
return str;
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
//if (!CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.BItemEndCheckMenuId, Const.BtnSave))
|
||||
//{
|
||||
// ShowNotify("您没有这个权限,请与管理员联系!");
|
||||
// return;
|
||||
//}
|
||||
|
||||
if (Grid1.GetModifiedData().Count > 0)
|
||||
{
|
||||
JArray teamGroupData = Grid1.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
string status = teamGroupRow.Value<string>("status");
|
||||
if (status == "modified")
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
string id = teamGroupRow.Value<string>("id");
|
||||
Model.PMI_DelegationDetails onePMIDelegationDetails = Funs.DB.PMI_DelegationDetails.FirstOrDefault(p => p.Id == id);
|
||||
if (onePMIDelegationDetails == null)
|
||||
continue;
|
||||
//检测日期(缺失)
|
||||
string DelegationDate = values.Value<string>("DelegationDate");
|
||||
if (string.IsNullOrWhiteSpace(DelegationDate))
|
||||
;
|
||||
else
|
||||
;
|
||||
//报告日期
|
||||
string createdTime = values.Value<string>("CreatedTime");
|
||||
if (string.IsNullOrWhiteSpace(createdTime))
|
||||
onePMIDelegationDetails.CreatedTime=null;
|
||||
else
|
||||
onePMIDelegationDetails.CreatedTime=Convert.ToDateTime(createdTime);
|
||||
//报告编号
|
||||
onePMIDelegationDetails.ReportNo = values.Value<string>("reportNo").ToString();
|
||||
//是否合格 0合格 1不合格
|
||||
string statusText = values.Value<string>("StatusText");
|
||||
if (statusText == "合格")
|
||||
onePMIDelegationDetails.Status = 0;
|
||||
else
|
||||
onePMIDelegationDetails.Status = 1;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
ShowNotify(Resources.Lan.SaveSuccessfully, MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -248,6 +248,51 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// tbxTrustDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker tbxTrustDate;
|
||||
|
||||
/// <summary>
|
||||
/// tbxCreatedTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker tbxCreatedTime;
|
||||
|
||||
/// <summary>
|
||||
/// tbxreportNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox tbxreportNo;
|
||||
|
||||
/// <summary>
|
||||
/// drpstatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpstatus;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -23,12 +23,12 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.UnitId = Request.Params["unitId"] ?? "";
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.PMIId = Request.Params["PMIId"] ?? "";
|
||||
this.weldJointIds = Request.Params["weldJointIds"] ?? "";
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.UnitId = Request.Params["unitId"] ??"";
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.PMIId = Request.Params["PMIId"]??"";
|
||||
this.weldJointIds = Request.Params["weldJointIds"] ?? "";
|
||||
this.InitTreeMenu();//加载树
|
||||
this.BindGrid();
|
||||
}
|
||||
@@ -127,32 +127,12 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
select b.JointId
|
||||
).Distinct().ToList();
|
||||
|
||||
// string sql = @"SELECT WeldJointId,ProjectId,PipelineId,WeldJointCode,WPQCode,DetectionType,
|
||||
// convert(int,dbo.Fun_GetParseInt(WeldJointCode)) AS ConvertJointNo,
|
||||
//dbo.Fun_GetParseString(WeldJointCode) AS PreJotNo,
|
||||
// PipingClassCode,PipeSegment,JointAttribute,PageNum,
|
||||
// ComponentsCode1,ComponentsCode2,Is_hjName,IsHotProessStr,Material1Code,Material2Code,
|
||||
// WeldTypeCode,Specification,HeartNo1,HeartNo2,Size,Dia,Thickness,GrooveTypeCode,
|
||||
// WeldingMethodCode,WeldSilkId,WeldMatCode,WeldingDate,WeldingDailyCode,DoneDin,
|
||||
// BackingWelderCode,CoverWelderCode,SystemNumber,TestPackageNo,Remark,
|
||||
// MaterialCode,WeldingDate,
|
||||
// (CASE WHEN IsCancel=1 THEN '是' ELSE '否' END) AS IsCancel,isPMI
|
||||
// FROM View_Pipeline_WeldJoint WHERE isPMI=1 ";
|
||||
|
||||
|
||||
// List<SqlParameter> paramsList = new List<SqlParameter>();
|
||||
// if (!string.IsNullOrEmpty(this.txtJointNo.Text))
|
||||
// {
|
||||
// sql += @" and WeldJointCode=@WeldJointCode";
|
||||
// paramsList.Add(new SqlParameter("@WeldJointCode", txtJointNo.Text.Trim()));
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
// {
|
||||
// sql += @" and PipelineId=@PipelineId ";
|
||||
// paramsList.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
|
||||
// }
|
||||
// var dt = SQLHelper.GetDataTableRunText(sql, paramsList.ToArray());
|
||||
string[] arr = this.weldJointIds.Split('|');
|
||||
var query = Funs.DB.View_Pipeline_WeldJoint.Where(t => t.IsPMI == true);
|
||||
if (arr.Length > 0)
|
||||
{
|
||||
listData.Add(arr[0]);
|
||||
}
|
||||
if (listData.Count > 0)
|
||||
{
|
||||
query = query.Where(t => !listData.Contains(t.WeldJointId));
|
||||
@@ -165,7 +145,14 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
{
|
||||
query = query.Where(t => t.PipelineId == this.tvControlItem.SelectedNodeID);
|
||||
}
|
||||
Grid1.DataSource = query.ToList();
|
||||
var data= query.ToList() ;
|
||||
if (!string.IsNullOrEmpty(weldJointIds))
|
||||
{
|
||||
string[] jots = weldJointIds.Split('|');
|
||||
data = data.Where(t => !jots.Contains(t.WeldJointId)).ToList();
|
||||
}
|
||||
data = data.OrderBy(t => t.WeldJointCode).ToList();
|
||||
Grid1.DataSource = data;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user