From ba4f23e921a6d153bacb536167e87f927b2bf881 Mon Sep 17 00:00:00 2001 From: gaofei <181547018@qq.com> Date: Mon, 8 May 2023 15:36:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A8=E9=87=8F=E6=A0=87?= =?UTF-8?q?=E5=87=86=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .../ConstructionStandardListProject.aspx | 16 +++++++ .../ConstructionStandardListProject.aspx.cs | 46 +++++++++++-------- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 33 +++++++++++-- 4 files changed, 74 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 4d55dfb6..a4b8d387 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /SGGLPackFile /SGGL/FineUIPro.Web/File/Excel/Temp /SGGL/FineUIPro.Web/FileUpload/QRCodeFile +/SGGL/FineUIPro.Web/FileUpload/DataBase/ConstructionStandardProject/2023-05 diff --git a/SGGL/FineUIPro.Web/CQMS/DataBase/ConstructionStandardListProject.aspx b/SGGL/FineUIPro.Web/CQMS/DataBase/ConstructionStandardListProject.aspx index d8aed418..b74ceeff 100644 --- a/SGGL/FineUIPro.Web/CQMS/DataBase/ConstructionStandardListProject.aspx +++ b/SGGL/FineUIPro.Web/CQMS/DataBase/ConstructionStandardListProject.aspx @@ -6,6 +6,22 @@ 标准规范 +
diff --git a/SGGL/FineUIPro.Web/CQMS/DataBase/ConstructionStandardListProject.aspx.cs b/SGGL/FineUIPro.Web/CQMS/DataBase/ConstructionStandardListProject.aspx.cs index a6fbc3c0..90647079 100644 --- a/SGGL/FineUIPro.Web/CQMS/DataBase/ConstructionStandardListProject.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/DataBase/ConstructionStandardListProject.aspx.cs @@ -131,24 +131,31 @@ namespace FineUIPro.Web.CQMS.DataBase standardList.StandardType, standardList.Memo" + @" FROM CQMS_Law_ConstructionStandardListProject AS standardList " - + @" WHERE standardList.ProjectId=@projectId AND standardList.StandardType=@StandardType"; + + @" WHERE standardList.ProjectId=@projectId "; List listStr = new List(); listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); - listStr.Add(new SqlParameter("@StandardType", this.tvControlItem.SelectedNodeID)); - if (!string.IsNullOrEmpty(this.txtStandardName.Text.Trim())) + if (string.IsNullOrEmpty(this.txtStandardName.Text.Trim()) && string.IsNullOrEmpty(this.txtStandardGrade.Text.Trim()) && string.IsNullOrEmpty(this.txtStandardNo.Text.Trim())) { - strSql += " AND standardList.StandardName LIKE @StandardName"; - listStr.Add(new SqlParameter("@StandardName", "%" + this.txtStandardName.Text.Trim() + "%")); + strSql += " AND standardList.StandardType=@StandardType"; + listStr.Add(new SqlParameter("@StandardType", this.tvControlItem.SelectedNodeID)); } - if (!string.IsNullOrEmpty(this.txtStandardGrade.Text.Trim())) + else { - strSql += " AND standardList.StandardGrade LIKE @StandardGrade"; - listStr.Add(new SqlParameter("@StandardGrade", "%" + this.txtStandardGrade.Text.Trim() + "%")); - } - if (!string.IsNullOrEmpty(this.txtStandardNo.Text.Trim())) - { - strSql += " AND standardList.StandardNo LIKE @StandardNo"; - listStr.Add(new SqlParameter("@StandardNo", "%" + this.txtStandardNo.Text.Trim() + "%")); + if (!string.IsNullOrEmpty(this.txtStandardName.Text.Trim())) + { + strSql += " AND standardList.StandardName LIKE @StandardName"; + listStr.Add(new SqlParameter("@StandardName", "%" + this.txtStandardName.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(this.txtStandardGrade.Text.Trim())) + { + strSql += " AND standardList.StandardGrade LIKE @StandardGrade"; + listStr.Add(new SqlParameter("@StandardGrade", "%" + this.txtStandardGrade.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(this.txtStandardNo.Text.Trim())) + { + strSql += " AND standardList.StandardNo LIKE @StandardNo"; + listStr.Add(new SqlParameter("@StandardNo", "%" + this.txtStandardNo.Text.Trim() + "%")); + } } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); @@ -172,11 +179,14 @@ namespace FineUIPro.Web.CQMS.DataBase this.Grid1.SelectedRowIDArray = ids.ToArray(); } } - //var selectIds = (from x in Funs.DB.WBS_BreakdownProject where x.DivisionProjectId == this.trWBS.SelectedNodeID && x.IsSelected == true select x.BreakdownProjectId).ToList(); - //if (selectIds.Count() > 0) - //{ - // this.Grid1.SelectedRowIDArray = selectIds.ToArray(); - //} + for (int i = 0; i < Grid1.Rows.Count; i++) + { + var attachFile = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == Grid1.Rows[i].RowID + this.CurrUser.LoginProjectId); + if (attachFile != null && !string.IsNullOrEmpty(attachFile.AttachUrl)) + { + Grid1.Rows[i].CellCssClasses[18] = "green"; + } + } } #endregion diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 33dc80e6..a8eb1578 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -89,10 +89,6 @@ ..\FineUIPro\Reference BLL\Interop.WIA.dll - - ..\packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll - True - False @@ -16204,6 +16200,35 @@ + + + {2DF8D04C-5BFA-101B-BDE5-00AA0044DE52} + 2 + 4 + 0 + primary + False + True + + + {00020813-0000-0000-C000-000000000046} + 1 + 6 + 0 + primary + False + True + + + {0002E157-0000-0000-C000-000000000046} + 5 + 3 + 0 + primary + False + True + +