protected void DataBind(string keys = "") { DataTable dt = new DataTable(); int userID = buser.GetLogin().UserID; string docType = Request.QueryString["DocType"]; if (string.IsNullOrEmpty(docType) || docType.Equals("0"))//公文 { switch (CurrentView) { case "1": //待办有经办权限的 dt = oaBll.SelDocByUid(userID); break; case "2": //已办 dt = oaBll.SelByApproveID(userID, 0); break; } } else//事务 { switch (CurrentView) { case "1": //待办有经办权限的 dt = oaBll.SelDocByUid(userID); break; case "2": //已办 dt = oaBll.SelByApproveID(userID, 1); break; } } string key = SearchKey; if (!string.IsNullOrEmpty(key)) { dt.DefaultView.RowFilter = "Title Like '%" + key + "%'"; dt = dt.DefaultView.ToTable(); } EGV.DataSource = dt; EGV.DataBind(); }
private void MyBind() { M_UserInfo mu = buser.GetLogin(); DataTable dt = oaBll.SelDocByUid(mu.UserID); wait_sp.InnerText = dt.Rows.Count.ToString();//待办 Span2.InnerText = msgBll.GetUnReadMail(mu.UserID).Rows.Count.ToString(); //论坛交流 RPT.DataSource = barBll.SelFocus(); RPT.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(); }