数据穿透新增页面
This commit is contained in:
@@ -72,7 +72,9 @@ namespace FineUIPro.Web.CQMS.ManageReport
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT item.* ,ISNULL(t.SumProjectTotal,0) AS SumProjectTotal
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
{
|
||||
string strSql = @"SELECT item.* ,ISNULL(t.SumProjectTotal,0) AS SumProjectTotal
|
||||
FROM dbo.CQMS_MonthReportItem item
|
||||
LEFT JOIN dbo.CQMS_MonthReport r ON r.MonthReportId = item.MonthReportId
|
||||
LEFT JOIN (SELECT a.ReportItem,ISNULL(SUM(ISNULL(a.ProjectTotal,0)),0) AS SumProjectTotal
|
||||
@@ -82,19 +84,19 @@ namespace FineUIPro.Web.CQMS.ManageReport
|
||||
GROUP BY a.ReportItem )t ON t.ReportItem = item.ReportItem
|
||||
WHERE r.ProjectId=@ProjectId AND r.MonthReportId=@MonthReportId
|
||||
ORDER BY item.Sort";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@MonthReportId", tvControlItem.SelectedNodeID));
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@MonthReportId", tvControlItem.SelectedNodeID));
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
|
||||
Grid1.DataSource = dt;
|
||||
Grid1.DataBind();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
|
||||
Grid1.DataSource = dt;
|
||||
Grid1.DataBind();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user