Пример #1
0
        public DataTable GetParentChildrenStaffs(string organizeId)
        {
            string[]          organizeIds     = null;
            PiOrganizeManager organizeManager = new PiOrganizeManager(this.DBProvider, this.UserInfo);
            string            organizeCode    = organizeManager.GetCodeById(organizeId);

            organizeIds = organizeManager.GetChildrensIdByCode(PiOrganizeTable.FieldCode, organizeCode);
            return(this.GetDTByOrganizes(organizeIds));
        }
        public List <PiUserEntity> GetChildrenUserList(string organizeId)
        {
            string[] organizeIds = null;
            var      manager     = new PiOrganizeManager(base.DBProvider, base.UserInfo);

            switch (base.DBProvider.CurrentDbType)
            {
            case CurrentDbType.Oracle:
                organizeIds = manager.GetChildrensId(PiOrganizeTable.FieldId, organizeId, PiOrganizeTable.FieldParentId);
                break;

            case CurrentDbType.SqlServer:
            case CurrentDbType.Access:
            {
                string codeById = manager.GetCodeById(organizeId);
                organizeIds = manager.GetChildrensIdByCode(PiOrganizeTable.FieldCode, codeById);
                break;
            }
            }
            return(this.GetListByOrganizes(organizeIds));
        }