20211202 与集团安全信息报表及检查对接接口实现
This commit is contained in:
@@ -11,7 +11,6 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// 表头过滤
|
||||
FilterDataRowItem = FilterDataRowItemImplement;
|
||||
if (!IsPostBack)
|
||||
{
|
||||
// 绑定表格
|
||||
@@ -25,7 +24,7 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = "select * from View_ProjectData_FlowOperate where DataId=@DataId order by SortIndex desc";
|
||||
SqlParameter[] parameter = new SqlParameter[]
|
||||
SqlParameter[] parameter = new SqlParameter[]
|
||||
{
|
||||
new SqlParameter("@DataId",Request.Params["Id"]),
|
||||
};
|
||||
@@ -34,59 +33,13 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据表头信息过滤列表数据
|
||||
/// <summary>
|
||||
/// 过滤表头
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据表头信息过滤列表数据
|
||||
/// </summary>
|
||||
/// <param name="sourceObj"></param>
|
||||
/// <param name="fillteredOperator"></param>
|
||||
/// <param name="fillteredObj"></param>
|
||||
/// <param name="column"></param>
|
||||
/// <returns></returns>
|
||||
private bool FilterDataRowItemImplement(object sourceObj, string fillteredOperator, object fillteredObj, string column)
|
||||
{
|
||||
bool valid = false;
|
||||
if (column == "UnitName")
|
||||
{
|
||||
string sourceValue = sourceObj.ToString();
|
||||
string fillteredValue = fillteredObj.ToString();
|
||||
if (fillteredOperator == "equal")
|
||||
{
|
||||
if (sourceValue == fillteredValue)
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
else if (fillteredOperator == "contain")
|
||||
{
|
||||
if (sourceValue.Contains(fillteredValue))
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return valid;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
@@ -94,8 +47,6 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user