安全和质量加三个集团的统计表
This commit is contained in:
@@ -7,7 +7,8 @@ using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync
|
||||
{
|
||||
public partial class Project_HJGLData_HJGL : PageBase
|
||||
@@ -30,16 +31,34 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
Model.Project_HJGLData_HJGL table = new Model.Project_HJGLData_HJGL();
|
||||
table.ProjectId = this.CurrUser.LoginProjectId;
|
||||
var tb = BLL.Project_HJGLData_HJGLService.getListData(table, Grid1);
|
||||
Grid1.RecordCount = Project_HJGLData_HJGLService.count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
Grid1.DataSource = tb;
|
||||
|
||||
string strSql = @"SELECT x.* , p.ProjectName, p.ShortName"
|
||||
+ @" FROM Project_HJGLData_HJGL AS x "
|
||||
+ @" LEFT JOIN Base_Project AS p ON x.ProjectId=p.ProjectId WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtProjectName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND p.ProjectName LIKE @ProjectName";
|
||||
listStr.Add(new SqlParameter("@ProjectName", "%" + this.txtProjectName.Text.Trim() + "%"));
|
||||
}
|
||||
strSql += @" ORDER BY x.ReportDate DESC";
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void btSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
#region GV 数据操作
|
||||
/// <summary>
|
||||
/// 过滤表头
|
||||
@@ -181,7 +200,7 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNew.Hidden = false;
|
||||
// this.btnNew.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
@@ -207,7 +226,7 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("焊接首页数据表" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = 500;
|
||||
this.Grid1.PageSize = 10000;
|
||||
this.BindGrid();
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
|
||||
Reference in New Issue
Block a user