protected void LoadData() { string dptList = GetChildrenBySelft(); Maticsoft.BLL.tTask BLL = new Maticsoft.BLL.tTask(); string sortField = GridDpt.SortField; string sortDirection = GridDpt.SortDirection; string where = ""; where += " SaveDpt in (" + dptList + ")"; if (drpSearch.SelectedValue != "") { where += " and IsCheck='" + drpSearch.SelectedValue + "' "; } if (txtValue.Text.Trim() != "") { where += " and Title like '%" + txtValue.Text.Trim() + "%' "; } GridDpt.RecordCount = BLL.GetRecordCount(where); DataView view = BLL.GetListByPage(where, " SaveTime desc ", GridDpt.PageIndex * GridDpt.PageSize, (GridDpt.PageIndex + 1) * GridDpt.PageSize).Tables[0].DefaultView; view.Sort = String.Format("{0} {1}", sortField, sortDirection); GridDpt.DataSource = view.ToTable(); GridDpt.DataBind(); }
protected void LoadData() { Maticsoft.BLL.tTopic BLLGET = new Maticsoft.BLL.tTopic(); string sortField = GridDpt.SortField; string sortDirection = GridDpt.SortDirection; StringBuilder sb = new StringBuilder(); string dptlist = GetTreeNode(TreeDpt.SelectedNode, sb, true).ToString(); string where = ""; where += " policyDptId in (" + dptlist.Substring(0, dptlist.Length - 1) + ")"; if (drpSearch.SelectedValue != "") { where += " and isCheck='" + drpSearch.SelectedValue + "' "; } if (txtValue.Text.Trim() != "") { where += " and topicTitle like '%" + txtValue.Text.Trim() + "%' "; } where += " and policyType=" + tId + " "; GridDpt.RecordCount = BLLGET.GetRecordCount(where); DataView view = BLLGET.GetListByPage(where, " Id desc ", GridDpt.PageIndex * GridDpt.PageSize, (GridDpt.PageIndex + 1) * GridDpt.PageSize).Tables[0].DefaultView; view.Sort = String.Format("{0} {1}", sortField, sortDirection); GridDpt.DataSource = view.ToTable(); GridDpt.DataBind(); }
protected void LoadData() { Maticsoft.BLL.tPictureType BLL = new Maticsoft.BLL.tPictureType(); string sortField = GridDpt.SortField; string sortDirection = GridDpt.SortDirection; GridDpt.RecordCount = BLL.GetRecordCount(""); DataView view = BLL.GetListByPage("", "", GridDpt.PageIndex * GridDpt.PageSize, (GridDpt.PageIndex + 1) * GridDpt.PageSize).Tables[0].DefaultView; view.Sort = String.Format("{0} {1}", sortField, sortDirection); GridDpt.DataSource = view.ToTable(); GridDpt.DataBind(); }
protected void LoadData() { if (TreeDpt.SelectedNode == null) { getAll(); } else { string NodeId = TreeDpt.SelectedNodeID; if (NodeId == "10000") { getAll(); } else { getAllById(); } } GridDpt.DataBind(); }
protected void LoadData() { int dptId = GetIdentityUser().dptId; Maticsoft.BLL.tTask BLL = new Maticsoft.BLL.tTask(); string sortField = GridDpt.SortField; string sortDirection = GridDpt.SortDirection; string where = " IsCheck='已审核' "; if (drpSearch.SelectedValue == "") { where += string.Format(" and Id in (select TaskId from v_task_save where DptId={0}) ", dptId); } else if (drpSearch.SelectedValue == "已上报") { where += string.Format(" and Id in (select TaskId from v_task_save where DptId={0} and SavaDpt={1}) ", dptId, dptId); } else { where += string.Format(" and Id in (select TaskId from v_task_save where DptId={0} and SavaDpt is null) ", dptId); } if (txtValue.Text.Trim() != "") { where += " and (Title like '%" + txtValue.Text.Trim() + "%') or (TaskLevel like '%" + txtValue.Text.Trim() + "%') "; } GridDpt.RecordCount = BLL.GetRecordCount(where); DataView view = BLL.GetListByPage(where, " SaveTime desc ", GridDpt.PageIndex * GridDpt.PageSize, (GridDpt.PageIndex + 1) * GridDpt.PageSize).Tables[0].DefaultView; view.Sort = String.Format("{0} {1}", sortField, sortDirection); GridDpt.DataSource = view.ToTable(); GridDpt.DataBind(); }
protected void LoadData() { Maticsoft.BLL.tDepartMent BLL = new Maticsoft.BLL.tDepartMent(); string sortField = GridDpt.SortField; string sortDirection = GridDpt.SortDirection; if (TreeDpt.SelectedNode == null) { GridDpt.RecordCount = BLL.GetRecordCount(" dptId<>10000 "); DataView view = BLL.GetListByPage(" dptId<>10000 ", " dptId asc ", GridDpt.PageIndex * GridDpt.PageSize, (GridDpt.PageIndex + 1) * GridDpt.PageSize).Tables[0].DefaultView; view.Sort = String.Format("{0} {1}", sortField, sortDirection); GridDpt.DataSource = view.ToTable(); } else { string NodeId = TreeDpt.SelectedNodeID; GridDpt.RecordCount = BLL.GetRecordCount(" dptFatherId=" + NodeId); DataView view = BLL.GetListByPage(" dptFatherId=" + NodeId, " dptId asc ", GridDpt.PageIndex * GridDpt.PageSize, (GridDpt.PageIndex + 1) * GridDpt.PageSize).Tables[0].DefaultView; view.Sort = String.Format("{0} {1}", sortField, sortDirection); GridDpt.DataSource = view.ToTable(); } GridDpt.DataBind(); }