SelectGoodsForm.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:2k
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- using System.Collections.Generic;
- public partial class SelectForm_SelectGoodsForm : System.Web.UI.Page
- {
- /// <summary>
- /// 业务(物品类别)
- /// </summary>
- BLL.UseThingsType BUT = new BLL.UseThingsType();
- /// <summary>
- /// 业务(物品)
- /// </summary>
- BLL.UseThings BU = new BLL.UseThings();
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- TreeLoadSet();
- }
- }
- protected void TreeLoadSet()
- {
- string url = "SelectGoodsFormData.aspx?id=";
- TreeView1.Nodes.Clear();
- if (BUT.GetCount("") > 0)
- {
- List<Model.UseThingsType> list_type = BUT.GetList();
- foreach (Model.UseThingsType MUT in list_type)
- {
- TreeNode tn_type = new TreeNode();
- tn_type.Text = MUT.LBMC;
- tn_type.ImageUrl = "~/images/node_dept.gif";
- List<Model.UseThings> list_name = BU.GetPageList(1, 1, "Id", false, "YPLB = '" + MUT.ID.ToString() + "'");
- foreach (Model.UseThings MU in list_name)
- {
- TreeNode tn_name = new TreeNode();
- tn_name.Text = MU.YPMC;
- tn_name.Value = MU.YPBM;
- tn_name.Target = "content3";
- tn_name.NavigateUrl = url + MU.ID.ToString();
- tn_name.ImageUrl = "~/images/node_dept.gif";
- tn_type.ChildNodes.Add(tn_name);
- }
- TreeView1.Nodes.Add(tn_type);
- }
- }
- }
- }