2023-03-01 合同增加主办部门

This commit is contained in:
2023-03-01 13:57:09 +08:00
parent a5f63ba887
commit 79ea15741e
38 changed files with 607 additions and 187 deletions
+93
View File
@@ -1,5 +1,6 @@
using FineUIPro;
using Microsoft.Office.Interop.Excel;
using Microsoft.Office.Interop.Word;
using Model;
using System;
using System.Collections;
@@ -812,6 +813,98 @@ namespace BLL
}
}
public static void UpdatePerson_Persons(Model.Person_Persons newtable)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Person_Persons table = db.Person_Persons.FirstOrDefault(x => x.PersonId == newtable.PersonId);
if (table != null)
{
table.PersonId = newtable.PersonId;
table.UnitId = newtable.UnitId;
table.DepartId = newtable.DepartId;
table.WorkPostId = newtable.WorkPostId;
table.JobNum = newtable.JobNum;
table.PersonName = newtable.PersonName;
table.Account = newtable.Account;
table.Password = newtable.Password;
table.IsOffice = newtable.IsOffice;
table.RoleIds = newtable.RoleIds;
table.IdentityCard = newtable.IdentityCard;
table.IdcardType = newtable.IdcardType;
table.IdcardStartDate = newtable.IdcardStartDate;
table.IdcardEndDate = newtable.IdcardEndDate;
table.IdcardForever = newtable.IdcardForever;
table.IdcardAddress = newtable.IdcardAddress;
table.Telephone = newtable.Telephone;
table.Sex = newtable.Sex;
table.Birthday = newtable.Birthday;
table.Address = newtable.Address;
table.PhotoUrl = newtable.PhotoUrl;
table.HeadImage = newtable.HeadImage;
table.QRCodeAttachUrl = newtable.QRCodeAttachUrl;
table.IDCardUrl = newtable.IDCardUrl;
table.IDCardBackUrl = newtable.IDCardBackUrl;
table.SignatureUrl = newtable.SignatureUrl;
table.IsForeign = newtable.IsForeign;
table.MaritalStatus = newtable.MaritalStatus;
table.PoliticsStatus = newtable.PoliticsStatus;
table.PostTitleId = newtable.PostTitleId;
table.PostTitleDate = newtable.PostTitleDate;
table.PositionId = newtable.PositionId;
table.Nation = newtable.Nation;
table.EduLevel = newtable.EduLevel;
table.ForeignLanguage = newtable.ForeignLanguage;
table.CountryCode = newtable.CountryCode;
table.ProvinceCode = newtable.ProvinceCode;
table.IsPost = newtable.IsPost;
table.Graduate = newtable.Graduate;
table.Major = newtable.Major;
table.IntoDate = newtable.IntoDate;
table.WorkDate = newtable.WorkDate;
table.RetirementDate = newtable.RetirementDate;
table.ValidityDate = newtable.ValidityDate;
table.OpenId = newtable.OpenId;
table.CurrentProjectId = newtable.CurrentProjectId;
table.CurrentProjectRoleId = newtable.CurrentProjectRoleId;
table.CurrentProjectWorkPostId = newtable.CurrentProjectWorkPostId;
table.LoginProjectId = newtable.LoginProjectId;
table.LastMenuType = newtable.LastMenuType;
table.LastIsOffice = newtable.LastIsOffice;
table.LastProjectId = newtable.LastProjectId;
table.DataFrom = newtable.DataFrom;
table.OldDataId = newtable.OldDataId;
table.IsCardNoOK = newtable.IsCardNoOK;
table.RelativeName = newtable.RelativeName;
table.RelativeTel = newtable.RelativeTel;
table.Email = newtable.Email;
table.CertificateId = newtable.CertificateId;
table.PersonType = newtable.PersonType;
table.MultiProject = newtable.MultiProject;
table.HomePageType = newtable.HomePageType;
if (string.IsNullOrEmpty(newtable.QRCodeAttachUrl))
{
///生成二维码
table.QRCodeAttachUrl = BLL.CreateQRCodeService.CreateCode_Simple("person$" + newtable.IdentityCard);
}
db.SubmitChanges();
}
}
}
public static void DeletePerson_PersonsById(string PersonId)
{
Model.Person_Persons table = db.Person_Persons.FirstOrDefault(x => x.PersonId == PersonId);
if (table != null)
{
db.Person_Persons.DeleteOnSubmit(table);
db.SubmitChanges();
}
}
/// <summary>
/// 更新项目人员单位
/// </summary>