1
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Text;
|
||||
using BLL;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync
|
||||
{
|
||||
public partial class Project_CQMSData_CQMS : PageBase
|
||||
public partial class Project_CQMSData_CQMS : PageBase
|
||||
{
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
@@ -25,16 +28,23 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
Model.Project_CQMSData_CQMS table = new Model.Project_CQMSData_CQMS();
|
||||
table.ProjectId = this.CurrUser.LoginProjectId;
|
||||
var tb = BLL.Project_CQMSDataService.getListData(table, Grid1);
|
||||
Grid1.RecordCount = Project_CQMSDataService.count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
Grid1.DataSource = tb;
|
||||
var list = from x in Funs.DB.View_Project_CQMSData_CQMS 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
|
||||
|
||||
protected void btSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#region GV 数据操作
|
||||
/// <summary>
|
||||
/// 过滤表头
|
||||
@@ -91,7 +101,7 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("Project_CQMSData_CQMSEdit.aspx?Id={0}", string.Empty, "增加 - ")));
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -138,12 +148,12 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var model = BLL.Project_CQMSDataService.GetProject_CQMSData_CQMSById(rowID);
|
||||
if (model != null)
|
||||
if (model!=null)
|
||||
{
|
||||
BLL.Project_CQMSDataService.DeleteProject_CQMSData_CQMSById(rowID);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
BindGrid();
|
||||
@@ -177,7 +187,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))
|
||||
{
|
||||
@@ -203,7 +213,7 @@ namespace FineUIPro.Web.ZHGL.DataSync.ProjectDataSync
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("CQMS首页数据表" + 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