diff --git a/MESWebSite/HttpHandlers/Bom_MKHandler.ashx.cs b/MESWebSite/HttpHandlers/Bom_MKHandler.ashx.cs index 0b49593..7c47b11 100644 --- a/MESWebSite/HttpHandlers/Bom_MKHandler.ashx.cs +++ b/MESWebSite/HttpHandlers/Bom_MKHandler.ashx.cs @@ -197,6 +197,10 @@ namespace MESWebSite.HttpHandlers { md.IsChecked = true; } + else + { + md.IsChecked = false; + } var info = Request.Cookies.Get("LoginUserInfo"); if (info != null) diff --git a/MESWebSite/Manage/Bom_MK.aspx b/MESWebSite/Manage/Bom_MK.aspx index 637c35d..f3c6eab 100644 --- a/MESWebSite/Manage/Bom_MK.aspx +++ b/MESWebSite/Manage/Bom_MK.aspx @@ -502,6 +502,7 @@ PrimaryID = row.BomID; $('#fl_id_1').combobox('select', row.PartNo1); $('#fl_id_2').combobox('select', row.PartNo2); + if (row.IsChecked == 0) { $('#IsChecked').removeAttr("checked") } else { diff --git a/MESWebSite/Manage/Bom_MK.aspx.cs b/MESWebSite/Manage/Bom_MK.aspx.cs index 08a0904..f0be0ee 100644 --- a/MESWebSite/Manage/Bom_MK.aspx.cs +++ b/MESWebSite/Manage/Bom_MK.aspx.cs @@ -68,7 +68,7 @@ namespace MESWebSite.Manage Bom_MKBLL bll = new Bom_MKBLL(); List list = new List(); - tb_Bom_MK md = new tb_Bom_MK(); + ProductBLL pbll = new ProductBLL(); LineBLL linebll = new LineBLL(); @@ -174,12 +174,22 @@ namespace MESWebSite.Manage return; } - var isPartAssembleList = partNoBindDB.Search(p => p.PartNo1 == PartNo1 && p.IsPartAssemble == 1 && p.LineName == LineName && p.StationNo == StationNo); - if (isPartAssembleList != null && isPartAssembleList.Count > 0) + if(IsPartAssemble == "是") { - ClientScript.RegisterStartupScript(this.GetType(), "提示", ""); - return; - } + var isPartAssembleList = partNoBindDB.Search(p => p.PartNo1 == PartNo1 && p.IsPartAssemble == 1 && p.LineName == LineName && p.StationNo == StationNo); + if (isPartAssembleList != null && isPartAssembleList.Count > 0) + { + ClientScript.RegisterStartupScript(this.GetType(), "提示", ""); + return; + } + var isPartAssembleListExcel = list.Where(p => p.PartNo1 == PartNo1 && p.IsPartAssemble == 1 && p.LineName == LineName && p.StationNo == StationNo).ToList(); + if (isPartAssembleListExcel != null && isPartAssembleListExcel.Count > 0) + { + ClientScript.RegisterStartupScript(this.GetType(), "提示", ""); + return; + } + } + if (IsChecked != "是" && IsChecked != "否") { @@ -195,7 +205,7 @@ namespace MESWebSite.Manage #endregion - + tb_Bom_MK md = new tb_Bom_MK(); var info = Request.Cookies.Get("LoginUserInfo"); if (info != null) {