Exemplo n.º 1
0
        /// <summary>
        /// 选中装载流程类型
        /// </summary>
        /// <param name="key"></param>
        /// <param name="startNodes"></param>
        public static void LoadWorkFlowClassSelectNode(string key, TreeNodeCollection startNodes)
        {
            try
            {
                DataTable table = WorkFlowClass.GetChildWorkflowClass(key);

                
                foreach (DataRow row in table.Rows)
                {
                    WorkFlowClassTreeNode tmpNode = new WorkFlowClassTreeNode();
                    tmpNode.NodeId = row["WFClassId"].ToString();
                    tmpNode.ImageIndex = 0;
                    tmpNode.ToolTipText = "分类";
                    tmpNode.SelectedImageIndex = 0;
                    tmpNode.clLevel = Convert.ToInt16(row["clLevel"]);
                    tmpNode.Text = row["Caption"].ToString();
                    tmpNode.WorkflowFatherClassId = row["FatherId"].ToString();
                    tmpNode.Description = row["Description"].ToString();
                    tmpNode.MgrUrl = row["clmgrurl"].ToString();
                    tmpNode.NodeType = WorkConst.WORKFLOW_CLASS;
                    startNodes.Add(tmpNode);

                    

                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

        }
Exemplo n.º 2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (formState == WorkConst.STATE_ADD)
            {
                WorkFlowClassTreeNode tmpNodeInfo = new WorkFlowClassTreeNode();
                tmpNodeInfo.WorkflowFatherClassId = InfoId;
                tmpNodeInfo.NodeId = Guid.NewGuid().ToString();
                tmpNodeInfo.NodeType = WorkConst.WORKFLOW_CLASS;
                tmpNodeInfo.Text = tbxClassCaption.Text;
                tmpNodeInfo.Description = tbxDescription.Text;
                tmpNodeInfo.clLevel =Convert.ToInt16( tbxCllevel.Text);
                tmpNodeInfo.InsertWorkflowClassNode();
                if (tbxPath.Tag != null)
                tmpNodeInfo.MgrUrl =  tbxPath.Tag.ToString ();
                if (nowTreeNode.NodeType == WorkConst.WORKFLOW_CLASS)//点击的是分类节点
                {
                    nowTreeNode.Nodes.Add(tmpNodeInfo);
                }

            }
            else ////肯定点的是流程节点
            {

                nowTreeNode.Text = tbxClassCaption.Text;
                nowTreeNode.NodeType = WorkConst.WORKFLOW_CLASS;
                if (tbxPath.Tag != null)
                nowTreeNode.MgrUrl = tbxPath.Tag.ToString ();
                (nowTreeNode as WorkFlowClassTreeNode).Description = tbxDescription.Text;
                (nowTreeNode as WorkFlowClassTreeNode).clLevel =Convert.ToInt16( tbxCllevel.Text);
                (nowTreeNode as WorkFlowClassTreeNode).UpdateWorkflowClassNode();


            }
            this.Close();
        }