This commit is contained in:
parent
4823bbf933
commit
4d00499b03
|
|
@ -1060,13 +1060,50 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||
int a = persons.Count();
|
||||
for (int i = 0; i < a; i++)
|
||||
{
|
||||
var person = Person_PersonsService.GetPerson_PersonsByIdCard(persons[i].IdentityCard);
|
||||
if (person == null)
|
||||
{
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.SitePerson_Person));
|
||||
person = new Model.Person_Persons
|
||||
{
|
||||
PersonId = newKeyID,
|
||||
PersonName = persons[i].PersonName,
|
||||
UnitId = persons[i].UnitId,
|
||||
WorkPostId = persons[i].WorkPostId,
|
||||
PersonType = "1",
|
||||
IdcardType = persons[i].IdcardType,
|
||||
IdentityCard = persons[i].IdentityCard,
|
||||
IdcardForever = persons[i].IdcardForever,
|
||||
IdcardStartDate = persons[i].IdcardStartDate,
|
||||
IdcardEndDate = persons[i].IdcardEndDate,
|
||||
IdcardAddress = persons[i].IdcardAddress,
|
||||
Telephone = persons[i].Telephone,
|
||||
Sex = persons[i].SexName == "男" ? "1" : "2",
|
||||
Birthday = persons[i].Birthday,
|
||||
//Major = this.txtMajor.Text.Trim(),
|
||||
//ForeignLanguage = this.txtForeignLanguage.Text.Trim(),
|
||||
CountryCode = persons[i].CountryCode,
|
||||
ProvinceCode = persons[i].ProvinceCode,
|
||||
Nation = persons[i].Nation,
|
||||
PoliticsStatus = persons[i].PoliticsStatus,
|
||||
EduLevel = persons[i].EduLevel,
|
||||
MaritalStatus = persons[i].MaritalStatus,
|
||||
//RelativeName = this.txtRelativeName.Text.Trim(),
|
||||
//RelativeTel = this.txtRelativeTel.Text.Trim(),
|
||||
Address = persons[i].Address,
|
||||
//RoleIds = Funs.GetStringByArray(this.drpProjectRole.SelectedValueArray),
|
||||
};
|
||||
BLL.Person_PersonsService.AddPerson(person);
|
||||
}
|
||||
|
||||
|
||||
var getPerson = SitePerson_PersonService.GetSitePersonByProjectIdIdentityCard(Request.Params["ProjectId"], persons[i].IdentityCard);
|
||||
//!BLL.PersonService.IsExistPersonByUnit(persons[i].UnitId, persons[i].IdentityCard, Request.Params["ProjectId"]) &&
|
||||
if (getPerson == null)
|
||||
{
|
||||
Model.SitePerson_Person newPerson = new Model.SitePerson_Person();
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.SitePerson_Person));
|
||||
newPerson.PersonId = newKeyID;
|
||||
newPerson.SitePersonId = SQLHelper.GetNewID();
|
||||
newPerson.PersonId = person.PersonId;
|
||||
newPerson.ProjectId = Request.Params["ProjectId"];
|
||||
newPerson.CardNo = persons[i].CardNo;
|
||||
newPerson.PersonName = persons[i].PersonName;
|
||||
|
|
|
|||
Loading…
Reference in New Issue