/// <summary>
        /// 功能:项目类别树加载
        /// 日期:2016-2-1
        /// KEY:322332FFFAA
        /// </summary>
        public ActionResult GetDictCateTree()
        {
            string Condition = " and 1=1";
            IList <DictItem_CateEntity> orgEntity = catelogic.LoadAll(Condition, 10000, 1, "CateId");
            List <JsonTreeModel>        nodes     = new List <JsonTreeModel>();

            foreach (var item in orgEntity)
            {
                JsonTreeModel cnode = new JsonTreeModel();
                cnode.id   = item.CateId;
                cnode.name = item.CateName;
                if (!string.IsNullOrEmpty(item.UpperId))
                {
                    cnode.pid = item.UpperId;
                }
                else
                {
                    cnode.pid = "";
                }

                cnode.expanded = true;
                nodes.Add(cnode);
            }
            return(Json(nodes));
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult GetDepTree()
        {
            IList <DepartmentEntity> orgEntity = depLogic.LoadAll("", 10000, 1, "depid");
            List <JsonTreeModel>     nodes     = new List <JsonTreeModel>();

            foreach (var item in orgEntity)
            {
                JsonTreeModel cnode = new JsonTreeModel();
                cnode.id   = item.DepId;
                cnode.name = item.DepName;
                if (!string.IsNullOrEmpty(item.UpperId))
                {
                    cnode.pid = item.UpperId;
                }
                else
                {
                    cnode.pid = "";
                }


                cnode.expanded = true;

                nodes.Add(cnode);
            }
            return(Json(nodes));
        }
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult GetOrgTree()
        {
            string Condition = " and 1=1";
            IList <OrganizationEntity> orgEntity = orgLogic.LoadAll(Condition, 10000, 1, "Organization.orgid");
            List <JsonTreeModel>       nodes     = new List <JsonTreeModel>();

            foreach (var item in orgEntity)
            {
                JsonTreeModel cnode = new JsonTreeModel();
                cnode.id   = item.OrgId;
                cnode.name = item.OrgName;
                if (!string.IsNullOrEmpty(item.UpperId))
                {
                    cnode.pid = item.UpperId;
                }
                else
                {
                    cnode.pid = "";
                }


                cnode.expanded = true;

                nodes.Add(cnode);
            }
            return(Json(nodes));
        }
예제 #4
0
        /// <summary>
        /// 功能:类别集合
        /// 日期:add by 2015-12-1
        /// key: 423211xxxyyy
        /// </summary>
        /// <returns></returns>
        public ActionResult GetTypeList()
        {
            IList <DictCodeEntity> codeEntity = codeLogic.LoadAll(" and codeid='000' ", 10000, 1, "CodeTypeId");
            List <JsonTreeModel>   nodes      = new List <JsonTreeModel>();

            foreach (var item in codeEntity)
            {
                JsonTreeModel cnode = new JsonTreeModel();
                cnode.id       = item.CodeTypeId;
                cnode.name     = item.CodeTypeName;
                cnode.pid      = "";
                cnode.expanded = true;
                nodes.Add(cnode);
            }
            return(Json(nodes));
        }
예제 #5
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult GetTypeTree()
        {
            string strOrgId  = HttpContext.ApplicationInstance.Context.Request.Cookies["OrgId"].Value;
            string Condition = " and orgid = '" + strOrgId + "'";
            IList <PackageTypeEntity> typeEntity = typeLogic.LoadAll(Condition, 1000, 1, "CreateDate");
            List <JsonTreeModel>      nodes      = new List <JsonTreeModel>();

            foreach (var item in typeEntity)
            {
                JsonTreeModel cnode = new JsonTreeModel();
                cnode.id       = item.PackAgeTypeId;
                cnode.name     = item.PackAgeTypeName;
                cnode.pid      = "";
                cnode.expanded = true;
                nodes.Add(cnode);
            }
            return(Json(nodes));
        }