合并最新
This commit is contained in:
@@ -10,7 +10,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
public partial class PipelineManage : PageBase
|
||||
{
|
||||
|
||||
|
||||
public string treeNodeId
|
||||
{
|
||||
get
|
||||
@@ -44,13 +44,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
BLL.Base_TestMediumService.InitMediumDropDownList(this.drpSer, true);//介质
|
||||
BLL.Base_DetectionTypeService.InitDetectionTypeDropDownList(this.drpNDT, true);//探伤类型
|
||||
BLL.Base_MaterialService.InitMaterialDropDownList(this.drpSteId, true,this.CurrUser.LoginProjectId);//材质
|
||||
BLL.Base_MaterialService.InitMaterialDropDownList(this.drpSteId, true, this.CurrUser.LoginProjectId);//材质
|
||||
ListItem[] lis = new ListItem[3];
|
||||
lis[0] = new ListItem("- 请选择 -", "");
|
||||
lis[1] = new ListItem("是","1");
|
||||
lis[1] = new ListItem("是", "1");
|
||||
lis[2] = new ListItem("否", "0");
|
||||
this.drpIsStanded.DataValueField = "Value";
|
||||
this.drpIsStanded.DataTextField = "Text";
|
||||
@@ -196,9 +196,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
this.unitId = e.Node.ParentNode.NodeID.Split('|')[0];
|
||||
|
||||
treeNodeId = e.NodeID;
|
||||
this.BindGrid(e.NodeID);
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -206,120 +205,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// <summary>
|
||||
/// 数据绑定
|
||||
/// </summary>
|
||||
private void BindGrid(string treeNodeId="")
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT iso.ISO_ID,
|
||||
iso.ProjectId,
|
||||
iso.ISO_IsoNo,
|
||||
iso.UnitId,
|
||||
unit.UnitName,
|
||||
iso.TestMediumId,
|
||||
testMedium.MediumName,
|
||||
iso.DetectionRateId,
|
||||
detectionRate.DetectionRateValue,
|
||||
iso.DetectionTypeId,
|
||||
detectionType.DetectionTypeName,
|
||||
iso.WorkAreaId,
|
||||
workArea.WorkAreaCode,
|
||||
iso.ISO_SysNo,
|
||||
iso.ISO_SubSysNo,
|
||||
iso.ISO_CwpNo,
|
||||
iso.ISO_IsoNumber,
|
||||
iso.ISO_Rev,
|
||||
iso.ISO_Sheet,
|
||||
iso.ISO_PipeQty,
|
||||
iso.ISO_Paint,
|
||||
iso.ISO_Insulator,
|
||||
iso.MaterialId,
|
||||
material.MaterialType,
|
||||
iso.ISO_Executive,
|
||||
iso.ISO_Modifier,
|
||||
iso.ISO_ModifyDate,
|
||||
iso.ISO_Creator,
|
||||
iso.ISO_CreateDate,
|
||||
iso.ISO_DesignPress,
|
||||
iso.ISO_DesignTemperature,
|
||||
iso.ISO_TestPress,
|
||||
iso.ISO_TestTemperature,
|
||||
iso.ISO_NDTClass,
|
||||
iso.ISO_PTRate,
|
||||
case when iso.Is_Standard=1 then '是'else '否' end as Is_Standard,
|
||||
iso.PipingClassId,
|
||||
pipingClass.PipingClassName,
|
||||
iso.ISO_PTClass,
|
||||
(CASE WHEN iso.ISO_IfPickling='True' THEN '是' ELSE '否' END) AS ISO_IfPickling,
|
||||
(CASE WHEN iso.ISO_IfChasing='True' THEN '是' ELSE '否' END) AS ISO_IfChasing,
|
||||
iso.ISO_Remark"
|
||||
+ @" FROM PW_IsoInfo AS iso"
|
||||
+ @" LEFT JOIN Base_Unit AS unit ON unit.UnitId = iso.UnitId"
|
||||
+ @" LEFT JOIN Base_TestMedium AS testMedium ON testMedium.TestMediumId = iso.TestMediumId"
|
||||
+ @" LEFT JOIN Base_DetectionRate AS detectionRate ON detectionRate.DetectionRateId = iso.DetectionRateId"
|
||||
+ @" LEFT JOIN Base_DetectionType AS detectionType ON detectionType.DetectionTypeId = iso.DetectionTypeId"
|
||||
+ @" LEFT JOIN ProjectData_WorkArea AS workArea ON workArea.WorkAreaId = iso.WorkAreaId"
|
||||
+ @" LEFT JOIN Base_Material AS material ON material.MaterialId = iso.MaterialId"
|
||||
+ @" LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId = iso.PipingClassId"
|
||||
+ @" WHERE iso.ProjectId=@ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
|
||||
if (!string.IsNullOrEmpty(treeNodeId))
|
||||
{
|
||||
strSql += " AND workArea.WorkAreaId=@treeNodeId ";
|
||||
listStr.Add(new SqlParameter("@treeNodeId", treeNodeId));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(unitId))
|
||||
{
|
||||
strSql += " AND iso.UnitId=@unitId ";
|
||||
listStr.Add(new SqlParameter("@unitId", unitId));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.drpIsStanded.SelectedValue))
|
||||
{
|
||||
strSql += " AND iso.Is_Standard=@Is_Standard ";
|
||||
listStr.Add(new SqlParameter("@Is_Standard", this.drpIsStanded.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtIsoNo.Text.Trim()))
|
||||
{
|
||||
strSql += " AND iso.ISO_IsoNo LIKE @ISO_IsoNo";
|
||||
listStr.Add(new SqlParameter("@ISO_IsoNo", "%" + this.txtIsoNo.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.drpSer.SelectedValue) && this.drpSer.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND iso.TestMediumId = @TestMediumId";
|
||||
listStr.Add(new SqlParameter("@TestMediumId", this.drpSer.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.drpNDT.SelectedValue) && this.drpNDT.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND iso.DetectionTypeId = @DetectionTypeId";
|
||||
listStr.Add(new SqlParameter("@DetectionTypeId", this.drpNDT.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtIso_IsoNumber.Text.Trim()))
|
||||
{
|
||||
strSql += " AND iso.ISO_IsoNumber LIKE @isoNumber";
|
||||
listStr.Add(new SqlParameter("@isoNumber", "%" + this.txtIso_IsoNumber.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.drpSteId.SelectedValue) && this.drpSteId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND iso.MaterialId = @MaterialId";
|
||||
listStr.Add(new SqlParameter("@MaterialId", this.drpSteId.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtISO_Specification.Text.Trim()))
|
||||
{
|
||||
strSql += " AND iso.ISO_Specification LIKE @ISO_Specification";
|
||||
listStr.Add(new SqlParameter("@ISO_Specification", "%" + this.txtISO_Specification.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
//this.OutputSummaryData(tb); ///取合计值
|
||||
Grid1.DataSource = table;
|
||||
var getData = PipelineService.getListData(this.CurrUser.LoginProjectId, treeNodeId, unitId, this.drpIsStanded.SelectedValue, this.txtIsoNo.Text.Trim()
|
||||
, this.drpSer.SelectedValue, this.drpNDT.SelectedValue, this.txtIso_IsoNumber.Text.Trim(), this.drpSteId.SelectedValue
|
||||
, this.txtISO_Specification.Text.Trim(), Grid1);
|
||||
Grid1.RecordCount = PipelineService.count;
|
||||
Grid1.DataSource = getData;
|
||||
Grid1.DataBind();
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -354,7 +248,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid(this.treeNodeId);
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -407,9 +301,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
if (!string.IsNullOrEmpty(treeNodeId))
|
||||
{
|
||||
BindGrid(treeNodeId);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 增加管线信息
|
||||
@@ -520,16 +413,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(treeNodeId))
|
||||
{
|
||||
this.BindGrid(treeNodeId);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
|
||||
this.BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -785,8 +670,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
protected void btnQR_Click(object sender, EventArgs e)
|
||||
{
|
||||
var getJointInfos = from x in Funs.DB.PW_JointInfo
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.QRCodeAttachUrl == null
|
||||
select x;
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.QRCodeAttachUrl == null
|
||||
select x;
|
||||
int num = 0;
|
||||
if (getJointInfos.Count() > 0)
|
||||
{
|
||||
@@ -819,11 +704,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
return;
|
||||
}
|
||||
string iso_Id = Grid1.SelectedRowID;
|
||||
var getJots = Funs.DB.PW_JointInfo.Where(x => x.ISO_ID == iso_Id).Select(x=>x.JOT_ID);
|
||||
var getJots = Funs.DB.PW_JointInfo.Where(x => x.ISO_ID == iso_Id).Select(x => x.JOT_ID);
|
||||
if (getJots.Count() > 0)
|
||||
{
|
||||
string pList = string.Empty;
|
||||
foreach (var id in getJots)
|
||||
foreach (var id in getJots)
|
||||
{
|
||||
if (string.IsNullOrEmpty(pList))
|
||||
{
|
||||
@@ -846,5 +731,32 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void betDel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GetButtonPower(Const.BtnDelete))
|
||||
{
|
||||
var getMess = PipelineService.DelAllPopeline(this.CurrUser.LoginProjectId, treeNodeId, unitId, this.drpIsStanded.SelectedValue, this.txtIsoNo.Text.Trim()
|
||||
, this.drpSer.SelectedValue, this.drpNDT.SelectedValue, this.txtIso_IsoNumber.Text.Trim(), this.drpSteId.SelectedValue
|
||||
, this.txtISO_Specification.Text.Trim());
|
||||
if (getMess != null)
|
||||
{
|
||||
if (getMess.code == 1)
|
||||
{
|
||||
this.InitTreeMenu();//加载树
|
||||
this.BindGrid();//加载树
|
||||
ShowNotify(getMess.message, MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop(getMess.message, MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user