public void BindDrop() { this.ddlType.DataSource = BudTemplateType.GetAll(); this.ddlType.DataTextField = "Name"; this.ddlType.DataValueField = "Id"; this.ddlType.DataBind(); if (base.Request["year"] != null) { this.ddlType.SelectedValue = base.Request["year"]; } }
public void BindDrop() { this.ddlType.DataSource = BudTemplateType.GetAll(); this.ddlType.DataTextField = "Name"; this.ddlType.DataValueField = "Id"; this.ddlType.DataBind(); if (base.Request["type"] != null) { this.ddlType.SelectedValue = base.Request["type"]; } if (this.ddlType.Items.Count == 0) { this.btnSaveAs.Disabled = true; } }
public void BindTree() { this.tvTempType.Nodes.Clear(); TreeNode treeNode = new TreeNode("类型", "0"); this.tvTempType.Nodes.AddAt(0, treeNode); System.Collections.Generic.IList <BudTemplateType> all = BudTemplateType.GetAll(); for (int i = 0; i < all.Count; i++) { TreeNode treeNode2 = new TreeNode(all[i].Name, all[i].Id.ToString()); if (base.Request["tempTypeId"] != null && base.Request["tempTypeId"] == treeNode2.Value) { treeNode2.Select(); } treeNode.ChildNodes.Add(treeNode2); } this.tvTempType.ExpandAll(); if (string.IsNullOrEmpty(this.TempTypeId.Trim())) { this.tvTempType.Nodes[0].Selected = true; this.AddTempTypeIdToUrl(); } }
public void BindGv() { this.gvTemplate.DataSource = BudTemplateType.Select(NBasePage.pagesize, this.AspNetPager1.CurrentPageIndex - 1); this.gvTemplate.DataBind(); this.AspNetPager1.RecordCount = BudTemplateType.GetAll().Count; }