This commit is contained in:
高飞 2025-12-06 16:13:02 +08:00
commit 264b9548b2
2 changed files with 14 additions and 9 deletions

View File

@ -97,14 +97,17 @@ namespace BLL
newWelder.IsOAM = welder.IsOAM; newWelder.IsOAM = welder.IsOAM;
db.SubmitChanges(); db.SubmitChanges();
var pw = from x in db.Project_Welder if (!string.IsNullOrEmpty(newWelder.PhotoUrl))
where x.WED_ID == welder.WED_ID
select x;
foreach(var w in pw)
{ {
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();

View File

@ -410,14 +410,16 @@
// 清空文件上传组件 // 清空文件上传组件
filePhoto1.Reset(); filePhoto1.Reset();
var welder = Funs.DB.HJGL_BS_Welder.FirstOrDefault(x=>x.WED_ID== WED_ID); var welder = Funs.DB.HJGL_BS_Welder.FirstOrDefault(x => x.WED_ID == WED_ID);
welder.PhotoUrl = imgPhoto1.ImageUrl.Replace("~", ""); welder.PhotoUrl = imgPhoto1.ImageUrl.Replace("~", "");
var pw = Funs.DB.Project_Welder.Where(x => x.WED_ID == WED_ID); 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; w.ExchangeTime = DateTime.Now;
} }
Funs.DB.SubmitChanges(); Funs.DB.SubmitChanges();
//Alert.ShowInParent(PersonFace(welder), MessageBoxIcon.Warning); //Alert.ShowInParent(PersonFace(welder), MessageBoxIcon.Warning);
Alert.ShowInParent("上传成功!", MessageBoxIcon.Success); Alert.ShowInParent("上传成功!", MessageBoxIcon.Success);