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("焊接责任工程师:\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-超声&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或者PNG格式图片!", 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 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtUserName 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtUserName; - + /// /// txtAccount 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtAccount; - + /// /// ddbRole 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownBox ddbRole; - + /// /// SimpleForm3 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.SimpleForm SimpleForm3; - + /// /// Label2 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label2; - + /// /// ckbRole 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBoxList ckbRole; - + /// /// txtUserCode 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtUserCode; - + /// /// drpUnit 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnit; - + /// /// txtDepart 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtDepart; - + /// /// txtEmail 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtEmail; - + /// /// txtEmailPassword 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtEmailPassword; - + /// /// cbIsPost 控件。 /// @@ -146,7 +148,43 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox cbIsPost; - + + /// + /// FileExcel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload FileExcel; + + /// + /// imgbtnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button imgbtnImport; + + /// + /// hidUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hidUrl; + + /// + /// ViewImage 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image ViewImage; + /// /// Toolbar1 控件。 /// @@ -155,7 +193,7 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// btnSave 控件。 /// @@ -164,7 +202,7 @@ namespace FineUIPro.Web.common.SysManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 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; } } }