private void DataBind(string key = "") { DataTable dt = new DataTable(); dt = oaBll.SelByUserID(buser.GetLogin().UserID, -99); if (!string.IsNullOrEmpty(key.Trim())) { dt.DefaultView.RowFilter = "Title Like '%" + key + "%'"; dt = dt.DefaultView.ToTable(); } EGV.DataSource = dt; EGV.DataBind(); }
protected void MyBind(string keys = "") { DataTable dt = new DataTable(); M_UserInfo mu = buser.GetLogin(); switch (CurrentView) { case "1": //待办有经办权限的 dt = oaBll.SelDocByUid(mu.UserID); //SelByDocType break; case "2": //已办 dt = oaBll.SelByApproveID(mu.UserID); break; case "3": //我的文档(未归档) dt = oaBll.SelByUserID(mu.UserID); break; case "4": //我的借阅 dt = borBll.SelByUid(mu.UserID); break; } if (ProID > 0)//按流程筛选,后期整合入Bll与Skey一起 { dt.DefaultView.RowFilter = "ProID='" + ProID + "'"; dt = dt.DefaultView.ToTable(); } if (!string.IsNullOrEmpty(SearchKey)) { dt.DefaultView.RowFilter = "Title Like '%" + SearchKey + "%'"; dt = dt.DefaultView.ToTable(); } EGV.DataSource = dt; EGV.DataBind(); ProBind(); }