This commit is contained in:
高飞 2025-08-07 11:05:21 +08:00
parent 59f3f48b55
commit bdae153c1e
7 changed files with 130 additions and 51 deletions

1
.gitignore vendored
View File

@ -31,3 +31,4 @@ bin-release/
/HJGL_DS/FineUIPro.Web/FileUpload/FaceRecognition
/HJGL_DS/WebAPI/.vs
/HJGL_DS/FineUIPro.Web/FileUpload/WeldMat/StockIn
/HJGL_DS/FineUIPro.Web/FileUpload/Common/WelderManage

View File

@ -12,7 +12,7 @@ namespace FineUIPro.Web.AttachFile
{
public partial class webuploader : PageBase
{
public string ToKeyId
{
get
@ -93,8 +93,8 @@ namespace FineUIPro.Web.AttachFile
// 删除选中行
btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!");
btnDelete.ConfirmText = String.Format("你确定要删除选中的&nbsp;<b><script>{0}</script></b>&nbsp;个文件吗?", Grid1.GetSelectedCountReference());
ToKeyId = Request.QueryString["toKeyId"];
AttachPath = Request.QueryString["path"];
MenuId = Request.QueryString["menuId"];
@ -191,9 +191,24 @@ namespace FineUIPro.Web.AttachFile
}
if (Path.GetExtension(savedName) == ".gif" || Path.GetExtension(savedName) == ".jpg" || Path.GetExtension(savedName) == ".jpeg" || Path.GetExtension(savedName) == ".bmp" || Path.GetExtension(savedName) == ".png")
{
string httpUrl = Funs.HJGLUrl + AttachPath + "\\" + savedName;
httpUrl = httpUrl.Replace('\\', '/');
ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script type='text/javascript'>window.open('" + httpUrl + "');</script>");
if (AttachPath.Contains("FileUpload/Common/WelderManage")) //焊工复印件下载文件
{
string fileName = Path.GetFileName(url);
long fileSize = info.Length;
System.Web.HttpContext.Current.Response.Clear();
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
System.Web.HttpContext.Current.Response.TransmitFile(url, 0, fileSize);
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();
}
else
{
string httpUrl = Funs.HJGLUrl + AttachPath + "\\" + savedName;
httpUrl = httpUrl.Replace('\\', '/');
ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script type='text/javascript'>window.open('" + httpUrl + "');</script>");
}
}
else
{
@ -210,12 +225,12 @@ namespace FineUIPro.Web.AttachFile
}
catch (Exception)
{
}
}
}
}
}
#endregion
@ -224,7 +239,7 @@ namespace FineUIPro.Web.AttachFile
private JArray GetSourceData()
{
if (Session[sessionName] == null)
{
var sour = from x in BLL.Funs.DB.AttachFile where x.ToKeyId == ToKeyId && x.MenuId == MenuId select x;
@ -268,7 +283,7 @@ namespace FineUIPro.Web.AttachFile
}
}
Session[sessionName] = source;
Session[sessionName] = source;
}
#endregion
@ -293,11 +308,11 @@ namespace FineUIPro.Web.AttachFile
{
attachUrl = attachUrl.Replace('/', '\\');
attachUrl = attachUrl.Substring(0, attachUrl.LastIndexOf(","));
}
}
var sour = from x in db.AttachFile where x.ToKeyId == ToKeyId select x;
if (sour.Count() == 0)
{
Model.AttachFile att = new Model.AttachFile();
att.ToKeyId = ToKeyId;
att.AttachSource = source.ToString();

View File

@ -115,3 +115,41 @@ IP地址:::1
出错时间:08/04/2025 15:24:06
错误信息开始=====>
错误类型:SqlException
错误信息:在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: SQL Network Interfaces, error: 26 - 定位指定的服务器/实例时出错)
错误堆栈:
在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
在 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
在 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
在 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
在 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
在 System.Data.SqlClient.SqlConnection.Open()
在 System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user)
在 System.Data.Linq.SqlClient.SqlProvider.get_IsSqlCe()
在 System.Data.Linq.SqlClient.SqlProvider.InitializeProviderMode()
在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
在 System.Linq.Queryable.Count[TSource](IQueryable`1 source)
在 BLL.Sys_UserService.UserLogOn(String account, String password, Boolean rememberMe, Page page) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\BLL\Common\SysManage\Sys_UserService.cs:行号 39
在 FineUIPro.Web.Login.btnLogin_Click(Object sender, EventArgs e)
在 FineUIPro.Button.OnClick(EventArgs e)
在 (Button , EventArgs )
在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:08/07/2025 10:39:13
出错文件:http://localhost:64304/Login.aspx
IP地址:::1
出错时间:08/07/2025 10:39:13

View File

@ -11,7 +11,7 @@
<FineUIPro DebugMode="false" Theme="Cupertino"/>
<appSettings>
<!--连接字符串-->
<add key="ConnectionString" value="Server=.\SQL2022;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
<add key="ConnectionString" value="Server=.\MSSQLSERVER01;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
<!--系统名称-->
<add key="SystemName" value="诺必达焊接管理系统"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>

View File

@ -84,6 +84,9 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:LinkButton ID="UploadAttach2" runat="server" Label="证件复印件" Text="上传和查看" OnClick="btnAttachUrl2_Click"
LabelAlign="Right">
</f:LinkButton>
<f:FileUpload ID="filePhoto" runat="server" ButtonText="上传电子签名" ButtonOnly="true"
AutoPostBack="true" OnFileSelected="filePhoto_FileSelected">
</f:FileUpload>
@ -134,7 +137,7 @@
EnableMaximize="true" EnableResize="true" Title="弹出框" CloseAction="HidePostBack"
EnableIFrame="true">
</f:Window>
<f:Window ID="Window2" Title="指纹登记" Hidden="true" EnableIFrame="true" EnableMaximize="true"
<f:Window ID="Window2" Title="附件上传" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="600px"
Height="640px">
</f:Window>

View File

@ -590,5 +590,20 @@
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("~/RLSB/WelderTrain.aspx?identityCard={0}", identityCard), "人脸训练", 1260, 680));
}
/// <summary>
/// 证件复印件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrl2_Click(object sender, EventArgs e)
{
string edit = "0"; // 表示能打开附件上传窗口,但不能上传附件
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PersonManageMenuId, Const.BtnSave))
{
edit = "1";
}
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Common/WelderManage&menuId={1}&edit={2}", this.WED_ID + "F", Const.HJGL_PersonManageMenuId, edit)));
}
}
}

View File

@ -7,13 +7,11 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.common.WelderManage
{
public partial class WelderSave
{
namespace FineUIPro.Web.common.WelderManage {
public partial class WelderSave {
/// <summary>
/// Style1 控件。
/// </summary>
@ -22,7 +20,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl Style1;
/// <summary>
/// form1 控件。
/// </summary>
@ -31,7 +29,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@ -40,7 +38,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@ -49,7 +47,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@ -58,7 +56,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// drpUnit 控件。
/// </summary>
@ -67,7 +65,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnit;
/// <summary>
/// txtRecordDate 控件。
/// </summary>
@ -76,7 +74,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtRecordDate;
/// <summary>
/// txtName 控件。
/// </summary>
@ -85,7 +83,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtName;
/// <summary>
/// txtCode 控件。
/// </summary>
@ -94,7 +92,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCode;
/// <summary>
/// txtBirthday 控件。
/// </summary>
@ -103,7 +101,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtBirthday;
/// <summary>
/// drpSex 控件。
/// </summary>
@ -112,7 +110,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList drpSex;
/// <summary>
/// txtWorkCode 控件。
/// </summary>
@ -121,7 +119,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtWorkCode;
/// <summary>
/// txtLimitDate 控件。
/// </summary>
@ -130,7 +128,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtLimitDate;
/// <summary>
/// txtClass 控件。
/// </summary>
@ -139,7 +137,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtClass;
/// <summary>
/// drpIfOnGuard 控件。
/// </summary>
@ -148,7 +146,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox drpIfOnGuard;
/// <summary>
/// txtIdentityCard 控件。
/// </summary>
@ -157,7 +155,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtIdentityCard;
/// <summary>
/// btnQR 控件。
/// </summary>
@ -166,7 +164,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQR;
/// <summary>
/// btnSee 控件。
/// </summary>
@ -175,7 +173,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSee;
/// <summary>
/// txtRemark 控件。
/// </summary>
@ -184,7 +182,16 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtRemark;
/// <summary>
/// UploadAttach2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.LinkButton UploadAttach2;
/// <summary>
/// filePhoto 控件。
/// </summary>
@ -193,7 +200,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload filePhoto;
/// <summary>
/// imgPhoto 控件。
/// </summary>
@ -202,7 +209,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Image imgPhoto;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@ -211,7 +218,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// lbWelderRead 控件。
/// </summary>
@ -220,7 +227,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button lbWelderRead;
/// <summary>
/// btnWelderFaceRead 控件。
/// </summary>
@ -229,7 +236,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnWelderFaceRead;
/// <summary>
/// btnSave 控件。
/// </summary>
@ -238,7 +245,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// Panel5 控件。
/// </summary>
@ -247,7 +254,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel5;
/// <summary>
/// imgPhoto1 控件。
/// </summary>
@ -256,7 +263,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Image imgPhoto1;
/// <summary>
/// filePhoto1 控件。
/// </summary>
@ -265,7 +272,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload filePhoto1;
/// <summary>
/// Window1 控件。
/// </summary>
@ -274,7 +281,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
@ -283,7 +290,7 @@ namespace FineUIPro.Web.common.WelderManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// Window3 控件。
/// </summary>