menu.aspx.cs
资源名称:web.rar [点击查看]
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:3k
源码类别:
OA系统
开发平台:
ASP/ASPX
- 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;
- public partial class web_approvel_flow_menu : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- if (Session["main"] != null)
- {
- this.CreateTree(Convert.ToInt32(Session["main"].ToString()));
- Session.Remove("main");
- }
- else
- {
- this.CreateTree(0);
- }
- }
- }
- protected void CreateTree(int step)
- {
- //定義根節點
- TreeNode RootNode = new TreeNode();
- RootNode.Text = "簽核表單流程建檔作業";
- FlowTree.Nodes.Add(RootNode);
- if (step == 0)
- {
- //在根節點中添加子節點
- TreeNode ChildNode = new TreeNode();
- ChildNode.Text = "<font color='red'>第一步, 添加表單屬性</font>";
- ChildNode.NavigateUrl = "add_property.aspx";
- ChildNode.Target = "main";
- ChildNode.Value = "1";
- RootNode.ChildNodes.Add(ChildNode);
- ChildNode = new TreeNode();
- ChildNode.Text = "第二步, 添加表單流程";
- ChildNode.NavigateUrl = "add_flow.aspx";
- ChildNode.Target = "main";
- ChildNode.Value = "2";
- RootNode.ChildNodes.Add(ChildNode);
- }
- else
- {
- //在根節點中添加子節點
- TreeNode ChildNode = new TreeNode();
- ChildNode.Text = "第一步, 添加表單屬性";
- ChildNode.NavigateUrl = "add_property.aspx";
- ChildNode.Target = "main";
- ChildNode.Value = "1";
- RootNode.ChildNodes.Add(ChildNode);
- ChildNode = new TreeNode();
- ChildNode.Text = "<font color='red'>第二步, 添加表單流程</font>";
- ChildNode.NavigateUrl = "add_flow.aspx";
- ChildNode.Target = "main";
- ChildNode.Value = "2";
- RootNode.ChildNodes.Add(ChildNode);
- Response.Write("<script language='javascript'>window.parent.frames['main'].location='add_flow.aspx?main_id="+step+"'</script>");
- }
- }
- protected void FlowTree_SelectedNodeChanged(object sender, EventArgs e)
- {
- }
- }