20230708修改本部项目下拉框只读问题,考勤二次写入方法优化

This commit is contained in:
2023-07-08 09:58:44 +08:00
parent 70a51ab125
commit a322a2fa62
4 changed files with 44 additions and 70 deletions
-65
View File
@@ -1,65 +0,0 @@
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 BLL.ServerService.GetCNCECToken() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 32
在 BLL.ServerService.GetToken() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 85
在 BLL.ServerService.PushCNCEC(String JsonBody, String apiurl) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 58
在 BLL.HSSEData_HSSEService.PushCNCEC(String Id) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\HSSEData_HSSEService.cs:行号 517
在 FineUIPro.Web.ZHGL.DataSync.HSSEData_HSSEEdit.btnSyn_Click(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\ZHGL\DataSync\HSSEData_HSSEEdit.aspx.cs:行号 516
在 FineUIPro.Button.OnClick(EventArgs e)
在 (Button , EventArgs )
在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:07/05/2023 09:52:50
出错文件:http://localhost:2146/ZHGL/DataSync/HSSEData_HSSEEdit.aspx?Id=0925a698-9188-455c-8b86-32e3b1e88680
IP地址:::1
操作人员:JT
出错时间:07/05/2023 09:52:50
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 BLL.ServerService.GetCNCECToken() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 32
在 BLL.ServerService.GetToken() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 85
在 BLL.ServerService.PushCNCEC(String JsonBody, String apiurl) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 58
在 BLL.HSSEData_HSSEService.PushCNCEC(String Id) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\HSSEData_HSSEService.cs:行号 517
在 FineUIPro.Web.ZHGL.DataSync.HSSEData_HSSEEdit.btnSyn_Click(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\ZHGL\DataSync\HSSEData_HSSEEdit.aspx.cs:行号 516
在 FineUIPro.Button.OnClick(EventArgs e)
在 (Button , EventArgs )
在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:07/05/2023 10:00:45
出错文件:http://localhost:2146/ZHGL/DataSync/HSSEData_HSSEEdit.aspx?Id=0925a698-9188-455c-8b86-32e3b1e88680
IP地址:::1
操作人员:JT
出错时间:07/05/2023 10:00:45
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 FineUIPro.Web.SysManage.SysConstSet.btnApply_Click(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\SysManage\SysConstSet.aspx.cs:行号 972
在 FineUIPro.Button.OnClick(EventArgs e)
在 (Button , EventArgs )
在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:07/05/2023 10:05:10
出错文件:http://localhost:2146/SysManage/SysConstSet.aspx
IP地址:::1
操作人员:JT
出错时间:07/05/2023 10:05:10
+1 -1
View File
@@ -13943,7 +13943,7 @@
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:2146/</IISUrl>
<IISUrl>http://localhost:10703/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
@@ -1,6 +1,9 @@
using BLL;
using FineUIPro.Web.DataShow;
using Model;
using System;
using System.Linq;
using System.Runtime.InteropServices.ComTypes;
using System.Text;
using AspNet = System.Web.UI.WebControls;
@@ -327,15 +330,48 @@ namespace FineUIPro.Web.HSSE.SitePerson
protected void btnInRealName_Click(object sender, EventArgs e)
{
foreach (var item in Grid1.Rows)
int count = 0;
IQueryable<Model.SitePerson_PersonInOut> getDataList = Funs.DB.SitePerson_PersonInOut.Where(x => x.ProjectId == this.CurrUser.LoginProjectId);
if (this.rbInOutWay.SelectedValue != "0")
{
var getInOut = Funs.DB.SitePerson_PersonInOut.FirstOrDefault(x => x.PersonInOutId == item.RowID);
getDataList = getDataList.Where(x => x.InOutWay == this.rbInOutWay.SelectedValue);
}
if (!string.IsNullOrEmpty(this.drpUnit.SelectedValue) && this.drpUnit.SelectedValue != Const._Null)
{
getDataList = getDataList.Where(x => x.UnitId == this.drpUnit.SelectedValue);
}
if (!string.IsNullOrEmpty(this.txtPersonName.Text))
{
getDataList = getDataList.Where(x => x.PersonName.Contains(this.txtPersonName.Text.Trim()));
}
if (!string.IsNullOrEmpty(this.txtIdCard.Text))
{
getDataList = getDataList.Where(x => x.IdentityCard.Contains(this.txtIdCard.Text.Trim()));
}
DateTime? startDate = Funs.GetNewDateTime(this.txtStartDate.Text);
DateTime? endDate = Funs.GetNewDateTime(this.txtEndDate.Text);
if (startDate.HasValue)
{
getDataList = getDataList.Where(x => x.ChangeTime >= startDate);
}
if (endDate.HasValue)
{
getDataList = getDataList.Where(x => x.ChangeTime <= endDate);
}
foreach (var item in getDataList)
{
var getInOut = Funs.DB.SitePerson_PersonInOut.FirstOrDefault(x => x.PersonInOutId == item.PersonInOutId);
if (getInOut != null)
{
getInOut.PersonInOutId = SQLHelper.GetNewID();
item.PersonInOutId = SQLHelper.GetNewID();
PersonInOutService.InsertPersonInOutNowNow(getInOut);
count++;
}
}
Alert.ShowInTop("写入考勤" + count.ToString() + "条。", MessageBoxIcon.Success);
}
}
}
+4 -1
View File
@@ -53,7 +53,10 @@ namespace FineUIPro.Web
if (!IsPostBack)
{
//this.CurrUser.LoginProjectId = null;
if (this.CurrUser != null)
{
this.CurrUser.LoginProjectId = null;
}
}
}