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

View File

@ -12,7 +12,7 @@
<appSettings> <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=.;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="SystemName" value="智慧施工管理信息系统V1.0"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/> <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 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"/> <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> </httpHandlers>
<compilation debug="false" targetFramework="4.6.1"/> <compilation debug="true" targetFramework="4.6.1"/>
<httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/> <httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/>
<authentication mode="Forms"> <authentication mode="Forms">
<forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/> <forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/>

View File

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