Пример #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 DataTable GetChildrenUsers(string organizeId)
        {
            string[] organizeIds     = null;
            var      organizeManager = new PiOrganizeManager(this.DBProvider, this.UserInfo);

            switch (DBProvider.CurrentDbType)
            {
            case CurrentDbType.Access:
            case CurrentDbType.SqlServer:
                var organizeCode = this.GetCodeById(organizeId);
                organizeIds = organizeManager.GetChildrensIdByCode(PiOrganizeTable.FieldCode, organizeCode);
                break;

            case CurrentDbType.Oracle:
                organizeIds = organizeManager.GetChildrensId(PiOrganizeTable.FieldId, organizeId, PiOrganizeTable.FieldParentId);
                break;
            }
            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));
        }
Пример #4
0
        public DataTable GetChildrenStaffs(string organizeId)
        {
            PiOrganizeManager organizeManager = new PiOrganizeManager(this.DBProvider, this.UserInfo);

            string[] organizeIds = null;
            switch (DBProvider.CurrentDbType)
            {
            case CurrentDbType.Access:
            case CurrentDbType.SqlServer:
                string organizeCode = DbCommonLibary.GetProperty(dbProvider, PiOrganizeTable.TableName, PiOrganizeTable.FieldId, organizeId, PiOrganizeTable.FieldCode);    //this.GetCodeById(organizeId);
                organizeIds = organizeManager.GetChildrensIdByCode(PiOrganizeTable.FieldCode, organizeCode);
                break;

            case CurrentDbType.Oracle:
                organizeIds = organizeManager.GetChildrensId(PiOrganizeTable.FieldId, organizeId, PiOrganizeTable.FieldParentId);
                break;

            case CurrentDbType.MySql:
                organizeIds = organizeManager.GetMySqlChildrensId(PiOrganizeTable.FieldId, organizeId, PiOrganizeTable.FieldParentId);
                break;
            }
            return(this.GetDTByOrganizes(organizeIds));
        }