1
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
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_HSSEData_HSSE : PageBase
|
||||
public partial class Project_HSSEData_HSSE :PageBase
|
||||
{
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
@@ -24,12 +31,16 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
Model.Project_HSSEData_HSSE table = new Model.Project_HSSEData_HSSE();
|
||||
table.ProjectId = this.CurrUser.LoginProjectId;
|
||||
var tb = BLL.Project_HSSEData_HSSEService.GetListData(table, Grid1);
|
||||
Grid1.RecordCount = Project_HSSEData_HSSEService.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
Grid1.DataSource = tb;
|
||||
var list = from x in Funs.DB.View_Project_HSSEData_HSSE select x;
|
||||
if (!string.IsNullOrEmpty(txtProjectName.Text.Trim()))
|
||||
{
|
||||
list = list.Where(x => x.ProjectName.Contains(txtProjectName.Text.Trim()));
|
||||
}
|
||||
int count = list.Count();
|
||||
list = SortConditionHelper.SortingAndPaging(list, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
|
||||
Grid1.RecordCount = count;
|
||||
Grid1.DataSource = list.ToList();
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
@@ -68,6 +79,11 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
protected void btSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
@@ -135,7 +151,7 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var model = BLL.Project_HSSEData_HSSEService.GetProject_HSSEData_HSSEById(rowID);
|
||||
if (model != null)
|
||||
if (model!=null)
|
||||
{
|
||||
BLL.Project_HSSEData_HSSEService.DeleteProject_HSSEData_HSSEById(rowID);
|
||||
BLL.HSSEData_HiddenDangerDetailService.DeleteHSSEData_HiddenDangerDetailByDate(model.ReportDate);
|
||||
@@ -174,7 +190,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))
|
||||
{
|
||||
@@ -200,7 +216,7 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("HSSE首页数据表" + 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