20230918现场当前人数统计修改
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using BLL;
|
||||
using Microsoft.Office.Core;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.SitePerson
|
||||
@@ -23,11 +23,15 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
|
||||
{
|
||||
@@ -41,34 +45,50 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
}
|
||||
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true);
|
||||
this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
#region 绑定数据
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
var getData = SitePerson_PersonService.getNowPersonListData(this.ProjectId, this.drpUnit.SelectedValue, this.drpWorkPost.SelectedValue
|
||||
, this.txtPersonName.Text.Trim(),this.txtIdcard.Text.Trim(),Funs.GetNewDateTimeOrNow(this.txtStartDate.Text), Grid1);
|
||||
, this.txtPersonName.Text.Trim(), this.txtIdcard.Text.Trim(), Funs.GetNewDateTimeOrNow(this.txtStartDate.Text), Grid1);
|
||||
Grid1.RecordCount = SitePerson_PersonService.nowCount;
|
||||
Grid1.DataSource = getData;
|
||||
Grid1.DataBind();
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页选择下拉改变事件
|
||||
|
||||
#region 分页
|
||||
/// <summary>
|
||||
/// 分页选择下拉改变事件
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
@@ -77,21 +97,40 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 页索引改变事件
|
||||
/// <summary>
|
||||
/// 页索引改变事件
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Grid编辑事件
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键编辑事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
@@ -110,7 +149,5 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
Response.End();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user