예제 #1
0
        /// <summary>
        /// 增加一个节点
        /// </summary>
        public void AddNodeInfo()
        {
            if (NodeId.Trim().Length == 0 || NodeId == null)
                throw new Exception("AddNodeInfo方法错误,NodeId 不能为空!");
            if (this.Text.Trim().Length == 0 || this.Text == null)
                throw new Exception("AddNodeInfo方法错误,Text 不能为空!");
            try
            {
                WFModul wf = new WFModul();
                wf.SelfCode = this.NodeId;
                wf.FatherCode = this.FatherId;
                wf.SelfCode = this.Text;
                wf.IsVisable  = this.CanVisable;
                wf.DllFileName = this.DllFileName;
                wf.DllClassName = this.DllClassName;
                wf.DllMethodName = this.DllMethodName;
                wf.FormName= this.FormName;
                wf.BlankWindows = this.BlankWindows;
                wf.MouseIsClick= this.MouseIsClick;
                wf.ImageIndex = this.ImageIndex;
                wf.SDIWindows  = this.WindowsSDI;
                MainHelper.PlatformSqlMap.Create<WFModul>(wf); 
            }
            catch (Exception ex)
            {
                throw ex;
            }

 
        }
예제 #2
0
        /// <summary>
        /// 根据父节点id获得子节点列表
        /// </summary>
        /// <param name="fatherId">父节点Id</param>
        /// <returns>子节点的table</returns>
        public static DataTable GetChildNodes(string fatherId)
        {
            try
            {

               
                string tmpStr = " WHERE isVisable=1 and FatherCode='" + fatherId + "'";
                WFModul ss = new WFModul();
                ss.FullPosition  =tmpStr;
                IList list = (IList)MainHelper.PlatformSqlMap.GetList<WFModul>("SelectWFModulList", ss.FullPosition);
                return ConvertHelper.ToDataTable(list);

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