20230918现场当前人数统计修改

This commit is contained in:
2023-09-18 16:38:55 +08:00
parent 33be5980fc
commit 8ff01fdd35
4 changed files with 91 additions and 99 deletions
@@ -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
}
}