This commit is contained in:
佘春生 2024-06-25 09:20:28 +08:00
commit 2c5c320c52
14 changed files with 352 additions and 148 deletions

View File

@ -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

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>

View File

@ -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);
}
/// <summary>
/// Óû§µÇ½·½·¨
/// </summary>
@ -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))
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

View File

@ -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;
}
/// <summary>
/// 查询指定条数分页
/// </summary>

View File

@ -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);
}
/// <summary>
/// 获取某一列的所有值
/// </summary>

View File

@ -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<SqlParameter>();
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);
}
/// <summary>
/// 获取某一列的所有值
/// </summary>

View File

@ -8,85 +8,95 @@
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtUserName" runat="server" Label="姓名" Required="true" ShowRedStar="true" FocusOnPageLoad="true">
</f:TextBox>
</Items>
<Items>
<f:TextBox ID="txtAccount" runat="server" Label="账号" Required="true" ShowRedStar="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtUserName" runat="server" Label="姓名" Required="true" ShowRedStar="true" FocusOnPageLoad="true">
</f:TextBox>
</Items>
<Items>
<f:TextBox ID="txtAccount" runat="server" Label="账号" Required="true" ShowRedStar="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownBox runat="server" Label="角色" ID="ddbRole" DataControlID="ckbRole" EnableMultiSelect="true" >
<PopPanel>
<f:SimpleForm ID="SimpleForm3" BodyPadding="10px" runat="server" AutoScroll="true"
ShowBorder="True" ShowHeader="false" Hidden="true">
<Items>
<f:Label ID="Label2" runat="server" Text="请选择用户角色(可有多个角色):"></f:Label>
<f:CheckBoxList ID="ckbRole" ColumnNumber="3" runat="server">
</f:CheckBoxList>
</Items>
</f:SimpleForm>
</PopPanel>
</f:DropDownBox>
<f:FormRow>
<Items>
<f:DropDownBox runat="server" Label="角色" ID="ddbRole" DataControlID="ckbRole" EnableMultiSelect="true">
<PopPanel>
<f:SimpleForm ID="SimpleForm3" BodyPadding="10px" runat="server" AutoScroll="true"
ShowBorder="True" ShowHeader="false" Hidden="true">
<Items>
<f:Label ID="Label2" runat="server" Text="请选择用户角色(可有多个角色):"></f:Label>
<f:CheckBoxList ID="ckbRole" ColumnNumber="3" runat="server">
</f:CheckBoxList>
</Items>
</f:SimpleForm>
</PopPanel>
</f:DropDownBox>
</Items>
<Items>
<f:TextBox ID="txtUserCode" runat="server" Label="编号" >
</f:TextBox>
</Items>
</f:FormRow>
</Items>
<Items>
<f:TextBox ID="txtUserCode" runat="server" Label="编号">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpUnit" runat="server" Label="单位" EnableEdit="true" EnableGroup="true"
ForceSelection="true" Required="true" ShowRedStar="true">
</f:DropDownList>
</Items>
<Items>
<f:TextBox ID="txtDepart" runat="server" Label="部门" >
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtEmail" runat="server" Label="电子邮箱" RegexPattern="EMAIL" >
</f:TextBox>
</Items>
<Items>
<f:TextBox ID="txtEmailPassword" runat="server" Label="邮箱密码" TextMode="Password">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpUnit" runat="server" Label="单位" EnableEdit="true" EnableGroup="true"
ForceSelection="true" Required="true" ShowRedStar="true">
</f:DropDownList>
</Items>
<Items>
<f:TextBox ID="txtDepart" runat="server" Label="部门">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:CheckBox ID="cbIsPost" Checked="true" Label="是否在岗" runat="server" />
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存数据" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:FormRow>
<Items>
<f:TextBox ID="txtEmail" runat="server" Label="电子邮箱" RegexPattern="EMAIL">
</f:TextBox>
</Items>
<Items>
<f:TextBox ID="txtEmailPassword" runat="server" Label="邮箱密码" TextMode="Password">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:CheckBox ID="cbIsPost" Checked="true" Label="是否在岗" runat="server" />
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:FileUpload ID="FileExcel" runat="server" Label="签名上传" EmptyText="请上传JGP或者PNG格式图片"
Width="400px" LabelWidth="90px" LabelAlign="Right">
</f:FileUpload>
<f:Button ID="imgbtnImport" runat="server" Text="上传" ToolTip="文件上传!" OnClick="imgbtnImport_Click">
</f:Button>
<f:HiddenField ID="hidUrl" runat="server"></f:HiddenField>
<f:Image ID="ViewImage" ImageUrl="" ImageWidth="100" runat="server" Width="100"></f:Image>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存数据" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</form>
</body>
</html>

View File

@ -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);
}
/// <summary>
/// 保存按钮
/// </summary>
@ -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()))
{

View File

@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.common.SysManage {
public partial class UserListEdit {
namespace FineUIPro.Web.common.SysManage
{
public partial class UserListEdit
{
/// <summary>
/// form1 控件。
/// </summary>
@ -20,7 +22,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@ -29,7 +31,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@ -38,7 +40,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtUserName 控件。
/// </summary>
@ -47,7 +49,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtUserName;
/// <summary>
/// txtAccount 控件。
/// </summary>
@ -56,7 +58,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtAccount;
/// <summary>
/// ddbRole 控件。
/// </summary>
@ -65,7 +67,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownBox ddbRole;
/// <summary>
/// SimpleForm3 控件。
/// </summary>
@ -74,7 +76,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.SimpleForm SimpleForm3;
/// <summary>
/// Label2 控件。
/// </summary>
@ -83,7 +85,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label2;
/// <summary>
/// ckbRole 控件。
/// </summary>
@ -92,7 +94,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList ckbRole;
/// <summary>
/// txtUserCode 控件。
/// </summary>
@ -101,7 +103,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtUserCode;
/// <summary>
/// drpUnit 控件。
/// </summary>
@ -110,7 +112,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnit;
/// <summary>
/// txtDepart 控件。
/// </summary>
@ -119,7 +121,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDepart;
/// <summary>
/// txtEmail 控件。
/// </summary>
@ -128,7 +130,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEmail;
/// <summary>
/// txtEmailPassword 控件。
/// </summary>
@ -137,7 +139,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEmailPassword;
/// <summary>
/// cbIsPost 控件。
/// </summary>
@ -146,7 +148,43 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox cbIsPost;
/// <summary>
/// FileExcel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload FileExcel;
/// <summary>
/// imgbtnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button imgbtnImport;
/// <summary>
/// hidUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hidUrl;
/// <summary>
/// ViewImage 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Image ViewImage;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@ -155,7 +193,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnSave 控件。
/// </summary>
@ -164,7 +202,7 @@ namespace FineUIPro.Web.common.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>

View File

@ -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<System.DateTime> _LockTime;
private string _SigntrueImage;
private EntitySet<FileControl_CompanyStandards> _FileControl_CompanyStandards;
private EntitySet<FileControl_DomesticLawsRegulations> _FileControl_DomesticLawsRegulations;
@ -31539,6 +31537,8 @@ namespace Model
partial void OnErrorNumChanged();
partial void OnLockTimeChanging(System.Nullable<System.DateTime> 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> FileControl_CompanyStandards
{

View File

@ -44,6 +44,9 @@ namespace Model.ViewModels
/// 试验方式
/// </summary>
public string TestType { get; set; }
/// <summary>
/// 审核人
/// </summary>
public string Auditer { get; set; }
}
}