protected void btnSelect_Click(object sender, EventArgs e) { if (this.txtName.Text.Trim() != "") { ExploreFile ef = new ExploreFile(); List <tb_File> files = ef.MAIN(); tb_File file = new tb_File(); file.fileName = txtName.Text.Trim(); files = files.FindAll(new Predicate <tb_File>(file.ifCon)); ViewState["file"] = files; this.gvList.DataSource = files; this.gvList.DataBind(); // List<tb_File> files = this.fileSer.GetListArray(string.Format(" and fileName like '%{0}%'", this.txtName.Text.Trim())); //this.gvList.DataSource = files; //this.gvList.DataBind(); } else { ExploreFile ef = new ExploreFile(); List <tb_File> files = ef.MAIN(); //tb_File file = new tb_File(); //file.fileName = txtName.Text.Trim(); //files = files.FindAll(new Predicate<tb_File>(file.ifCon)); ViewState["file"] = files; this.gvList.DataSource = files; this.gvList.DataBind(); } }
protected void tvMain_SelectedNodeChanged(object sender, EventArgs e) { string url = tvMain.SelectedNode.Value; if (url != "") { ExploreFile ef = new ExploreFile(); List <tb_File> files = ef.MAIN(url); ViewState["file"] = files; this.gvList.DataSource = files; this.gvList.DataBind(); } }
protected void gvList_PageIndexChanging(object sender, GridViewPageEventArgs e) { this.gvList.PageIndex = e.NewPageIndex; ExploreFile ef = new ExploreFile(); List <tb_File> files = ef.MAIN(); tb_File file = new tb_File(); file.fileName = txtName.Text.Trim(); files = files.FindAll(new Predicate <tb_File>(file.ifCon)); ViewState["file"] = files; this.gvList.DataSource = files; this.gvList.DataBind(); }
private void IniData() { tvMain.Nodes.Clear(); ExploreFile ef = new ExploreFile(); List <Directorys> allDires = ef.getALLDires(); TreeNode trNo = new TreeNode("我的电脑"); trNo.ImageUrl = "~/Image/Folder.ico"; trNo.Target = "0"; trNo.Value = ""; showFolder(allDires, trNo); tvMain.Nodes.Add(trNo); tvMain.CollapseAll(); }