Пример #1
0
        /// <summary>
        /// 获得所有子部门
        /// </summary>
        /// <returns></returns>
        public IList <Bill_Departments> GetAllRootDept()
        {
            ConfigDal configDal = new ConfigDal();
            //1. 判断是否预算到末级部门
            string                   strismj  = configDal.GetValueByKey("deptjc");//是否预算到末级部门 Y 是 N或者null 否
            Bill_Departments         rootDept = deptDal.GetRootDept();
            IList <Bill_Departments> rootList = new List <Bill_Departments>();

            if (!string.IsNullOrEmpty(strismj) && strismj == "Y")
            {
                rootList = deptDal.GetdeptMj(rootDept.DeptCode);
            }
            else
            {
                rootList = deptDal.GetDeptByRoot(rootDept.DeptCode);
            }
            rootList.Add(rootDept);
            return(rootList);
        }