From 34455c007d7ca2025aa9a3d3babc2733c48c8f5c Mon Sep 17 00:00:00 2001 From: 10191 <506754232@qq.com> Date: Thu, 4 Dec 2025 20:47:53 +0800 Subject: [PATCH] 11 --- .../HJGL/PersonManage/HJGL_PersonManageService.cs | 15 +++++++++------ .../common/WelderManage/WelderSave.aspx.cs | 8 +++++--- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/HJGL_DS/BLL/HJGL/PersonManage/HJGL_PersonManageService.cs b/HJGL_DS/BLL/HJGL/PersonManage/HJGL_PersonManageService.cs index 4c714ba..bc782d9 100644 --- a/HJGL_DS/BLL/HJGL/PersonManage/HJGL_PersonManageService.cs +++ b/HJGL_DS/BLL/HJGL/PersonManage/HJGL_PersonManageService.cs @@ -97,14 +97,17 @@ namespace BLL newWelder.IsOAM = welder.IsOAM; db.SubmitChanges(); - var pw = from x in db.Project_Welder - where x.WED_ID == welder.WED_ID - select x; - foreach(var w in pw) + if (!string.IsNullOrEmpty(newWelder.PhotoUrl)) { - w.ExchangeTime = DateTime.Now; + var pw = from x in db.Project_Welder + where x.WED_ID == welder.WED_ID + select x; + foreach (var w in pw) + { + w.ExchangeTime = DateTime.Now; + } + db.SubmitChanges(); } - db.SubmitChanges(); diff --git a/HJGL_DS/FineUIPro.Web/common/WelderManage/WelderSave.aspx.cs b/HJGL_DS/FineUIPro.Web/common/WelderManage/WelderSave.aspx.cs index eedc448..83c2a9e 100644 --- a/HJGL_DS/FineUIPro.Web/common/WelderManage/WelderSave.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/common/WelderManage/WelderSave.aspx.cs @@ -410,14 +410,16 @@ // 清空文件上传组件 filePhoto1.Reset(); - var welder = Funs.DB.HJGL_BS_Welder.FirstOrDefault(x=>x.WED_ID== WED_ID); - welder.PhotoUrl = imgPhoto1.ImageUrl.Replace("~", ""); + var welder = Funs.DB.HJGL_BS_Welder.FirstOrDefault(x => x.WED_ID == WED_ID); + welder.PhotoUrl = imgPhoto1.ImageUrl.Replace("~", ""); + var pw = Funs.DB.Project_Welder.Where(x => x.WED_ID == WED_ID); - foreach(var w in pw) + foreach (var w in pw) { w.ExchangeTime = DateTime.Now; } Funs.DB.SubmitChanges(); + //Alert.ShowInParent(PersonFace(welder), MessageBoxIcon.Warning); Alert.ShowInParent("上传成功!", MessageBoxIcon.Success);