This commit is contained in:
高飞 2024-07-10 16:54:30 +08:00
commit 0a8a11e445
3 changed files with 32 additions and 32 deletions

View File

@ -125,7 +125,7 @@ namespace BLL
if (type == "0")
{
//isOk = AddPerson(projectId, arr, sysUser);
isOk = AddPerson(projectId, arr, sysUser);
}
else if (type == "1")
{
@ -216,7 +216,7 @@ namespace BLL
try
{
List<Model.Bo_Sheng_Person> insertPersons = new List<Model.Bo_Sheng_Person>();
List<Model.SitePerson_Person> insertSitePersons = new List<Model.SitePerson_Person>();
//List<Model.SitePerson_Person> insertSitePersons = new List<Model.SitePerson_Person>();
foreach (var item in arr)
{
string getID = item["ID"].ToString();
@ -292,39 +292,39 @@ namespace BLL
db.SubmitChanges();
}
}
var getSitePerson = db.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == item["IdentifyID"].ToString());
if (!string.IsNullOrEmpty(getID))
{
if (getSitePerson == null)
{
Model.SitePerson_Person newPerson = new Model.SitePerson_Person
{
PersonId = SQLHelper.GetNewID(),
ProjectId = projectId,
PersonName = item["Name"].ToString(),
Sex = item["Sex"].ToString(),
Birthday = Funs.GetNewDateTime(item["BirthDay"].ToString()),
Address = item["Address"].ToString(),
Nation = item["Nation"].ToString(),
IdentityCard = item["IdentifyID"].ToString(),
UnitId = BLL.UnitService.GetUnitIdByUnitName(item["DepartName"].ToString()),
Telephone = item["Telephone"].ToString(),
MaritalStatus = item["MaritalStatus"].ToString(),
};
insertSitePersons.Add(newPerson);
}
}
//var getSitePerson = db.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == item["IdentifyID"].ToString());
//if (!string.IsNullOrEmpty(getID))
//{
// if (getSitePerson == null)
// {
// Model.SitePerson_Person newPerson = new Model.SitePerson_Person
// {
// PersonId = SQLHelper.GetNewID(),
// ProjectId = projectId,
// PersonName = item["Name"].ToString(),
// Sex = item["Sex"].ToString(),
// Birthday = Funs.GetNewDateTime(item["BirthDay"].ToString()),
// Address = item["Address"].ToString(),
// Nation = item["Nation"].ToString(),
// IdentityCard = item["IdentifyID"].ToString(),
// UnitId = BLL.UnitService.GetUnitIdByUnitName(item["DepartName"].ToString()),
// Telephone = item["Telephone"].ToString(),
// MaritalStatus = item["MaritalStatus"].ToString(),
// };
// insertSitePersons.Add(newPerson);
// }
//}
if (insertPersons.Count() > 0)
{
db.Bo_Sheng_Person.InsertAllOnSubmit(insertPersons);
db.SubmitChanges();
}
if (insertSitePersons.Count() > 0)
{
db.SitePerson_Person.InsertAllOnSubmit(insertSitePersons);
db.SubmitChanges();
}
//if (insertSitePersons.Count() > 0)
//{
// db.SitePerson_Person.InsertAllOnSubmit(insertSitePersons);
// db.SubmitChanges();
//}
}
}
catch (Exception ex)

View File

@ -12,7 +12,7 @@
<appSettings>
<!--连接字符串-->
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<!--系统名称-->
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
@ -77,7 +77,7 @@
<add verb="GET" path="res.axd" type="FineUIPro.ResourceHandler, FineUIPro" validate="false"/>
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<compilation debug="false" targetFramework="4.6.1"/>
<compilation debug="true" targetFramework="4.6.1"/>
<httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />