private void BindData() { DataTable dt = new DAL.Tables.T_Users().Open("ID,SiteID ,Name ,RealityName, IDCardNumber ,Email ,QQ,Telephone , Mobile ,isCanLogin ,Reason", "SiteID = " + _Site.ID.ToString() + "and isCanLogin= 0", ""); if (dt == null) { PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_Admin_UserLogOut"); return; } DataTable dtData = dt.Clone(); DataRow[] drs; if (rbUser.Checked) { drs = dt.Select("Reason is not null"); } else { drs = dt.Select("Reason is null"); } foreach (DataRow dr in drs) { dtData.Rows.Add(dr.ItemArray); } PF.DataGridBindData(g, dtData, gPager); }
private void BindData() { DataTable table = new Tables.T_Users().Open("ID,SiteID ,Name ,RealityName, IDCardNumber ,Email ,QQ,Telephone , Mobile ,isCanLogin ,Reason", "SiteID = " + base._Site.ID.ToString() + "and isCanLogin= 0", ""); if (table == null) { PF.GoError(4, "数据库繁忙,请重试", "Admin_Admin_UserLogOut"); } else { DataRow[] rowArray; DataTable dt = table.Clone(); if (this.rbUser.Checked) { rowArray = table.Select("Reason is not null"); } else { rowArray = table.Select("Reason is null"); } foreach (DataRow row in rowArray) { dt.Rows.Add(row.ItemArray); } PF.DataGridBindData(this.g, dt, this.gPager); } }