增加数据穿透界面
This commit is contained in:
@@ -26,7 +26,6 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
list = new List<string>();
|
||||
string lists = Request.Params["lists"];
|
||||
list = Funs.GetStrListByStr(lists, ',');
|
||||
@@ -101,37 +100,33 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
var getData = (from x in Funs.DB.View_Technique_RectifyItem
|
||||
where x.RectifyId == this.trRectify.SelectedNode.NodeID && x.IsPass == true
|
||||
select x).ToList();
|
||||
if (list.Count() > 0 && getData.Count() > 0)
|
||||
{
|
||||
foreach (var item in getData)
|
||||
{
|
||||
if (list.Contains(item.RectifyItemId))
|
||||
string strSql = "select * from View_Technique_RectifyItem where RectifyId=@RectifyId and IsPass=@IsPass";
|
||||
SqlParameter[] parameter = new SqlParameter[]
|
||||
{
|
||||
item.IsSelected = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
new SqlParameter("@RectifyId",this.trRectify.SelectedNode.NodeID),
|
||||
new SqlParameter("@IsPass",true)
|
||||
};
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
DataTable tb = this.LINQToDataTable(getData);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
//if (list.Count() > 0)
|
||||
//{
|
||||
// for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
// {
|
||||
// string id = Grid1.DataKeys[i][0].ToString();
|
||||
// if (list.Contains(id))
|
||||
// {
|
||||
// Grid1.Rows[i].Values[0]= "True";
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
if (list.Count() > 0)
|
||||
{
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected");
|
||||
string id = Grid1.DataKeys[i][0].ToString();
|
||||
if (list.Contains(id))
|
||||
{
|
||||
checkField.SetCheckedState(i, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user