diff --git a/CreateModel.bat b/CreateModel.bat index 2f27853..27ceb4a 100644 --- a/CreateModel.bat +++ b/CreateModel.bat @@ -25,9 +25,9 @@ REM -------------- @echo 设置.net控制台环境 @echo. -@call "%VS100COMNTOOLS%"vsvars32.bat +@call "%VS150%" -SqlMetal /views /server:.\SQL2016 /database:HJGLDB_ZJBSF /code:%Model_ROOT%\Model.cs /namespace:Model +SqlMetal /views /server:. /database:HJGLDB_ZJBSF /code:%Model_ROOT%\Model.cs /namespace:Model @ECHO 完成 pause diff --git a/HJGL/BLL/BLL.csproj.user b/HJGL/BLL/BLL.csproj.user index 55f44b9..07dbd5b 100644 --- a/HJGL/BLL/BLL.csproj.user +++ b/HJGL/BLL/BLL.csproj.user @@ -1,6 +1,6 @@ 锘 - ShowAllFiles + ProjectFiles \ No newline at end of file diff --git a/HJGL/BLL/Common/SysManage/Sys_UserService.cs b/HJGL/BLL/Common/SysManage/Sys_UserService.cs index e340878..1ec5a8f 100644 --- a/HJGL/BLL/Common/SysManage/Sys_UserService.cs +++ b/HJGL/BLL/Common/SysManage/Sys_UserService.cs @@ -14,6 +14,27 @@ namespace BLL public static class Sys_UserService { + + public static (string, string) GetSingtrueImageUrl(string userId) + { + var result = (from a in Funs.DB.Sys_User + join + b in Funs.DB.Base_Unit on a.UnitId equals b.UnitId + join c in Funs.DB.Base_UnitType on b.UnitTypeId equals c.UnitTypeId + where a.UserId == userId + select new + { + a.SigntrueImage, + c.UnitTypeName + }).FirstOrDefault(); + + if (result != null) + { + return (result.SigntrueImage, result.UnitTypeName); + } + return (null, null); + } + /// /// 用户登陆方法 /// @@ -216,6 +237,7 @@ namespace BLL newUser.UnitId = user.UnitId; newUser.Depart = user.Depart; newUser.RoleIds = user.RoleIds; + newUser.SigntrueImage = user.SigntrueImage; newUser.IsPost = user.IsPost; newUser.Email = user.Email; newUser.EmailPassword = user.EmailPassword; @@ -242,6 +264,7 @@ namespace BLL newUser.Depart = user.Depart; newUser.RoleIds = user.RoleIds; newUser.IsPost = user.IsPost; + newUser.SigntrueImage = user.SigntrueImage; newUser.Email = user.Email; if (!String.IsNullOrEmpty(user.EmailPassword)) { diff --git a/HJGL/FineUIPro.Web/File/Image/05f64f96-b496-4023-a2f3-f5808f2655d2.png b/HJGL/FineUIPro.Web/File/Image/05f64f96-b496-4023-a2f3-f5808f2655d2.png new file mode 100644 index 0000000..d563717 Binary files /dev/null and b/HJGL/FineUIPro.Web/File/Image/05f64f96-b496-4023-a2f3-f5808f2655d2.png differ diff --git a/HJGL/FineUIPro.Web/File/Image/607dd542-1077-4716-b239-cb28196b14a5.jpg b/HJGL/FineUIPro.Web/File/Image/607dd542-1077-4716-b239-cb28196b14a5.jpg new file mode 100644 index 0000000..54a9fe1 Binary files /dev/null and b/HJGL/FineUIPro.Web/File/Image/607dd542-1077-4716-b239-cb28196b14a5.jpg differ diff --git a/HJGL/FineUIPro.Web/File/Image/APP涓嬭浇鍦板潃.jpg b/HJGL/FineUIPro.Web/File/Image/APP涓嬭浇鍦板潃.jpg deleted file mode 100644 index 00cd7b5..0000000 Binary files a/HJGL/FineUIPro.Web/File/Image/APP涓嬭浇鍦板潃.jpg and /dev/null differ diff --git a/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs index 14d1b99..49e3a63 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs @@ -3640,9 +3640,9 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage private void template21(XSSFWorkbook hssfworkbook, XSSFSheet ws) { var info = GetTestPackageInfo(this.tvControlItem.SelectedNodeID); + //鑾峰彇绛惧悕 + var getInfo =BLL.Sys_UserService.GetSingtrueImageUrl(info?.Auditer); - ////妯℃嫙鏁版嵁 - //string sql = "SELECT '' WeldSilkId,'妯℃嫙鏁版嵁' PipelineCode,'' WorkAreaCode,'' WeldJointCode,'' Specification,'' Material1Code,'' WeldingMethodCode,'' WeldingDate,'' WeldSilkCode,'' WeldMatCode,'' BackingWelderCode,'' CoverWelderCode,'' ProjectName,'' EnProjectName,'' WorkAreaName,'' EnWorkAreaName,'' IsHotProessName,'' PrepareTemp,'' WeldingLocationCode,'' WeldTypeCode,'' NDEReportNo\r\nFROM Sys_User union all SELECT '' WeldSilkId,'妯℃嫙鏁版嵁' PipelineCode,'' WorkAreaCode,'' WeldJointCode,'' Specification,'' Material1Code,'' WeldingMethodCode,'' WeldingDate,'' WeldSilkCode,'' WeldMatCode,'' BackingWelderCode,'' CoverWelderCode,'' ProjectName,'' EnProjectName,'' WorkAreaName,'' EnWorkAreaName,'' IsHotProessName,'' PrepareTemp,'' WeldingLocationCode,'' WeldTypeCode,'' NDEReportNo\r\nFROM Sys_User union all SELECT '' WeldSilkId,'妯℃嫙鏁版嵁' PipelineCode,'' WorkAreaCode,'' WeldJointCode,'' Specification,'' Material1Code,'' WeldingMethodCode,'' WeldingDate,'' WeldSilkCode,'' WeldMatCode,'' BackingWelderCode,'' CoverWelderCode,'' ProjectName,'' EnProjectName,'' WorkAreaName,'' EnWorkAreaName,'' IsHotProessName,'' PrepareTemp,'' WeldingLocationCode,'' WeldTypeCode,'' NDEReportNo\r\nFROM Sys_User"; string sql = @" SELECT WeldSilkId, @@ -3936,11 +3936,30 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage ws.AddMergedRegion(region); } + if(!string.IsNullOrEmpty(getInfo.Item1) && !string.IsNullOrEmpty(getInfo.Item2)) + { + switch (getInfo.Item2) + { + case "寤鸿鏂": + InsertImage(hssfworkbook, ws, rowIndex + 3, 0, rowIndex + 3, 3, Server.MapPath(getInfo.Item1), 1, 1); + break; + case "鎬绘壙鍖呭晢": + InsertImage(hssfworkbook, ws, rowIndex + 3, 4, rowIndex + 3, 9, Server.MapPath(getInfo.Item1), 1, 1); + break; + case "鐩戠悊": + InsertImage(hssfworkbook, ws, rowIndex + 3, 0, rowIndex + 3, 3, Server.MapPath(getInfo.Item1), 1, 1); + break; + case "鏂藉伐": + InsertImage(hssfworkbook, ws, rowIndex + 3, 10, rowIndex + 3, 14, Server.MapPath(getInfo.Item1), 1, 1); + break; + } + } //琛1 ws.GetRow(rowIndex + 1).GetCell(0).SetCellValue("寤鸿/鐩戠悊鍗曚綅"); ws.GetRow(rowIndex + 1).GetCell(4).SetCellValue("鎬绘壙鍖呭崟浣峔r\nGeneral Contractor"); ws.GetRow(rowIndex + 1).GetCell(10).SetCellValue("鏂藉伐鍗曚綅\r\nConstruction Contractor"); //琛2 + ws.GetRow(rowIndex + 2).GetCell(0).SetCellValue("涓撲笟宸ョ▼甯圽r\nDiscipline Engineer:"); ws.GetRow(rowIndex + 2).GetCell(4).SetCellValue("涓撲笟宸ョ▼甯圽r\nDiscipline Engineer:"); ws.GetRow(rowIndex + 2).GetCell(10).SetCellValue("璁板綍浜 锛歕r\nRecord Prepared by:"); @@ -3949,7 +3968,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage //琛5 ws.GetRow(rowIndex + 6).GetCell(10).SetCellValue("鐒婃帴璐d换宸ョ▼甯堬細\r\nWelding Engineer:"); //琛6 - ws.GetRow(rowIndex + 7).GetCell(0).SetCellValue("鏃ユ湡Date锛 骞 鏈 鏃"); + ws.GetRow(rowIndex + 7).GetCell(0).SetCellValue("鏃ユ湡Date锛 骞 鏈 鏃"); ws.GetRow(rowIndex + 7).GetCell(4).SetCellValue("鏃ユ湡Date锛 骞 鏈 鏃"); ws.GetRow(rowIndex + 7).GetCell(10).SetCellValue("鏃ユ湡Date锛 骞 鏈 鏃"); @@ -3970,31 +3989,16 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage ws.VerticallyCenter = true; ws.HorizontallyCenter = true; - //ws.PrintSetup.FitWidth = 1; - //ws.PrintSetup.FitHeight = 0; - //ws.PrintSetup.PaperSize = (int)PaperSize.A4_Small; - //ws.FitToPage = true; - ////妯悜鎵撳嵃 - //ws.PrintSetup.Landscape = true; - ////鍨傜洿姘村钩灞呬腑 - //ws.VerticallyCenter = true; - //ws.HorizontallyCenter = true; - ////鎵撳嵃杈硅窛璁剧疆 鍘樼背/3 - //ws.SetMargin(MarginType.RightMargin, (double)2.4 / 3); - //ws.SetMargin(MarginType.LeftMargin, (double)2.4 / 3); - //ws.SetMargin(MarginType.TopMargin, (double)2.9 / 3); - //ws.SetMargin(MarginType.BottomMargin, (double)2.4 / 3); - - ////椤电湁椤佃剼闂磋窛 - //ws.SetMargin(MarginType.HeaderMargin, 0); - //ws.SetMargin(MarginType.FooterMargin, 0); - } //22-灏勭嚎妫娴嬫瘮渚嬬‘璁よ〃SHT 3503-J412-2007 private void template22(XSSFWorkbook hssfworkbook, XSSFSheet ws) { var info = GetTestPackageInfo(this.tvControlItem.SelectedNodeID); + //鑾峰彇绛惧悕 + var getInfo = BLL.Sys_UserService.GetSingtrueImageUrl(info?.Auditer); + + string sql = @" select * from ( @@ -4413,6 +4417,29 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage ws.AddMergedRegion(new CellRangeAddress(rowIndex + 17, rowIndex + 17, 10, 16)); ws.AddMergedRegion(new CellRangeAddress(rowIndex + 17, rowIndex + 17, 17, 20)); + if (!string.IsNullOrEmpty(getInfo.Item1) && !string.IsNullOrEmpty(getInfo.Item2)) + { + switch (getInfo.Item2) + { + case "寤鸿鏂": + InsertImage(hssfworkbook, ws, rowIndex + 20, 0, rowIndex + 20, 3, Server.MapPath(getInfo.Item1), 1, 1,1); + break; + case "鎬绘壙鍖呭晢": + InsertImage(hssfworkbook, ws, rowIndex + 20, 4, rowIndex + 20, 9, Server.MapPath(getInfo.Item1), 1, 1,1); + break; + case "鐩戠悊": + InsertImage(hssfworkbook, ws, rowIndex + 20, 0, rowIndex + 20, 3, Server.MapPath(getInfo.Item1), 1, 1,1); + break; + case "妫娴": + InsertImage(hssfworkbook, ws, rowIndex + 19, 10, rowIndex + 19, 16, Server.MapPath(getInfo.Item1), 1, 1,1); + break; + case "鏂藉伐": + InsertImage(hssfworkbook, ws, rowIndex + 20, 17, rowIndex + 20, 20, Server.MapPath(getInfo.Item1), 1, 1,1); + break; + } + } + + ws.GetRow(rowIndex + 17).GetCell(0).SetCellValue("寤鸿/鐩戠悊鍗曚綅\r\nOwner/Supervision Contractor"); ws.GetRow(rowIndex + 17).GetCell(4).SetCellValue("鎬绘壙鍖呭崟浣峔r\nGeneral Contractor"); ws.GetRow(rowIndex + 17).GetCell(10).SetCellValue("妫 娴 鍗 浣峔r\nExamination Contractor"); @@ -4487,23 +4514,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage ws.VerticallyCenter = true; ws.HorizontallyCenter = true; - //ws.PrintSetup.FitWidth = 1; - //ws.PrintSetup.FitHeight = 0; - //ws.PrintSetup.PaperSize = (int)PaperSize.A4_Small; - //ws.FitToPage = true; - ////妯悜鎵撳嵃 - //ws.PrintSetup.Landscape = true; - ////鍨傜洿姘村钩灞呬腑 - //ws.VerticallyCenter = true; - //ws.HorizontallyCenter = true; - ////鎵撳嵃杈硅窛璁剧疆 鍘樼背/3 - //ws.SetMargin(MarginType.RightMargin, (double)2.4 / 3); - //ws.SetMargin(MarginType.LeftMargin, (double)2.4 / 3); - //ws.SetMargin(MarginType.TopMargin, (double)2.9 / 3); - //ws.SetMargin(MarginType.BottomMargin, (double)2.4 / 3); - ////椤电湁椤佃剼闂磋窛 - //ws.SetMargin(MarginType.HeaderMargin, 0); - //ws.SetMargin(MarginType.FooterMargin, 0); + } //23-TP-09-瓒呭0&PAUT&TOFD妫娴嬫瘮渚嬬‘璁よ〃 @@ -7736,6 +7747,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage workAreaName = d.WorkAreaName, workAreaCode = d.WorkAreaCode, SystemNo = a.TestPackageName, + Auditer = a.Auditer, testpackageNo = a.TestPackageNo, TestPressure = a.TestPressure, TestType = a.TestType @@ -7743,6 +7755,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage return result; } + /// /// 鏌ヨ鎸囧畾鏉℃暟鍒嗛〉 /// diff --git a/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/NDTTrustPrint.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/NDTTrustPrint.aspx.cs index 462b2bc..c2fd1c4 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/NDTTrustPrint.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/NDTTrustPrint.aspx.cs @@ -239,6 +239,11 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage if (tb.Rows.Count > 0 && tbTitle.Rows.Count > 0) { + string jlAuditer = tb.Rows[0]["JLAuditID"].ToString(); + string glgsAuditer = tb.Rows[0]["GLGSAuditID"].ToString(); + var getJLInfo = BLL.Sys_UserService.GetSingtrueImageUrl(jlAuditer); + var getGLGSInfo = BLL.Sys_UserService.GetSingtrueImageUrl(glgsAuditer); + var tbNum = tb.Rows.Count; var pageNum = tbNum < 17 ? 1 @@ -247,6 +252,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage //寰幆椤 for (int i = 1; i <= pageNum; i++) { + #region 澶撮儴 ws = ClExcelCreateRow(ws, hssfworkbook, rowIndex, rowIndex + 5, style, 0, 20, true); @@ -461,7 +467,15 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage ws.GetRow(rowIndex + 8).GetCell(9).SetCellValue("骞 鏈 鏃"); ws.GetRow(rowIndex + 8).GetCell(12).SetCellValue("骞 鏈 鏃"); ws.GetRow(rowIndex + 8).GetCell(18).SetCellValue("骞 鏈 鏃"); - + //鎻掑叆绛惧悕鍥剧墖 + if (!string.IsNullOrEmpty(getJLInfo.Item1)) + { + InsertImage(hssfworkbook, ws, rowIndex + 6, 2, rowIndex + 6, 4, Server.MapPath(getJLInfo.Item1), 1, 1, 10); + } + if (!string.IsNullOrEmpty(getGLGSInfo.Item1)) + { + InsertImage(hssfworkbook, ws, rowIndex + 6, 5, rowIndex + 6, 6, Server.MapPath(getJLInfo.Item1), 1, 8); + } #endregion ws = ClExcelCreateRow(ws, hssfworkbook, rowIndex + 9, rowIndex + 9, style, 0, 20, false, true); @@ -502,6 +516,11 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage if (tb.Rows.Count > 0 && tbTitle.Rows.Count > 0) { + string jlAuditer = tb.Rows[0]["JLAuditID"].ToString(); + string glgsAuditer = tb.Rows[0]["GLGSAuditID"].ToString(); + var getJLInfo = BLL.Sys_UserService.GetSingtrueImageUrl(jlAuditer); + var getGLGSInfo = BLL.Sys_UserService.GetSingtrueImageUrl(glgsAuditer); + var tbNum = tb.Rows.Count; var pageNum = tbNum < 15 ? 1 @@ -792,8 +811,16 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage ws.GetRow(rowIndex + 8).GetCell(7).SetCellValue(" 骞 鏈 鏃"); ws.GetRow(rowIndex + 8).GetCell(11).SetCellValue(" 骞 鏈 鏃"); //灏鹃儴琛9 - + //鎻掑叆绛惧悕鍥剧墖 + if (!string.IsNullOrEmpty(getJLInfo.Item1)) + { + InsertImage(hssfworkbook, ws, rowIndex + 6, 2, rowIndex + 6, 4, Server.MapPath(getJLInfo.Item1), 1, 1, 10); + } + if (!string.IsNullOrEmpty(getGLGSInfo.Item1)) + { + InsertImage(hssfworkbook, ws, rowIndex + 6, 5, rowIndex + 6, 6, Server.MapPath(getJLInfo.Item1), 1, 8); + } #endregion ws = WsExcelCreateRow(ws, hssfworkbook, rowIndex + 11, rowIndex + 11, style, 0, 12, 3, true); @@ -849,7 +876,16 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage #endregion #region 绉佹湁鏂规硶 + private void InsertImage(XSSFWorkbook hssfworkbook, XSSFSheet ws, int row1, int col1, int row2, int col2, string img, double w, double h, int dx1 = 0, int dy1 = 0, int dx2 = 0, int dy2 = 0) + { + int pictureIdx = hssfworkbook.AddPicture(System.IO.File.ReadAllBytes(img), PictureType.PNG); + IDrawing drawing = ws.CreateDrawingPatriarch(); + IClientAnchor anchor = new XSSFClientAnchor(dx1 * XSSFShape.EMU_PER_PIXEL, dy1 * XSSFShape.EMU_PER_POINT, dx2 * XSSFShape.EMU_PER_PIXEL, dy2 * XSSFShape.EMU_PER_POINT, col1, row1, col2, row2); + IDrawing patriarch = ws.CreateDrawingPatriarch(); + IPicture pict = (XSSFPicture)patriarch.CreatePicture(anchor, pictureIdx); + pict.Resize(w, h); + } /// /// 鑾峰彇鏌愪竴鍒楃殑鎵鏈夊 /// diff --git a/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/TrustBatchManage.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/TrustBatchManage.aspx.cs index 1f36010..85097e1 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/TrustBatchManage.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/TrustBatchManage.aspx.cs @@ -727,6 +727,9 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage XSSFWorkbook hssfworkbook = new XSSFWorkbook(); XSSFSheet ws = new XSSFSheet(); string trustBatchId = this.tvControlItem.SelectedNodeID; + + + //澶撮儴 var listStr = new List(); listStr.Add(new SqlParameter("@TrustBatchId", trustBatchId)); @@ -1049,6 +1052,11 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage if (tb.Rows.Count > 0 && tbTitle.Rows.Count > 0) { + string jlAuditer = tb.Rows[0]["JLAuditID"].ToString(); + string glgsAuditer = tb.Rows[0]["GLGSAuditID"].ToString(); + var getJLInfo = BLL.Sys_UserService.GetSingtrueImageUrl(jlAuditer); + var getGLGSInfo=BLL.Sys_UserService.GetSingtrueImageUrl(glgsAuditer); + var tbNum = tb.Rows.Count; var pageNum = tbNum < 15 ? 1 @@ -1311,6 +1319,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage region = new CellRangeAddress(hb, hb, 11, 12); ws.AddMergedRegion(region); } + //灏鹃儴琛1 ws.GetRow(rowIndex + 1).GetCell(0).SetCellValue("鏂藉伐鍗曚綅"); ws.GetRow(rowIndex + 1).GetCell(2).SetCellValue("鐩戠悊鍗曚綅"); @@ -1346,7 +1355,15 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage } ws.GetRow(rowIndex + 8).GetCell(7).SetCellValue(" 骞 鏈 鏃"); ws.GetRow(rowIndex + 8).GetCell(11).SetCellValue(" 骞 鏈 鏃"); - + //鎻掑叆绛惧悕鍥剧墖 + if (!string.IsNullOrEmpty(getJLInfo.Item1)) + { + InsertImage(hssfworkbook, ws, rowIndex + 6, 2, rowIndex + 6, 4, Server.MapPath(getJLInfo.Item1), 1, 1,10); + } + if (!string.IsNullOrEmpty(getGLGSInfo.Item1)) + { + InsertImage(hssfworkbook, ws, rowIndex + 6, 5, rowIndex + 6, 6, Server.MapPath(getJLInfo.Item1), 1, 8); + } //灏鹃儴琛9 #endregion @@ -1394,7 +1411,16 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage } #region 绉佹湁鏂规硶 + private void InsertImage(XSSFWorkbook hssfworkbook, XSSFSheet ws, int row1, int col1, int row2, int col2, string img, double w, double h, int dx1 = 0, int dy1 = 0, int dx2 = 0, int dy2 = 0) + { + int pictureIdx = hssfworkbook.AddPicture(System.IO.File.ReadAllBytes(img), PictureType.PNG); + IDrawing drawing = ws.CreateDrawingPatriarch(); + IClientAnchor anchor = new XSSFClientAnchor(dx1 * XSSFShape.EMU_PER_PIXEL, dy1 * XSSFShape.EMU_PER_POINT, dx2 * XSSFShape.EMU_PER_PIXEL, dy2 * XSSFShape.EMU_PER_POINT, col1, row1, col2, row2); + IDrawing patriarch = ws.CreateDrawingPatriarch(); + IPicture pict = (XSSFPicture)patriarch.CreatePicture(anchor, pictureIdx); + pict.Resize(w, h); + } /// /// 鑾峰彇鏌愪竴鍒楃殑鎵鏈夊 /// diff --git a/HJGL/FineUIPro.Web/common/SysManage/UserListEdit.aspx b/HJGL/FineUIPro.Web/common/SysManage/UserListEdit.aspx index 68a709b..ddb8004 100644 --- a/HJGL/FineUIPro.Web/common/SysManage/UserListEdit.aspx +++ b/HJGL/FineUIPro.Web/common/SysManage/UserListEdit.aspx @@ -8,85 +8,95 @@
- - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL/FineUIPro.Web/common/SysManage/UserListEdit.aspx.cs b/HJGL/FineUIPro.Web/common/SysManage/UserListEdit.aspx.cs index dc14f67..7a2b058 100644 --- a/HJGL/FineUIPro.Web/common/SysManage/UserListEdit.aspx.cs +++ b/HJGL/FineUIPro.Web/common/SysManage/UserListEdit.aspx.cs @@ -7,6 +7,8 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using BLL; +using Model; +using System.IO; namespace FineUIPro.Web.common.SysManage { @@ -46,7 +48,7 @@ namespace FineUIPro.Web.common.SysManage ckbRole.DataValueField = "RoleId"; ckbRole.DataSource = BLL.Sys_RoleService.GetRoleList(); ckbRole.DataBind(); - + this.ViewImage.Hidden = true; // 缁戝畾鍗曚綅 BLL.Base_UnitService.InitUnitDropDownList(drpUnit, true, null,Resources.Lan.PleaseSelect); @@ -69,6 +71,9 @@ namespace FineUIPro.Web.common.SysManage this.txtUserName.Text = user.UserName; this.txtAccount.Text = user.Account; this.txtDepart.Text = user.Depart; + this.ViewImage.Hidden = false; + this.ViewImage.ImageUrl = user.SigntrueImage; + this.hidUrl.Text = user.SigntrueImage; this.txtEmail.Text = user.Email; this.txtEmailPassword.Text = user.EmailPassword; if (user.IsPost.HasValue) @@ -94,6 +99,34 @@ namespace FineUIPro.Web.common.SysManage btnClose.OnClientClick = ActiveWindow.GetHideReference(); } + protected void imgbtnImport_Click(object sender, EventArgs e) + { + if (this.FileExcel.HasFile == false) + { + ShowNotify("璇蜂笂浼犻檮浠跺浘鐗!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.FileExcel.FileName).ToString().Trim().ToLower(); + if (IsXls != ".jpg" && IsXls != ".png") + { + ShowNotify("鍙兘涓婁紶JGP鎴栬匬NG鏍煎紡鍥剧墖!", MessageBoxIcon.Warning); + return; + } + string rootPath = Server.MapPath("~/"); + string initFullPath = $"{rootPath}File\\Image\\"; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + string fileName = $"{Guid.NewGuid().ToString()}{Path.GetExtension(this.FileExcel.FileName).ToString()}"; + string filePath = $"{initFullPath}{fileName}"; + //鏂囦欢涓婁紶鏈嶅姟鍣 + this.FileExcel.PostedFile.SaveAs(filePath); + this.hidUrl.Text = $"/File/Image/{fileName}"; + this.ViewImage.ImageUrl = this.hidUrl.Text; + this.ViewImage.Hidden = false; + ShowNotify("涓婁紶鎴愬姛", MessageBoxIcon.Success); + } /// /// 淇濆瓨鎸夐挳 /// @@ -127,6 +160,8 @@ namespace FineUIPro.Web.common.SysManage newUser.IsPost = cbIsPost.Checked; newUser.RoleIds = String.Join("|", ddbRole.Values); + newUser.SigntrueImage = this.hidUrl.Text == null ? "" : this.hidUrl.Text; + newUser.Email = this.txtEmail.Text.Trim(); if (!String.IsNullOrEmpty(this.txtEmailPassword.Text.Trim())) { diff --git a/HJGL/FineUIPro.Web/common/SysManage/UserListEdit.aspx.designer.cs b/HJGL/FineUIPro.Web/common/SysManage/UserListEdit.aspx.designer.cs index 65581af..8eba8c5 100644 --- a/HJGL/FineUIPro.Web/common/SysManage/UserListEdit.aspx.designer.cs +++ b/HJGL/FineUIPro.Web/common/SysManage/UserListEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.common.SysManage { - - - public partial class UserListEdit { - +namespace FineUIPro.Web.common.SysManage +{ + + + public partial class UserListEdit + { + /// /// form1 鎺т欢銆 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 鎺т欢銆 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 鎺т欢銆 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtUserName 鎺т欢銆 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.TextBox txtUserName; - + /// /// txtAccount 鎺т欢銆 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.TextBox txtAccount; - + /// /// ddbRole 鎺т欢銆 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.DropDownBox ddbRole; - + /// /// SimpleForm3 鎺т欢銆 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.SimpleForm SimpleForm3; - + /// /// Label2 鎺т欢銆 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.Label Label2; - + /// /// ckbRole 鎺т欢銆 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.CheckBoxList ckbRole; - + /// /// txtUserCode 鎺т欢銆 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.TextBox txtUserCode; - + /// /// drpUnit 鎺т欢銆 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.DropDownList drpUnit; - + /// /// txtDepart 鎺т欢銆 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.TextBox txtDepart; - + /// /// txtEmail 鎺т欢銆 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.TextBox txtEmail; - + /// /// txtEmailPassword 鎺т欢銆 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.TextBox txtEmailPassword; - + /// /// cbIsPost 鎺т欢銆 /// @@ -146,7 +148,43 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.CheckBox cbIsPost; - + + /// + /// FileExcel 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.FileUpload FileExcel; + + /// + /// imgbtnImport 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.Button imgbtnImport; + + /// + /// hidUrl 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.HiddenField hidUrl; + + /// + /// ViewImage 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.Image ViewImage; + /// /// Toolbar1 鎺т欢銆 /// @@ -155,7 +193,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// btnSave 鎺т欢銆 /// @@ -164,7 +202,7 @@ namespace FineUIPro.Web.common.SysManage { /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 /// protected global::FineUIPro.Button btnSave; - + /// /// btnClose 鎺т欢銆 /// diff --git a/HJGL/Model/Model.cs b/HJGL/Model/Model.cs index f4b09f4..12f69ba 100644 --- a/HJGL/Model/Model.cs +++ b/HJGL/Model/Model.cs @@ -29,10 +29,6 @@ namespace Model #region 鍙墿灞曟ф柟娉曞畾涔 partial void OnCreated(); - partial void OnCreated() - { - this.CommandTimeout = 600; - } partial void InsertAttachFile(AttachFile instance); partial void UpdateAttachFile(AttachFile instance); partial void DeleteAttachFile(AttachFile instance); @@ -31471,6 +31467,8 @@ namespace Model private System.Nullable _LockTime; + private string _SigntrueImage; + private EntitySet _FileControl_CompanyStandards; private EntitySet _FileControl_DomesticLawsRegulations; @@ -31539,6 +31537,8 @@ namespace Model partial void OnErrorNumChanged(); partial void OnLockTimeChanging(System.Nullable value); partial void OnLockTimeChanged(); + partial void OnSigntrueImageChanging(string value); + partial void OnSigntrueImageChanged(); #endregion public Sys_User() @@ -31985,6 +31985,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SigntrueImage", DbType="NVarChar(255)")] + public string SigntrueImage + { + get + { + return this._SigntrueImage; + } + set + { + if ((this._SigntrueImage != value)) + { + this.OnSigntrueImageChanging(value); + this.SendPropertyChanging(); + this._SigntrueImage = value; + this.SendPropertyChanged("SigntrueImage"); + this.OnSigntrueImageChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_FileControl_CompanyStandards_Sys_User", Storage="_FileControl_CompanyStandards", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet FileControl_CompanyStandards { diff --git a/HJGL/Model/ViewModels/TestPackageInfoViewModel.cs b/HJGL/Model/ViewModels/TestPackageInfoViewModel.cs index 2ab89b3..780a569 100644 --- a/HJGL/Model/ViewModels/TestPackageInfoViewModel.cs +++ b/HJGL/Model/ViewModels/TestPackageInfoViewModel.cs @@ -44,6 +44,9 @@ namespace Model.ViewModels /// 璇曢獙鏂瑰紡 /// public string TestType { get; set; } - + /// + /// 瀹℃牳浜 + /// + public string Auditer { get; set; } } }