This commit is contained in:
2026-09-22 10:08:42 +08:00
parent 13b8bbf2fe
commit a9f54cdeb7
7 changed files with 104 additions and 4 deletions
@@ -0,0 +1,2 @@
alter table HJGL_BS_Welder add IsSelfCreate bit null
GO
@@ -52,7 +52,7 @@ namespace BLL
newWelder.ProjectId = welder.ProjectId;
newWelder.IdentityCard = welder.IdentityCard;
newWelder.SignatureUrl = welder.SignatureUrl;
newWelder.IsSelfCreate = welder.IsSelfCreate;
newWelder.MaxHanTiao = welder.MaxHanTiao;
newWelder.MaxWeldingWire = welder.MaxWeldingWire;
@@ -95,6 +95,7 @@ namespace BLL
newWelder.MaxHanTiao = welder.MaxHanTiao;
newWelder.MaxWeldingWire = welder.MaxWeldingWire;
newWelder.IsOAM = welder.IsOAM;
newWelder.IsSelfCreate = welder.IsSelfCreate;
if (!string.IsNullOrEmpty(welder.PhotoUrl) && newWelder.PhotoUrl != welder.PhotoUrl)
{
newWelder.PhotoUrl = welder.PhotoUrl;
+1
View File
@@ -340,6 +340,7 @@
newWelder.MaxHanTiao = q.MID_HanTiao;
newWelder.MaxWeldingWire = q.MID_WeldingWire;
newWelder.IsOAM = true;
newWelder.IsSelfCreate = q.IsSelfCreate;
if (s.Count() > 0)
{
newWelder.WED_ID = s.First().WED_ID;
@@ -60,6 +60,8 @@
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:Button ID="btnSync" Text="同步" Icon="PackageIn" runat="server" OnClick="btnSync_Click" ToolTip="从OA同步焊工信息及焊工合格项目">
</f:Button>
<f:Button ID="btnSync2" Text="同步2" Icon="PackageIn" runat="server" OnClick="btnSync2_Click" ToolTip="从OA同步焊工信息及焊工合格项目" Hidden="true">
</f:Button>
<f:Button ID="btnNew" Text="增加" Icon="Add" runat="server" OnClick="btnNew_Click" Hidden="true">
</f:Button>
<f:Button ID="btnIn" Text="导入" Icon="PackageIn" runat="server" OnClick="btnIn_Click" Hidden="true">
@@ -158,6 +158,42 @@ namespace FineUIPro.Web.Welder
}
#endregion
protected void btnSync2_Click(object sender, EventArgs e)
{
var welders = from x in Funs.DB.OAM_User select x;
foreach (var q in welders)
{
var s = from x in Funs.DB.HJGL_BS_Welder where x.IdentityCard == q.MID_IdentityCard select x;
var u = BLL.Base_UnitService.GetUnit2(q.MID_Unit);
if (u != null)
{
Model.HJGL_BS_Welder newWelder = new Model.HJGL_BS_Welder();
newWelder.WED_Code = q.MID_Code;
newWelder.WED_Name = q.MID_Name;
newWelder.WED_Unit = u.UnitId;
newWelder.WED_Sex = q.MID_Sex;
newWelder.IdentityCard = q.MID_IdentityCard;
newWelder.WED_WorkCode = q.MID_WordCode;
newWelder.WED_IfOnGuard = q.MID_IfOnGuard;
newWelder.WED_Remark = q.MID_Remark;
newWelder.MaxHanTiao = q.MID_HanTiao;
newWelder.MaxWeldingWire = q.MID_WeldingWire;
newWelder.IsOAM = true;
newWelder.IsSelfCreate = q.IsSelfCreate;
if (s.Count() > 0)
{
newWelder.WED_ID = s.First().WED_ID;
BLL.HJGL_PersonManageService.UpdateBSWelder(newWelder);
}
else
{
BLL.HJGL_PersonManageService.AddBSWelder(newWelder);
}
}
}
}
protected void btnSync_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.Welder_WelderMenuId, Const.BtnSync))
@@ -203,6 +239,7 @@ namespace FineUIPro.Web.Welder
newWelder.MaxHanTiao = q.MID_HanTiao;
newWelder.MaxWeldingWire = q.MID_WeldingWire;
newWelder.IsOAM = true;
newWelder.IsSelfCreate = q.IsSelfCreate;
if (s.Count() > 0)
{
a++;
@@ -241,7 +278,7 @@ namespace FineUIPro.Web.Welder
{
if (!string.IsNullOrEmpty(q.MIDWelder_QualifiedProjectCode))
{
if (q.MIDWelder_QualifiedProjectCode.Contains("+") || q.MIDWelder_QualifiedProjectCode.Contains("+")|| q.MIDWelder_QualifiedProjectCode.Contains("和"))
if (q.MIDWelder_QualifiedProjectCode.Contains("+") || q.MIDWelder_QualifiedProjectCode.Contains("+") || q.MIDWelder_QualifiedProjectCode.Contains("和"))
{
string[] codes = null;
if (q.MIDWelder_QualifiedProjectCode.Contains("+"))
@@ -747,7 +784,7 @@ namespace FineUIPro.Web.Welder
{
foreach (var q in quas)
{
if (q.MIDWelder_QualifiedProjectCode.Contains("+") || q.MIDWelder_QualifiedProjectCode.Contains("+")|| q.MIDWelder_QualifiedProjectCode.Contains("和"))
if (q.MIDWelder_QualifiedProjectCode.Contains("+") || q.MIDWelder_QualifiedProjectCode.Contains("+") || q.MIDWelder_QualifiedProjectCode.Contains("和"))
{
string[] codes = null;
if (q.MIDWelder_QualifiedProjectCode.Contains("+"))
@@ -983,7 +1020,7 @@ namespace FineUIPro.Web.Welder
this.InitTreeMenu();
this.BindGrid();
}
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
@@ -165,6 +165,15 @@ namespace FineUIPro.Web.Welder {
/// </remarks>
protected global::FineUIPro.Button btnSync;
/// <summary>
/// btnSync2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSync2;
/// <summary>
/// btnNew 控件。
/// </summary>
+48
View File
@@ -26469,6 +26469,8 @@ namespace Model
private string _PhotoUrl;
private System.Nullable<bool> _IsSelfCreate;
private EntitySet<HJGL_BO_Batch> _HJGL_BO_Batch;
private EntitySet<HJGL_BO_PreWeldReportMain> _HJGL_BO_PreWeldReportMain;
@@ -26585,6 +26587,8 @@ namespace Model
partial void OnMaxHanTiaoChanged();
partial void OnPhotoUrlChanging(string value);
partial void OnPhotoUrlChanged();
partial void OnIsSelfCreateChanging(System.Nullable<bool> value);
partial void OnIsSelfCreateChanged();
#endregion
public HJGL_BS_Welder()
@@ -27431,6 +27435,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsSelfCreate", DbType="Bit")]
public System.Nullable<bool> IsSelfCreate
{
get
{
return this._IsSelfCreate;
}
set
{
if ((this._IsSelfCreate != value))
{
this.OnIsSelfCreateChanging(value);
this.SendPropertyChanging();
this._IsSelfCreate = value;
this.SendPropertyChanged("IsSelfCreate");
this.OnIsSelfCreateChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_BO_Batch_HJGL_BS_Welder", Storage="_HJGL_BO_Batch", ThisKey="WED_ID", OtherKey="WED_ID", DeleteRule="NO ACTION")]
public EntitySet<HJGL_BO_Batch> HJGL_BO_Batch
{
@@ -102588,6 +102612,8 @@ namespace Model
private System.Nullable<bool> _IsUsed;
private System.Nullable<bool> _IsSelfCreate;
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -102618,6 +102644,8 @@ namespace Model
partial void OnMID_HanTiaoChanged();
partial void OnIsUsedChanging(System.Nullable<bool> value);
partial void OnIsUsedChanged();
partial void OnIsSelfCreateChanging(System.Nullable<bool> value);
partial void OnIsSelfCreateChanged();
#endregion
public OAM_User()
@@ -102885,6 +102913,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsSelfCreate", DbType="Bit")]
public System.Nullable<bool> IsSelfCreate
{
get
{
return this._IsSelfCreate;
}
set
{
if ((this._IsSelfCreate != value))
{
this.OnIsSelfCreateChanging(value);
this.SendPropertyChanging();
this._IsSelfCreate = value;
this.SendPropertyChanged("IsSelfCreate");
this.OnIsSelfCreateChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;