48 lines
1.5 KiB
C#
48 lines
1.5 KiB
C#
using BLL;
|
|
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace FineUIPro.Web.ThreeYearAction.Gateway
|
|
{
|
|
public partial class ConstructionRisk : PageBase
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
BindGrid();
|
|
}
|
|
|
|
private void BindGrid()
|
|
{
|
|
string strSql = @" select c.MainItemName , a.ConstructionRiskId + '|' + ControlId as Id
|
|
, *
|
|
, b.CheckResult
|
|
, pro.ProjectName
|
|
from [dbo].[HSSE_ConstructionRisk] a
|
|
left join [dbo].[HSSE_ConstructionRiskControl] b
|
|
on a.ConstructionRiskId = b.ConstructionRiskId
|
|
left join ProjectData_MainItem c on a.WorkAreaId = c.MainItemId
|
|
left join Base_Project pro on a.ProjectId = pro.ProjectId
|
|
where a.States = '4'
|
|
order by a.[ConstructionContent], b.[ShowIndex]";
|
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
|
SqlParameter[] parameter = listStr.ToArray();
|
|
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
|
Grid1.DataSource = tb;
|
|
Grid1.DataBind();
|
|
}
|
|
|
|
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
|
{
|
|
Grid1.SortDirection = e.SortDirection;
|
|
Grid1.SortField = e.SortField;
|
|
BindGrid();
|
|
}
|
|
}
|
|
} |