示例#1
0
        private List <B01TreeModel> GetModelById(List <AreaModel> list, string unitID)
        {
            List <B01TreeModel> listModel = null;
            List <AreaModel>    listKey   = list.FindAll(s => s.Parent == unitID);

            if (listKey.Count > 0)
            {
                listModel = new List <B01TreeModel>();
                B01TreeModel temp = null;
                for (int i = 0; i < listKey.Count; i++)
                {
                    temp          = new B01TreeModel();
                    temp.text     = listKey[i].CodeItemName;
                    temp.unitID   = listKey[i].CodeItemID;
                    temp.keyChild = listKey[i].Child;
                    temp.JPSign   = listKey[i].JPSign;
                    if (temp.keyChild > 0)
                    {
                        temp.nodes = GetModelById(list, listKey[i].CodeItemID);
                    }
                    listModel.Add(temp);
                }
            }
            return(listModel);
        }
示例#2
0
        /// <summary>
        /// 用户管理 获取单位数据
        /// </summary>
        /// <param name="user_id"></param>
        /// <returns></returns>
        public List <B01TreeModel> GetB01Data(int user_id)
        {
            List <B01TreeModel> list  = HCQ2UI_Helper.OperateContext.Current.bllSession.B01.GetB01Data(user_id);
            B01TreeModel        model = new B01TreeModel()
            {
                text     = "系统用户",
                unitID   = "",
                keyChild = 0,
                nodes    = null
            };

            list.Insert(0, model);
            return(list);
        }