合并最新
This commit is contained in:
@@ -188,18 +188,23 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
||||
{
|
||||
IQueryable<Model.PW_IsoInfo> isoInfo = from x in Funs.DB.PW_IsoInfo
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkAreaId == e.Node.NodeID.Split('_')[0]
|
||||
orderby x.ISO_IsoNo
|
||||
select x;
|
||||
string a = this.txtIsono.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(a))
|
||||
{
|
||||
isoInfo = isoInfo.Where(x => x.ISO_IsoNo.Contains(a));
|
||||
}
|
||||
|
||||
if (e.Node.ToolTip == "区域非标管线")
|
||||
{
|
||||
e.Node.Nodes.Clear();
|
||||
List<Model.PW_IsoInfo> isoInfo = new List<Model.PW_IsoInfo>();
|
||||
isoInfo = (from x in BLL.Funs.DB.PW_IsoInfo
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkAreaId == e.Node.NodeID.Split('_')[0] && x.Is_Standard==true
|
||||
&& x.ISO_IsoNo.Contains(this.txtIsono.Text.Trim())
|
||||
orderby x.ISO_IsoNo
|
||||
select x).ToList();
|
||||
foreach (var item in isoInfo)
|
||||
var getS = isoInfo.Where(x => x.Is_Standard == true).OrderBy(x => x.ISO_IsoNo);
|
||||
foreach (var item in getS)
|
||||
{
|
||||
var jotCount = (from x in Funs.DB.PW_JointInfo where x.ISO_ID == item.ISO_ID select x).Count();
|
||||
var jotCount = Funs.DB.PW_JointInfo.Where(x => x.ISO_ID == item.ISO_ID).Count();
|
||||
TreeNode newNode = new TreeNode();
|
||||
if (!String.IsNullOrEmpty(item.ISO_Sheet))
|
||||
{
|
||||
@@ -219,15 +224,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
else if (e.Node.ToolTip == "区域标准管线")
|
||||
{
|
||||
e.Node.Nodes.Clear();
|
||||
List<Model.PW_IsoInfo> isoInfo = new List<Model.PW_IsoInfo>();
|
||||
isoInfo = (from x in BLL.Funs.DB.PW_IsoInfo
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkAreaId == e.Node.NodeID.Split('_')[0] && x.Is_Standard == false
|
||||
&& x.ISO_IsoNo.Contains(this.txtIsono.Text.Trim())
|
||||
orderby x.ISO_IsoNo
|
||||
select x).ToList();
|
||||
foreach (var item in isoInfo)
|
||||
var getNS = isoInfo.Where(x => x.Is_Standard == false).OrderBy(x => x.ISO_IsoNo);
|
||||
foreach (var item in getNS)
|
||||
{
|
||||
var jotCount = (from x in Funs.DB.PW_JointInfo where x.ISO_ID == item.ISO_ID select x).Count();
|
||||
var jotCount = Funs.DB.PW_JointInfo.Where(x => x.ISO_ID == item.ISO_ID).Count();
|
||||
TreeNode newNode = new TreeNode();
|
||||
if (!String.IsNullOrEmpty(item.ISO_Sheet))
|
||||
{
|
||||
@@ -237,8 +237,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
newNode.Text = item.ISO_IsoNo;
|
||||
}
|
||||
|
||||
newNode.Text += "【" + jotCount.ToString() + "焊口】";
|
||||
newNode.ToolTip = "管线(页数)【焊口数】";
|
||||
newNode.ToolTip = "管线(页数)【焊口数】";
|
||||
newNode.NodeID = item.ISO_ID;
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
@@ -957,18 +958,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
private bool judgementDelete(string id, bool isShow)
|
||||
{
|
||||
string content = string.Empty;
|
||||
//if (BLL.HJGL_HotProessManageEditService.GetHotProessByJotId(id) > 0)
|
||||
//{
|
||||
// content = "热处理已经使用了该焊口,不能删除!";
|
||||
//}
|
||||
//if (BLL.Funs.DB.HJGL_CH_TrustItem.FirstOrDefault(x => x.JOT_ID == id) != null)
|
||||
//{
|
||||
// content = "无损委托已经使用了该焊口,不能删除!";
|
||||
//}
|
||||
//if (BLL.Funs.DB.HJGL_CH_CheckItem.FirstOrDefault(x => x.JOT_ID == id) != null)
|
||||
//{
|
||||
// content = "检测单已经使用了该焊口,不能删除!";
|
||||
//}
|
||||
var jot = Funs.DB.PW_JointInfo.FirstOrDefault(x => x.JOT_ID == id);
|
||||
if (jot != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(jot.DReportID))
|
||||
{
|
||||
var dr = Funs.DB.BO_WeldReportMain.FirstOrDefault(x => x.DReportID == jot.DReportID);
|
||||
if (dr != null)
|
||||
{
|
||||
content = "日报:"+dr.JOT_DailyReportNo+ "使用了该焊口,不能删除!";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
content = "删除焊口不存在!";
|
||||
}
|
||||
if (string.IsNullOrEmpty(content))
|
||||
{
|
||||
return true;
|
||||
@@ -1121,5 +1126,30 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
string strCode = "WeldedJoint$" + Grid1.SelectedRowID;
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/Controls/SeeQRImage.aspx?JOT_ID={0}&strCode={1}", Grid1.SelectedRowID, strCode), "二维码查看", 400, 400));
|
||||
}
|
||||
|
||||
protected void betDel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GetButtonPower(Const.BtnDelete))
|
||||
{
|
||||
var getMess = PW_JointInfoService.DelAllJots(this.CurrUser.LoginProjectId, this.tvControlItem.SelectedNodeID, this.txtJOT_JointNo.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