/// <summary> /// 绑定数据 /// </summary> private void LoadTaskList() { m_dtbLeader = OAList.GetGSLDToTable(); //当前登录用户账号 String l_strUserName = CurrentUserInfo.UserName; //得到检索条件 M_EntityMenu l_entityTask = GetSearchCondition(); B_Circulate l_busTaskList = new B_Circulate(String.Empty); l_entityTask.Start = gvTaskList.PageIndex * gvTaskList.PageSize; l_entityTask.End = gvTaskList.PageIndex * gvTaskList.PageSize + gvTaskList.PageSize; l_entityTask.Sort = SortExpression; //得到待阅文件列表数据 DataTable l_dtbDataTable = l_busTaskList.GetWaitingReadList(l_entityTask); //绑定数据 this.gvTaskList.RecordCount = l_entityTask.RowCount; this.gvTaskList.DataSource = l_dtbDataTable; this.gvTaskList.DataBind(); }
protected void gvTaskList_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType != DataControlRowType.DataRow) { return; } if (m_dtbLeader == null) { m_dtbLeader = OAList.GetGSLDToTable(); } DataRowView l_drvRowView = e.Row.DataItem as DataRowView; //是否领导传阅 String l_strSendUserID = l_drvRowView["SendUserID"].ToString(); if (OAList.IsGSLD(m_dtbLeader, l_strSendUserID)) { Label l_lblFromLeader = e.Row.FindControl("lblLeaderCirculate") as Label; l_lblFromLeader.Text = "<Img src='Img/lead.jpg' />"; l_lblFromLeader.ToolTip = "领导传阅"; } DistinctUrgentDegree(l_drvRowView["UrgentDegree"], e.Row.Cells[1]); }