Пример #1
0
        public OrgController(IOrgService orgService, IAuthHelper authHelper)

        {
            _orgService = orgService;
            _authHelper = authHelper;
            _userId     = _authHelper.GetUserId();
        }
Пример #2
0
        public ActionResult Index()
        {
            IOrgService       orgService = this.CreateService <IOrgService>();
            List <SysOrgType> orgTypes   = orgService.GetOrgTypes();

            List <Select2Group> orgGroups = new List <Select2Group>();
            List <SysOrg>       orgs      = orgService.GetList();

            foreach (var item in orgs.GroupBy(a => a.OrgType).OrderBy(a => a.Key))
            {
                int?         orgType     = item.Key;
                string       orgTypeName = orgTypes.Where(a => a.Id == orgType).Select(a => a.Name).FirstOrDefault();
                Select2Group group       = new Select2Group(orgTypeName);
                group.children.AddRange(item.Select(a => new Select2Item(a.Id, a.Name)));
                orgGroups.Add(group);
            }

            this.ViewBag.Orgs = orgGroups;

            List <SysRole> roles = this.CreateService <IRoleService>().GetList();

            this.ViewBag.Roles = roles.Select(a => new Select2Item()
            {
                id = a.Id, text = a.Name
            });

            List <Ace.Entity.Wiki.SimpleShop2> shops = this.CreateService <Ace.Application.Wiki.IShopService>().GetCacheList2();

            this.ViewBag.Shops = shops;

            return(View());
        }
Пример #3
0
 public OrgController(
     ICacheProvider _cache,
     IOrgService _orgService)
 {
     this._cache      = _cache;
     this._orgService = _orgService;
 }
Пример #4
0
 public SupportActivityController(ILogService loggerService, IUserService userService, IUnitOfWork unitOfWork,
                                  IWkflowdefService wkflowdefService, IWkflowinstanceService wkflowinstanceService,
                                  IDpworkflowService dpworkflowService, IOrgdoctypdataelmService orgdoctypdataelmService, IOrgService orgService,
                                  IWkflowstatService wkflowstatService, IOrguserService orguserService, IUserauthrolService userauthrolService,
                                  IOrgorgService orgorgService, IOrgcustService orgcustService, IOrgresellerService orgresellerService,
                                  IOrgdoctypService orgdoctypService, ISouploadService souploadService, IOrgdoctypdailyuploadService orgdoctypdailyuploadService)
 {
     this._LoggerService            = loggerService;
     this._IUserService             = userService;
     this._IWkflowdefService        = wkflowdefService;
     this._IWkflowinstanceService   = wkflowinstanceService;
     this._IDpworkflowService       = dpworkflowService;
     this._IOrgdoctypdataelmService = orgdoctypdataelmService;
     this._UnitOfWork                   = unitOfWork;
     this._IOrgService                  = orgService;
     this._IWkflowstatService           = wkflowstatService;
     this._IOrguserService              = orguserService;
     this._IUserauthrolService          = userauthrolService;
     this._IOrgorgService               = orgorgService;
     this._IOrgcustService              = orgcustService;
     this._IOrgresellerService          = orgresellerService;
     this._IOrgdoctypService            = orgdoctypService;
     this._ISouploadService             = souploadService;
     this._IOrgdoctypdailyuploadService = orgdoctypdailyuploadService;
 }
Пример #5
0
        public InternalAppsController(ILogService loggerService, IUserService userService,
                                      IUnitOfWork unitOfWork, ISouploadService docService, IWkflowdefService wkflowdefService,
                                      IOrgService orgService, IWkflowinstanceService wkflowinstanceService,
                                      IPortService portService, IPortsettingService portsettingService,
                                      IOrgdoctypService orgdoctypService, IMessageService messageService,
                                      IMessageuserService messageuserService, IOrgdoctypmonthService orgdoctypmonthService,
                                      IMonthService monthService, IOrgdoctypdailyuploadService orgdoctypdailyuploadService,
                                      IOrgmonthcommitmentService orgmonthcommitmentService)
        {
            this._LoggerService = loggerService;
            this._IUserService  = userService;
            this._IDocService   = docService;

            this._UnitOfWork = unitOfWork;

            this._IWkflowdefService            = wkflowdefService;
            this._IOrgService                  = orgService;
            this._IWkflowinstanceService       = wkflowinstanceService;
            this._IPortService                 = portService;
            this._IPortsettingService          = portsettingService;
            this._IOrgdoctypService            = orgdoctypService;
            this._IMessageService              = messageService;
            this._IMessageuserService          = messageuserService;
            this._IOrgdoctypmonthService       = orgdoctypmonthService;
            this._IMonthService                = monthService;
            this._IOrgdoctypdailyuploadService = orgdoctypdailyuploadService;
            this._IOrgmonthcommitmentService   = orgmonthcommitmentService;
        }
 public MobileOrgController(ILoggerServices loggerServices,
                            IUserServices userService,
                            IUserDepartmentServices userDepartmentServices,
                            IOrgService orgService) :
     base(loggerServices, userService, userDepartmentServices)
 {
     _orgService = orgService;
 }
Пример #7
0
 public SsoController(ILoggerServices loggerServices, IUserServices userService,
                      IUserDepartmentServices userDepartmentServices,
                      IUserDeviceServices userDeviceServices, IOrgService orgService)
     : base(loggerServices, userService, userDepartmentServices)
 {
     _orgSevice          = orgService;
     _userDeviceServices = userDeviceServices;
 }
Пример #8
0
        public JsonResult GetUnitData()
        {
            IOrgService os     = Beyondbit.BUA.Client.ServiceFactory.Instance().GetOrgService();
            Org         orgTop = os.GetTopOrg();

            Org[] orgs = os.QuerySubOrgs(orgTop.OrgCode);
            return(Json(orgs, JsonRequestBehavior.AllowGet));
        }
Пример #9
0
        public JsonResult GetUnitUserData2(string unitCode)
        {
            //Bo.BoFactory.GetVersionTrackBo.
            IUserService us          = Beyondbit.BUA.Client.ServiceFactory.Instance().GetUserService();
            IOrgService  os          = Beyondbit.BUA.Client.ServiceFactory.Instance().GetOrgService();
            Org          orgUnit     = os.GetOrgBaseInfo(ObjectType.Org, unitCode);
            Hashtable    resultTable = new Hashtable();

            resultTable["id"]   = "o_" + unitCode;
            resultTable["text"] = orgUnit.OrgName;

            List <Hashtable> lst = new List <Hashtable>();

            resultTable["children"] = lst;

            List <User> users = new List <Beyondbit.BUA.Client.User>();

            User[] _users = null;
            try
            {
                _users = us.QueryUsersByObjectCode(ObjectType.Org, unitCode);
            }
            catch
            {
            }

            if (_users != null && _users.Length > 0)
            {
                foreach (Beyondbit.BUA.Client.User u in _users)
                {
                    Hashtable hUser = new Hashtable();
                    hUser["id"]   = "u_" + u.UserUid;
                    hUser["text"] = u.UserName;
                    lst.Add(hUser);
                }
            }

            Org[] childOrgs = os.QuerySubOrgs(unitCode);
            if (childOrgs != null && childOrgs.Length > 0)
            {
                foreach (Org org in childOrgs)
                {
                    Hashtable hOrg = new Hashtable();
                    hOrg["id"]       = "o_" + org.OrgCode;
                    hOrg["text"]     = org.OrgName;
                    hOrg["children"] = new List <Hashtable>();
                    lst.Add(hOrg);
                    parseUnitUserData(hOrg, org, us, os);
                }
            }

            Hashtable[] arr = new Hashtable[1];
            arr[0] = resultTable;

            //List<User> users = new List<Beyondbit.BUA.Client.User>();
            //User[] _users = us.QueryUsersByObjectCode(ObjectType.Org, unitCode);
            return(Json(arr, JsonRequestBehavior.AllowGet));
        }
Пример #10
0
        public void Initialize(IOrgService orgService)
        {
            if (orgService == null)
            {
                throw new ArgumentNullException(nameof(orgService));
            }

            _orgService = orgService;
        }
Пример #11
0
        public ActionResult UnitManagerAdd()
        {
            IOrgService os     = Beyondbit.BUA.Client.ServiceFactory.Instance().GetOrgService();
            Org         orgTop = os.GetTopOrg();

            Org[] orgs = os.QuerySubOrgs(orgTop.OrgCode);
            ViewData["entity"] = Newtonsoft.Json.JsonConvert.SerializeObject(orgs);
            return(View());
        }
Пример #12
0
        public OrgController(ILogService loggerService, IOrgService orgService, IOrgcustService orgCustService,
                             IOrgresellerService orgResellerService, IOrgorgService orgorgService)
        {
            this._loggerService = loggerService;
            this._OrgService    = orgService;

            _IOrgcustService     = orgCustService;
            _IOrgresellerService = orgResellerService;
            _IOrgorgService      = orgorgService;
        }
Пример #13
0
 public OrgController(ILoggerServices loggerServices,
                      IUserServices userService,
                      IUserDepartmentServices userDepartmentServices,
                      IDepartmentServices departmentServices,
                      IOrgService orgService) :
     base(loggerServices, userService, userDepartmentServices)
 {
     _orgService         = orgService;
     _departmentServices = departmentServices;
 }
Пример #14
0
 public AdminOrgController(ICacheProvider cache, ICacheKeyManager keyManager,
                           IOrgService _orgService,
                           ICurrentOrgSelector _orgSelector,
                           ILoginService <UserEntity> _userLogin)
 {
     this._cache       = cache;
     this._keyManager  = keyManager;
     this._orgService  = _orgService;
     this._orgSelector = _orgSelector;
     this._userLogin   = _userLogin;
 }
Пример #15
0
        public DocumentsController(ILogService loggerService, IUserService userService, IUnitOfWork unitOfWork, ISouploadService docService, IWkflowdefService wkflowdefService, IOrgService orgService, IWkflowinstanceService wkflowinstanceService)
        {
            this._LoggerService = loggerService;
            this._IUserService  = userService;
            this._IDocService   = docService;

            this._UnitOfWork = unitOfWork;

            this._IWkflowdefService      = wkflowdefService;
            this._IOrgService            = orgService;
            this._IWkflowinstanceService = wkflowinstanceService;
        }
Пример #16
0
 public SubscriptionController(ILogService loggerService, IWkflowdefService wkflowdefService, ISowwkflowService sowwkflowService,
                               IUserService userService, IOrgService orgService, IWkflowinstanceService wkflowinstanceService,
                               ISowattributeService sowattributeService)
 {
     this._loggerService          = loggerService;
     this._IWkflowdefService      = wkflowdefService;
     this._IUserService           = userService;
     this._IOrgService            = orgService;
     this._IWkflowinstanceService = wkflowinstanceService;
     this._ISowattributeService   = sowattributeService;
     _ISowwkflowService           = sowwkflowService;
 }
Пример #17
0
 private void GetOrgs(IOrgService os, string orgCode, List <Org> orgs)
 {
     Org[] _orgs = os.QuerySubOrgs(orgCode);
     if (_orgs != null && _orgs.Length > 0)
     {
         foreach (Org org in _orgs)
         {
             orgs.Add(org);
             GetOrgs(os, org.OrgCode, orgs);
         }
     }
 }
Пример #18
0
 public WkflowController(ILogService loggerService, IUserService userService, IUnitOfWork unitOfWork,
                         IWkflowdefService wkflowdefService, IWkflowinstanceService wkflowinstanceService,
                         IDpworkflowService dpworkflowService, IOrgdoctypdataelmService orgdoctypdataelmService, IOrgService orgService)
 {
     this._LoggerService            = loggerService;
     this._IUserService             = userService;
     this._IWkflowdefService        = wkflowdefService;
     this._IWkflowinstanceService   = wkflowinstanceService;
     this._IDpworkflowService       = dpworkflowService;
     this._IOrgdoctypdataelmService = orgdoctypdataelmService;
     this._UnitOfWork  = unitOfWork;
     this._IOrgService = orgService;
 }
Пример #19
0
        public PlatformAdminController(ILogService loggerService, IUserService userService, IPortService portalService, IPortuserService portalUserService,
                                       IUnitOfWork unitOfWork, IOrgService orgService, IOrgtypService orgtypServicer, IAuthrolService authrolService)
        {
            this._LoggerService      = loggerService;
            this._IUserService       = userService;
            this._IPortalService     = portalService;
            this._IPortalUserService = portalUserService;
            this._UnitOfWork         = unitOfWork;

            this._IOrgService     = orgService;
            this._IOrgtypServicer = orgtypServicer;
            this._IAuthrolService = authrolService;
        }
Пример #20
0
 public AccountController(IWCloudContext <AccountController> _context,
                          IAdminPermissionService adminPermissionService,
                          IOrgPermissionService orgPermissionService,
                          IAdminLoginService adminLoginService,
                          IUserLoginService userLoginService,
                          IOrgService orgService)
 {
     this._context = _context;
     this.adminPermissionService = adminPermissionService;
     this.orgPermissionService   = orgPermissionService;
     this.adminLoginService      = adminLoginService;
     this.userLoginService       = userLoginService;
     this.orgService             = orgService;
 }
Пример #21
0
        // Dependencies are injected via the constructor
        public Person(ILogger logger, IOrgService orgService)
        {
            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }
            if (orgService == null)
            {
                throw new ArgumentNullException(nameof(orgService));
            }

            _logger     = logger;
            _orgService = orgService;
        }
Пример #22
0
        private void parseUnitUserData(Hashtable parent, Org org, IUserService us, IOrgService os)
        {
            //Hashtable hashOrg = new Hashtable();
            //parent["id"] = "o_" + org.OrgCode;
            //parent["text"] = org.OrgName;
            List <Hashtable> lst = parent["children"] as List <Hashtable>;

            //Hashtable hsOrg = new Hashtable();
            //hsOrg["id"] = "o_" + org.OrgCode;
            //hsOrg["text"] = org.OrgName;
            //hsOrg["children"] = new List<Hashtable>();
            //lst.Add(hsOrg);

            List <User> users = new List <Beyondbit.BUA.Client.User>();

            User[] _users = null;
            try
            {
                _users = us.QueryUsersByObjectCode(ObjectType.Org, org.OrgCode);
            }
            catch
            {
            }

            if (_users != null && _users.Length > 0)
            {
                foreach (Beyondbit.BUA.Client.User u in _users)
                {
                    Hashtable hUser = new Hashtable();
                    hUser["id"]   = "u_" + u.UserUid;
                    hUser["text"] = u.UserName;
                    lst.Add(hUser);
                }
            }

            Org[] childOrgs = os.QuerySubOrgs(org.OrgCode);
            if (childOrgs != null && childOrgs.Length > 0)
            {
                foreach (Org o in childOrgs)
                {
                    Hashtable hOrg = new Hashtable();
                    hOrg["id"]       = "o_" + o.OrgCode;
                    hOrg["text"]     = o.OrgName;
                    hOrg["children"] = new List <Hashtable>();
                    lst.Add(hOrg);
                    parseUnitUserData(hOrg, o, us, os);
                }
            }
        }
Пример #23
0
        // Dependencies are injected via the constructor,
        // including the base class
        public Employee(ILogger logger, ICache cache,
                        IOrgService orgService)
            : base(logger, orgService)
        {
            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }
            if (cache == null)
            {
                throw new ArgumentNullException(nameof(cache));
            }

            _logger = logger;
            _cache  = cache;
        }
Пример #24
0
 public UserController(ILogService loggerService, IUserService userService, IContacttypService contacttypService,
                       IAuthrolService authrolService, IOrgService orgService, IMessagetemplateService messagetemplateService,
                       IMessageuserService messageuserService, IWkflowdefService wkflowdefService, IWkflowinstanceService wkflowinstanceService,
                       IOrgtyporgstatusService orgtyporgstatusService, IOrguserService _IOrguserService, IUnitOfWork unitOfWork)
 {
     this._LoggerService           = loggerService;
     this._IUserService            = userService;
     this._IContacttypService      = contacttypService;
     this._IAuthrolService         = authrolService;
     this._IOrgService             = orgService;
     this._IMessagetemplateService = messagetemplateService;
     this._IMessageuserService     = messageuserService;
     this._IWkflowdefService       = wkflowdefService;
     this._IWkflowinstanceService  = wkflowinstanceService;
     this._IOrgtyporgstatusService = orgtyporgstatusService;
 }
Пример #25
0
        public ResellerController(ILogService loggerService, IOrgService orgService, IOrgcustService orgCustService,
                                  IOrgresellerService orgResellerService, IOrgorgService orgorgService, IOrgtyporgstatusService orgtyporgstatusService,
                                  IUserService userService, IWkflowinstanceService wkflowinstanceService, IOrgdoctypService orgdoctypService,
                                  ISouploadService souploadService, IOrgdoctypdailyuploadService orgdoctypdailyuploadService)
        {
            this._loggerService = loggerService;
            this._OrgService    = orgService;

            _IOrgcustService              = orgCustService;
            _IOresellerService            = orgResellerService;
            _IOrgorgService               = orgorgService;
            _IOrgtyporgstatusService      = orgtyporgstatusService;
            _IUserService                 = userService;
            _IWkflowinstanceService       = wkflowinstanceService;
            _IOrgdoctypService            = orgdoctypService;
            _ISouploadService             = souploadService;
            _IOrgdoctypdailyuploadService = orgdoctypdailyuploadService;
        }
Пример #26
0
        public JsonResult PreCalcUnitCode(string unitName)
        {
            Hashtable   r              = new Hashtable();
            string      py             = NPinyin.Pinyin.GetInitials(unitName, System.Text.Encoding.UTF8);
            IOrgService os             = Beyondbit.BUA.Client.ServiceFactory.Instance().GetOrgService();
            bool        unitCodeExists = true;
            string      msg            = "组织机构代码已存在";

            try
            {
                Org orgExists = os.GetOrgBaseInfo(ObjectType.Org, py);
            }
            catch (ClientException ex)
            {
                if (ex.ErrCode == "9001")
                {
                    unitCodeExists = false;
                    msg            = ex.Message;
                }
            }

            if (unitCodeExists)
            {
                r["r"]        = false;
                r["unitcode"] = "";
                r["d"]        = msg;
                return(Json(r));
            }

            if (String.IsNullOrEmpty(unitName))
            {
                r["r"]        = false;
                r["unitcode"] = "";
                r["d"]        = "计算单位代码失败!";
            }
            else
            {
                r["r"]        = true;
                r["unitcode"] = py;
                r["d"]        = "计算单位代码成功!";
            }
            return(Json(r));
        }
Пример #27
0
        private void GetBUAChildUnit(Hashtable pHash, IOrgService os, string orgCode)
        {
            List <Hashtable> lst = new List <Hashtable>();

            Org[] orgs = os.QuerySubOrgs(orgCode);
            if (orgs != null && orgs.Length > 0)
            {
                foreach (Org org in orgs)
                {
                    Hashtable horg = new Hashtable();
                    horg["id"]   = org.OrgCode;
                    horg["text"] = org.OrgName;
                    lst.Add(horg);
                    GetBUAChildUnit(horg, os, org.OrgCode);
                }
            }

            pHash["children"] = lst;
        }
Пример #28
0
 public UploadActivityController(ILogService loggerService, IUserService userService, IUnitOfWork unitOfWork,
                                 IWkflowdefService wkflowdefService, IWkflowinstanceService wkflowinstanceService,
                                 IDpworkflowService dpworkflowService, IOrgdoctypdataelmService orgdoctypdataelmService,
                                 IOrgService orgService, IOrgdoctypService orgdoctypService, IWkflowdefstatreaService wkflowdefstatreaService,
                                 IPortsettingService portsettingService, IOrgcustService orgcustService)
 {
     this._LoggerService            = loggerService;
     this._IUserService             = userService;
     this._IWkflowdefService        = wkflowdefService;
     this._IWkflowinstanceService   = wkflowinstanceService;
     this._IDpworkflowService       = dpworkflowService;
     this._IOrgdoctypdataelmService = orgdoctypdataelmService;
     this._UnitOfWork               = unitOfWork;
     this._IOrgService              = orgService;
     this._IOrgdoctypService        = orgdoctypService;
     this._IWkflowdefstatreaService = wkflowdefstatreaService;
     this._IPortsettingService      = portsettingService;
     this._IOrgcustService          = orgcustService;
 }
Пример #29
0
        public JsonResult AddUnit(string unitCode, string unit)
        {
            IOrgService os = Beyondbit.BUA.Client.ServiceFactory.Instance().GetOrgService();
            Hashtable   r  = new Hashtable();

            try
            {
                Org orgExists = os.GetOrgBaseInfo(ObjectType.Org, unitCode);
            }
            catch (ClientException ex)
            {
                if (ex.ErrCode == "9001")
                {
                    //unitCodeExists = false;
                    //msg = ex.Message;
                }
            }
            //Org org = new Org();
            //org.OrgCode = unitCode;
            //org.OrgName = unit;
            //org.ParentOrgCode = os.GetTopOrg().OrgCode;
            try
            {
                //os.AddOrg(org);
            }
            catch (ClientException e)
            {
                //1002,1003
                r["r"] = false;
                r["d"] = e.Message;
                return(Json(r));
            }

            SmartBox.Console.Common.Entities.SMC_Unit Unit = new Common.Entities.SMC_Unit();
            Unit.Unit_ID   = unitCode;
            Unit.Unit_Name = unit;
            Bo.BoFactory.GetSMC_UnitBo.InsertOrUpdate(Unit);


            r["r"] = true;
            r["d"] = "新增单位成功!";
            return(Json(r));
        }
Пример #30
0
        public SignupController(ILogService loggerService, IOrgService orgService, IOrgcustService orgCustService,
                                IOrgresellerService orgResellerService, IOrgorgService orgorgService, IOrgtypService orgtypService,
                                IUserService userService, IWkflowdefService wkflowdefService, IWkflowinstanceService wkflowinstanceService,
                                IAuthrolService authrolService, IMessagetemplateService messagetemplateService, IContacttypService contacttypService,
                                IOrgtyporgstatusService orgtyporgstatusService)
        {
            this._loggerService = loggerService;
            this._IOrgService   = orgService;

            _IOrgcustService     = orgCustService;
            _IOrgresellerService = orgResellerService;
            _IOrgorgService      = orgorgService;
            _IOrgtypService      = orgtypService;
            _IUserService        = userService;

            _IWkflowdefService       = wkflowdefService;
            _IWkflowinstanceService  = wkflowinstanceService;
            _IAuthrolService         = authrolService;
            _IMessagetemplateService = messagetemplateService;
            _IContacttypService      = contacttypService;
            _IOrgtyporgstatusService = orgtyporgstatusService;
        }
 private void GetOrgs(IOrgService os, string orgCode, List<Org> orgs)
 {
     Org[] _orgs = os.QuerySubOrgs(orgCode);
     if (_orgs != null && _orgs.Length > 0)
     {
         foreach (Org org in _orgs)
         {
             orgs.Add(org);
             GetOrgs(os, org.OrgCode, orgs);
         }
     }
 }
        private void parseUnitUserData(Hashtable parent, Org org, IUserService us, IOrgService os)
        {
            //Hashtable hashOrg = new Hashtable();
            //parent["id"] = "o_" + org.OrgCode;
            //parent["text"] = org.OrgName;
            List<Hashtable> lst = parent["children"] as List<Hashtable>;

            //Hashtable hsOrg = new Hashtable();
            //hsOrg["id"] = "o_" + org.OrgCode;
            //hsOrg["text"] = org.OrgName;
            //hsOrg["children"] = new List<Hashtable>();
            //lst.Add(hsOrg);

            List<User> users = new List<Beyondbit.BUA.Client.User>();
            User[] _users = null;
            try
            {
                _users = us.QueryUsersByObjectCode(ObjectType.Org, org.OrgCode);
            }
            catch
            {
            }

            if (_users != null && _users.Length > 0)
            {
                foreach (Beyondbit.BUA.Client.User u in _users)
                {
                    Hashtable hUser = new Hashtable();
                    hUser["id"] = "u_" + u.UserUid;
                    hUser["text"] = u.UserName;
                    lst.Add(hUser);
                }
            }

            Org[] childOrgs = os.QuerySubOrgs(org.OrgCode);
            if (childOrgs != null && childOrgs.Length > 0)
            {
                foreach (Org o in childOrgs)
                {
                    Hashtable hOrg = new Hashtable();
                    hOrg["id"] = "o_" + o.OrgCode;
                    hOrg["text"] = o.OrgName;
                    hOrg["children"] = new List<Hashtable>();
                    lst.Add(hOrg);
                    parseUnitUserData(hOrg, o, us, os);
                }
            }
        }
        private void GetBUAChildUnit(Hashtable pHash, IOrgService os, string orgCode)
        {
            List<Hashtable> lst = new List<Hashtable>();
            Org[] orgs = os.QuerySubOrgs(orgCode);
            if (orgs != null && orgs.Length > 0)
            {
                foreach (Org org in orgs)
                {
                    Hashtable horg = new Hashtable();
                    horg["id"] = org.OrgCode;
                    horg["text"] = org.OrgName;
                    lst.Add(horg);
                    GetBUAChildUnit(horg, os, org.OrgCode);
                }
            }

            pHash["children"] = lst;
        }