示例#1
0
 /// <summary>
 /// 增加一个SearchKey .
 /// </summary>
 /// <param name="r">SearchKey</param>
 public void Add(AttrOfOneVSM attr)
 {
     if (this.IsExits(attr))
     {
         return;
     }
     this.InnerList.Add(attr);
 }
示例#2
0
 /// <summary>
 /// 是不是存在集合里面
 /// </summary>
 /// <param name="en">要检查的EnDtl</param>
 /// <returns>true/false</returns>
 public bool IsExits(AttrOfOneVSM en)
 {
     foreach (AttrOfOneVSM attr in this)
     {
         if (attr.EnsOfMM == en.EnsOfMM)
         {
             return(true);
         }
     }
     return(false);
 }
示例#3
0
        /// <summary>
        /// 绑定树模式
        /// </summary>
        /// <param name="_ensOfMM">比如 BP.WF.NodeDepts </param>
        /// <param name="_ensOfM">比如: BP.Port.Depts</param>
        /// <param name="rootNo">跟节点</param>
        /// <param name="AttrOfOneInMM">比如:FK_Node</param>
        /// <param name="AttrOfMInMM">比如:FK_Dept</param>
        /// <param name="desc">比如:节点绑定部门</param>
        /// <param name="AttrOfMText">一般是Name</param>
        /// <param name="AttrOfMValue">一般是No</param>
        public void AddBranches(Entities _ensOfMM, Entities _ensOfM, string AttrOfOneInMM, string AttrOfMInMM,
                                string desc, string AttrOfMText = "Name", string AttrOfMValue = "No", string rootNo = "0")
        {
            //属性.
            AttrOfOneVSM en = new AttrOfOneVSM(_ensOfMM, _ensOfM, AttrOfOneInMM,
                                               AttrOfMInMM, AttrOfMText, AttrOfMValue, desc);

            //工作模式.
            en.Dot2DotModel = Dot2DotModel.TreeDept; //分组模式.

            en.RootNo = rootNo;                      //默认的根目录.
            this.Add(en);
        }
示例#4
0
        /// <summary>
        /// 绑定分组列表平铺模式
        /// </summary>
        /// <param name="_ensOfMM"></param>
        /// <param name="_ensOfM"></param>
        /// <param name="AttrOfOneInMM"></param>
        /// <param name="AttrOfMInMM"></param>
        /// <param name="desc">标签或者描述</param>
        /// <param name="AttrOfMText">显示的标签,一般为 Name</param>
        /// <param name="AttrOfMValue">存储的值字段,一般为 No</param>
        /// <param name="defaultGroupKey">默认的分组外键或者枚举,如果为空就不分组.</param>
        public void AddGroupPanelModel(Entities _ensOfMM, Entities _ensOfM, string AttrOfOneInMM, string AttrOfMInMM,
                                       string desc, string defaultGroupKey = null, string AttrOfMText = "Name", string AttrOfMValue = "No")
        {
            //属性.
            AttrOfOneVSM en = new AttrOfOneVSM(_ensOfMM, _ensOfM, AttrOfOneInMM, AttrOfMInMM, AttrOfMText, AttrOfMValue, desc);

            //工作模式.
            en.Dot2DotModel = Dot2DotModel.Default; //分组模式.

            //默认的分组字段,可以是一个类名或者枚举.
            en.DefaultGroupAttrKey = defaultGroupKey;

            this.Add(en);
        }
示例#5
0
        /// <summary>
        /// 增加一个属性
        /// </summary>
        /// <param name="_ensOfMM">多对多的实体</param>
        /// <param name="_ensOfM">多实体</param>
        /// <param name="AttrOfOneInMM">点实体,在MM中的属性</param>
        /// <param name="AttrOfMInMM">多实体主键在MM中的属性</param>
        /// <param name="AttrOfMText"></param>
        /// <param name="AttrOfMValue"></param>
        /// <param name="desc">描述</param>
        public void Add(Entities _ensOfMM, Entities _ensOfM, string AttrOfOneInMM, string AttrOfMInMM, string AttrOfMText,
                        string AttrOfMValue, string desc, Dot2DotModel model = Dot2DotModel.Default, EntitiesTree ensTree = null,
                        string refTreeAttr = null)
        {
            //属性.
            AttrOfOneVSM en = new AttrOfOneVSM(_ensOfMM, _ensOfM, AttrOfOneInMM, AttrOfMInMM, AttrOfMText, AttrOfMValue, desc);

            //工作模式.
            en.Dot2DotModel = model;
            en.EnsTree      = ensTree;
            en.RefTreeAttr  = refTreeAttr;

            this.Add(en);
        }
示例#6
0
        /// <summary>
        /// 增加树杆叶子类型
        /// </summary>
        /// <param name="_ensOfMM"></param>
        /// <param name="_ensOfM"></param>
        /// <param name="AttrOfOneInMM"></param>
        /// <param name="AttrOfMInMM"></param>
        /// <param name="desc"></param>
        /// <param name="defaultGroupKey"></param>
        /// <param name="AttrOfMText"></param>
        /// <param name="AttrOfMValue"></param>
        public void AddBranchesAndLeaf(Entities _ensOfMM, Entities _ensOfM, string AttrOfOneInMM, string AttrOfMInMM,
                                       string desc, string defaultGroupKey = null, string AttrOfMText = "Name", string AttrOfMValue = "No", string rootNo = "0")
        {
            //属性.
            AttrOfOneVSM en = new AttrOfOneVSM(_ensOfMM, _ensOfM, AttrOfOneInMM,
                                               AttrOfMInMM, AttrOfMText, AttrOfMValue, desc);

            //工作模式.
            en.Dot2DotModel = Dot2DotModel.TreeDeptEmp; //分组模式.

            //默认的分组字段,可以是一个类名或者枚举.
            en.DefaultGroupAttrKey = defaultGroupKey;
            en.RootNo = rootNo; //默认的根目录.

            this.Add(en);
        }
示例#7
0
        /// <summary>
        /// 增加一个属性
        /// </summary>
        /// <param name="_ensOfMM">多对多的实体</param>
        /// <param name="_ensOfM">多实体</param>
        /// <param name="AttrOfOneInMM">点实体,在MM中的属性</param>
        /// <param name="AttrOfMInMM">多实体主键在MM中的属性</param>
        /// <param name="AttrOfMText"></param>
        /// <param name="AttrOfMValue"></param>
        /// <param name="desc">描述</param>
        public void Add(Entities _ensOfMM, Entities _ensOfM, string AttrOfOneInMM, string AttrOfMInMM, string AttrOfMText, string AttrOfMValue, string desc)
        {
            AttrOfOneVSM en = new AttrOfOneVSM(_ensOfMM, _ensOfM, AttrOfOneInMM, AttrOfMInMM, AttrOfMText, AttrOfMValue, desc);

            this.Add(en);
        }