示例#1
0
        public StaffTable(string schemaName)
            : base("CT_STAFF", schemaName)
        {
            AddColumn(new BigIntColumn("staff_id"));
            AddColumn(new Ct7UniqueNameColumn());
            AddColumn(new Ct7NameColumn());
            AddColumn(new StringColumn("title", ColumnConstants.StrLenStaffStudentTitle));
            AddColumn(new Ct7SexColumn());
            AddColumn(ColumnUtils.CreateAddressColumns());
            AddColumn(new BigIntColumn("room_id"));
            AddColumn(new BigIntColumn("dept_id"));
            AddColumn(ColumnUtils.CreateCustomColumns());
            AddColumn(new IntColumn("allowance_week"));
            AddColumn(new IntColumn("allowance_total"));
            AddColumn(ColumnUtils.CreateTargetColumns());
            AddColumn(new Ct7SchedulableColumn());
            AddColumn(ColumnUtils.CreateStdTelColumns());
            AddColumn(new Ct7EmailColumn());
            AddColumn(new Ct7WebColumn());
            AddColumn(new StringColumn("profile", ColumnConstants.StrLenStd));
            AddColumn(ColumnUtils.CreateSpecialNeedsColumns());
            AddColumn(new Ct7NotesColumn());
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumns());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddColumnReferenceCheck(new RoomIdReferenceCheck());
            AddColumnReferenceCheck(new DeptIdReferenceCheck());
            AddColumnReferenceCheck(new AuditReferenceCheck());
            AddColumnReferenceCheck(new OriginReferenceCheck());

            RegisterFederatedIdCols();
            RegisterConsolidatedIdCols();
        }
示例#2
0
        public RoomTable()
            : base("ROOM")
        {
            AddColumn(new BigIntColumn("room_id", ColumnNullable.False));
            AddColumn(new Ct7UniqueNameColumn());
            AddColumn(new Ct7NameColumn());
            AddColumn(ColumnUtils.CreateDeptIdAndNameColumns());
            AddColumn(ColumnUtils.CreateFacultyIdAndNameColumns());
            AddColumn(ColumnUtils.CreateSiteIdAndNameColumns());
            AddColumn(new FloatColumn("area"));
            AddColumn(ColumnUtils.CreateStaff1And2ColumnsWithNames());
            AddColumn(ColumnUtils.CreateCustomColumns());
            AddColumn(ColumnUtils.CreateSchedulableColumn());
            AddColumn(new IntColumn("default_capacity"));
            AddColumn(new FloatColumn("charge"));
            AddColumn(new Ct7TelephoneColumn());
            AddColumn(new Ct7WebColumn());
            AddColumn(ColumnUtils.CreateSpecialNeedsColumns());
            AddColumn(new Ct7NotesColumn());
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumnsWithNames());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddPrimaryKey("room_id");
            AddUniqueNameIndex();
            AddNameIndex();
        }
示例#3
0
        public StaffTable()
            : base("STAFF")
        {
            AddColumn(new BigIntColumn("staff_id", ColumnNullable.False));
            AddColumn(new Ct7UniqueNameColumn());
            AddColumn(new Ct7NameColumn());
            AddColumn(new StringColumn("title", ColumnConstants.StrLenStaffStudentTitle));
            AddColumn(new Ct7SexColumn());
            AddColumn(ColumnUtils.CreateAddressColumns());
            AddColumn(ColumnUtils.CreateRoomIdAndNameColumns());
            AddColumn(ColumnUtils.CreateDeptIdAndNameColumns());
            AddColumn(ColumnUtils.CreateFacultyIdAndNameColumns());
            AddColumn(ColumnUtils.CreateCustomColumns());
            AddColumn(new IntColumn("allowance_week"));
            AddColumn(new IntColumn("allowance_total"));
            AddColumn(ColumnUtils.CreateTargetColumns());
            AddColumn(ColumnUtils.CreateSchedulableColumn());
            AddColumn(ColumnUtils.CreateStdTelColumns());
            AddColumn(new Ct7EmailColumn());
            AddColumn(new Ct7WebColumn());
            AddColumn(new StringColumn("profile", ColumnConstants.StrLenStd));
            AddColumn(ColumnUtils.CreateSpecialNeedsColumns());
            AddColumn(new Ct7NotesColumn());
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumnsWithNames());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddPrimaryKey("staff_id");
            AddUniqueNameIndex();
            AddNameIndex();
        }
示例#4
0
        private static void HandleFirstRows()
        {
            List <string> assemblyEntries = ColumnUtils.FindColumn(_list, "Assembly", out _).GetLastChunk().Entries;
            List <string> partEntries     = ColumnUtils.FindColumn(_list, "Part", out _).GetLastChunk().Entries;
            List <string> gradeEntries    = ColumnUtils.FindColumn(_list, "Grade", out _).GetLastChunk().Entries;
            List <string> weightEntries   = ColumnUtils.FindColumn(_list, "Weight", out _).GetLastChunk().Entries;
            List <string> lengthEntries   = ColumnUtils.FindColumn(_list, "Length", out _).GetLastChunk().Entries;

            for (int entryIndex = 0; entryIndex < assemblyEntries.Count; entryIndex++)
            {
                string partEntry = partEntries.ElementAt(entryIndex);
                if (!partEntry.Contains(" "))
                {
                    string gradeEntry = gradeEntries.ElementAt(entryIndex);

                    assemblyEntries.UpdateElementAt(entryIndex, partEntry);
                    partEntries.UpdateElementAt(entryIndex, "");

                    weightEntries.InsertAndRemoveLastElement(entryIndex, gradeEntry);
                    gradeEntries.UpdateElementAt(entryIndex, "");

                    lengthEntries.InsertAndRemoveLastElement(entryIndex, "");
                }
            }
        }
示例#5
0
        public ModuleTable(string schemaName)
            : base("CT_MODULE", schemaName)
        {
            AddColumn(new BigIntColumn("module_id"));
            AddColumn(new Ct7UniqueNameColumn());
            AddColumn(new Ct7NameColumn());
            AddColumn(new Ct7AcademicYearColumn());
            AddColumn(new BigIntColumn("dept_id"));
            AddColumn(ColumnUtils.CreateStaff1And2Columns());
            AddColumn(ColumnUtils.CreateCustomColumns());
            AddColumn(ColumnUtils.CreateTargetColumns());
            AddColumn(new Ct7SchedulableColumn());
            AddColumn(new Ct7WebColumn());
            AddColumn(new Ct7NotesColumn());
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumns());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddColumnReferenceCheck(new DeptIdReferenceCheck());
            AddColumnReferenceCheck(new StaffReferenceCheck(1));
            AddColumnReferenceCheck(new StaffReferenceCheck(2));
            AddColumnReferenceCheck(new AuditReferenceCheck());
            AddColumnReferenceCheck(new OriginReferenceCheck());

            RegisterFederatedIdCols();
            RegisterConsolidatedIdCols();
        }
示例#6
0
        public StudentTable()
            : base("STUDENT")
        {
            AddColumn(new BigIntColumn("student_id", ColumnNullable.False));
            AddColumn(new Ct7UniqueNameColumn());
            AddColumn(new Ct7NameColumn());
            AddColumn(new StringColumn("title", ColumnConstants.StrLenStaffStudentTitle));
            AddColumn(new Ct7SexColumn());
            AddColumn(new DateTimeColumn("dob"));
            AddColumn(ColumnUtils.CreateAddressColumns());
            AddColumn(ColumnUtils.CreateRoomIdAndNameColumns());
            AddColumn(new Ct7AcademicYearColumn());
            AddColumn(ColumnUtils.CreateDeptIdAndNameColumns());
            AddColumn(ColumnUtils.CreateFacultyIdAndNameColumns());
            AddColumn(ColumnUtils.CreateStaffIdAndNameColumns());
            AddColumn(ColumnUtils.CreateCustomColumns());
            AddColumn(new StringColumn("card_num", ColumnConstants.StrLenStd));
            AddColumn(ColumnUtils.CreateTargetColumns());
            AddColumn(ColumnUtils.CreateSchedulableColumn());
            AddColumn(ColumnUtils.CreateStdTelColumns());
            AddColumn(new Ct7EmailColumn());
            AddColumn(new Ct7WebColumn());
            AddColumn(new StringColumn("profile", ColumnConstants.StrLenStd));
            AddColumn(new StringColumn("photo_file", ColumnConstants.StrLenPhotoFile));
            AddColumn(ColumnUtils.CreateSpecialNeedsColumns());
            AddColumn(new Ct7NotesColumn());
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumnsWithNames());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddPrimaryKey("student_id");
            AddUniqueNameIndex();
            AddNameIndex();
        }
示例#7
0
        public EventInstanceTable()
            : base("EVENT_INSTANCE")
        {
            AddColumn(new NotNullStringColumn("event_instance_id", ColumnConstants.StrLenEventInstance));
            AddColumn(new BigIntColumn("event_id", ColumnNullable.False));
            AddColumn(new BigIntColumn("timetable_id", ColumnNullable.False));
            AddColumn(new BigIntColumn("timetable_event_id", ColumnNullable.False));
            AddColumn(new IntColumn("timetable_week", ColumnNullable.False));
            AddColumn(new IntColumn("timetable_occurrence", ColumnNullable.False));
            AddColumn(new StringColumn("event_name", ColumnConstants.StrLenStd));
            AddColumn(new IntColumn("day_of_week", ColumnNullable.False));
            AddColumn(new DateTimeColumn("start_time", ColumnNullable.False));
            AddColumn(new DateTimeColumn("end_time", ColumnNullable.False));
            AddColumn(new IntColumn("break_mins"));
            AddColumn(ColumnUtils.CreateSpanIdAndNameColumns());
            AddColumn(ColumnUtils.CreateEventCatIdAndNameColumns());
            AddColumn(ColumnUtils.CreateCustomColumns());
            AddColumn(new IntColumn("capacity_req"));
            AddColumn(ColumnUtils.CreateDeptIdAndNameColumns());
            AddColumn(ColumnUtils.CreateFacultyIdAndNameColumns());
            AddColumn(new BitColumn("global_event"));
            AddColumn(new BitColumn("protected"));
            AddColumn(new BitColumn("suspended"));
            AddColumn(new IntColumn("grouping_id"));
            AddColumn(new BitColumn("registers_req", ColumnNullable.True));
            AddColumn(new BitColumn(ColumnConstants.RegistersReqResolvedColumnName));
            AddColumn(new Ct7NotesColumn());
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumnsWithNames());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddPrimaryKey("event_instance_id");
        }
示例#8
0
        public EquipTable(string schemaName)
            : base("CT_EQUIP", schemaName)
        {
            AddColumn(new BigIntColumn("equip_id"));
            AddColumn(new Ct7UniqueNameColumn());
            AddColumn(new Ct7NameColumn());
            AddColumn(new BigIntColumn("dept_id"));
            AddColumn(ColumnUtils.CreateStaff1And2Columns());
            AddColumn(ColumnUtils.CreateCustomColumns());
            AddColumn(new IntColumn("booking_interval"));
            AddColumn(new Ct7SchedulableColumn());
            AddColumn(new FloatColumn("charge"));
            AddColumn(new Ct7WebColumn());
            AddColumn(new Ct7NotesColumn());
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumns());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddColumnReferenceCheck(new DeptIdReferenceCheck());
            AddColumnReferenceCheck(new StaffReferenceCheck(1));
            AddColumnReferenceCheck(new StaffReferenceCheck(2));
            AddColumnReferenceCheck(new AuditReferenceCheck());
            AddColumnReferenceCheck(new OriginReferenceCheck());

            RegisterFederatedIdCols();
            RegisterConsolidatedIdCols();
        }
示例#9
0
        public BookingTable(string schemaName)
            : base("CT_BOOKING", schemaName)
        {
            AddColumn(new BigIntColumn("booking_id"));
            AddColumn(new StringColumn("title", ColumnConstants.StrLenStd));
            AddColumn(new BigIntColumn("user_id"));
            AddColumn(new BigIntColumn("dept_id"));
            AddColumn(new Ct7NotesColumn("search_criteria"));
            AddColumn(new BigIntColumn("event_cat_id"));
            AddColumn(new StringColumn("requester_name", ColumnConstants.StrLenStd));
            AddColumn(new StringColumn("requester_email", ColumnConstants.StrLenStd));
            AddColumn(new Ct7BoolColumn("add_me"));
            AddColumn(new IntColumn("status"));
            AddColumn(new Ct7NotesColumn());
            AddColumn(new Ct7NotesColumn("audit_notes"));
            AddColumn(new IntColumn("sb_status"));
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumns());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddColumnReferenceCheck(new ColumnReferenceCheck("CT_USER", "user_id"));
            AddColumnReferenceCheck(new DeptIdReferenceCheck());
            AddColumnReferenceCheck(new EventCatIdReferenceCheck());
            AddColumnReferenceCheck(new AuditReferenceCheck());
            AddColumnReferenceCheck(new OriginReferenceCheck());

            RegisterFederatedIdCols();
            RegisterConsolidatedIdCols();
        }
示例#10
0
        private static void DivideDataIntoChunks()
        {
            int numEntries = GetNumEntries();

            BoltsDeliveryContentType lastContentType = BoltsDeliveryContentType.Null;
            string lastStandardEntry = string.Empty;

            List <StringColumn> newColumns = ColumnUtils.GetClonedColumns(_list);

            for (int entryIndex = 0; entryIndex < numEntries; entryIndex++)
            {
                BoltsDeliveryContentType entryType = GetEntryContentType(entryIndex);
                string standardEntry = _list.Columns.First().GetLastChunk().Entries.ElementAt(entryIndex);

                if (entryType == BoltsDeliveryContentType.Null)
                {
                    continue;
                }

                if (entryType != lastContentType || !lastStandardEntry.Equals(standardEntry))
                {
                    AddDataChunks(newColumns);
                }

                AddEntry(entryIndex, newColumns);

                lastContentType   = entryType;
                lastStandardEntry = standardEntry;
            }

            _list.Columns = newColumns;
        }
示例#11
0
        public GroupTable()
            : base("GROUP")
        {
            AddColumn(new BigIntColumn("group_id", ColumnNullable.False));
            AddColumn(new Ct7UniqueNameColumn());
            AddColumn(new Ct7NameColumn());
            AddColumn(new Ct7AcademicYearColumn());
            AddColumn(ColumnUtils.CreateDeptIdAndNameColumns());
            AddColumn(ColumnUtils.CreateFacultyIdAndNameColumns());
            AddColumn(ColumnUtils.CreateStaff1And2ColumnsWithNames());
            AddColumn(ColumnUtils.CreateCustomColumns());
            AddColumn(ColumnUtils.CreateTargetColumns());
            AddColumn(new IntColumn("target_size"));
            AddColumn(new IntColumn("group_size"));
            AddColumn(new IntColumn("additional"));
            AddColumn(new IntColumn("split_id"));
            AddColumn(ColumnUtils.CreateSchedulableColumn());
            AddColumn(new Ct7EmailColumn());
            AddColumn(new Ct7WebColumn());
            AddColumn(new Ct7NotesColumn());
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumnsWithNames());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddPrimaryKey("group_id");
            AddUniqueNameIndex();
            AddNameIndex();
        }
示例#12
0
        public ExamTable(string schemaName)
            : base("CT_ES_EXAM", schemaName)
        {
            AddColumn(new BigIntColumn("exam_id"));
            AddColumn(new Ct7UniqueNameColumn());
            AddColumn(new Ct7NameColumn());
            AddColumn(new BigIntColumn("session_id"));
            AddColumn(new IntColumn("duration"));
            AddColumn(new BigIntColumn("event_cat_id"));
            AddColumn(ColumnUtils.CreateCustomColumns());
            AddColumn(new IntColumn("capacity_req"));
            AddColumn(new BigIntColumn("dept_id"));
            AddColumn(new Ct7BoolColumn("protected"));
            AddColumn(new Ct7BoolColumn("suspended"));
            AddColumn(new IntColumn("grouping_id"));
            AddColumn(new Ct7BoolColumn("registers_req"));
            AddColumn(new Ct7BoolColumn(ColumnConstants.RegistersReqResolvedColumnName));
            AddColumn(new Ct7NotesColumn());
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumns());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddColumnReferenceCheck(new ExamSessionIdReferenceCheck());
            AddColumnReferenceCheck(new EventCatIdReferenceCheck());
            AddColumnReferenceCheck(new DeptIdReferenceCheck());
            AddColumnReferenceCheck(new AuditReferenceCheck());
            AddColumnReferenceCheck(new OriginReferenceCheck());

            RegisterFederatedIdCols();
            RegisterConsolidatedIdCols();
        }
示例#13
0
        public ExamTable()
            : base("EXAM")
        {
            AddColumn(new BigIntColumn("exam_id", ColumnNullable.False));
            AddColumn(new Ct7UniqueNameColumn());
            AddColumn(new Ct7NameColumn());
            AddColumn(new BigIntColumn("session_id", ColumnNullable.False));
            AddColumn(new NotNullStringColumn("session_name"));
            AddColumn(new IntColumn("duration"));
            AddColumn(ColumnUtils.CreateEventCatIdAndNameColumns());
            AddColumn(ColumnUtils.CreateCustomColumns());
            AddColumn(new IntColumn("capacity_req"));
            AddColumn(ColumnUtils.CreateDeptIdAndNameColumns());
            AddColumn(ColumnUtils.CreateFacultyIdAndNameColumns());
            AddColumn(new BitColumn("protected"));
            AddColumn(new BitColumn("suspended"));
            AddColumn(new IntColumn("grouping_id"));
            AddColumn(new BitColumn("registers_req", ColumnNullable.True));
            AddColumn(new Ct7BoolColumn(ColumnConstants.RegistersReqResolvedColumnName));
            AddColumn(new Ct7NotesColumn());
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumnsWithNames());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddPrimaryKey("exam_id");
        }
示例#14
0
        public GroupTable(string schemaName)
            : base("CT_GROUP", schemaName)
        {
            AddColumn(new BigIntColumn("group_id"));
            AddColumn(new Ct7UniqueNameColumn());
            AddColumn(new Ct7NameColumn());
            AddColumn(new Ct7AcademicYearColumn());
            AddColumn(new BigIntColumn("dept_id"));
            AddColumn(ColumnUtils.CreateStaff1And2Columns());
            AddColumn(ColumnUtils.CreateCustomColumns());
            AddColumn(ColumnUtils.CreateTargetColumns());
            AddColumn(new IntColumn("target_size"));
            AddColumn(new IntColumn("group_size"));
            AddColumn(new IntColumn("additional"));
            AddColumn(new IntColumn("split_id"));
            AddColumn(new Ct7SchedulableColumn());
            AddColumn(new Ct7EmailColumn());
            AddColumn(new Ct7WebColumn());
            AddColumn(new Ct7NotesColumn());
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumns());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddColumnReferenceCheck(new DeptIdReferenceCheck());
            AddColumnReferenceCheck(new StaffReferenceCheck(1));
            AddColumnReferenceCheck(new StaffReferenceCheck(2));
            AddColumnReferenceCheck(new AuditReferenceCheck());
            AddColumnReferenceCheck(new OriginReferenceCheck());

            RegisterFederatedIdCols();
            RegisterConsolidatedIdCols();
        }
示例#15
0
        public RoomTable(string schemaName)
            : base("CT_ROOM", schemaName)
        {
            AddColumn(new BigIntColumn("room_id"));
            AddColumn(new Ct7UniqueNameColumn());
            AddColumn(new Ct7NameColumn());
            AddColumn(new BigIntColumn("dept_id"));
            AddColumn(new BigIntColumn("site_id"));
            AddColumn(new FloatColumn("area"));
            AddColumn(ColumnUtils.CreateStaff1And2Columns());
            AddColumn(ColumnUtils.CreateCustomColumns());
            AddColumn(new Ct7SchedulableColumn());
            AddColumn(new IntColumn("default_capacity"));
            AddColumn(new FloatColumn("charge"));
            AddColumn(new Ct7TelephoneColumn());
            AddColumn(new Ct7WebColumn());
            AddColumn(ColumnUtils.CreateSpecialNeedsColumns());
            AddColumn(new Ct7NotesColumn());
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumns());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddColumnReferenceCheck(new DeptIdReferenceCheck());
            AddColumnReferenceCheck(new SiteIdReferenceCheck());
            AddColumnReferenceCheck(new StaffReferenceCheck(1));
            AddColumnReferenceCheck(new StaffReferenceCheck(2));
            AddColumnReferenceCheck(new AuditReferenceCheck());
            AddColumnReferenceCheck(new OriginReferenceCheck());

            RegisterFederatedIdCols();
            RegisterConsolidatedIdCols();
        }
示例#16
0
        public BookingRequirementTable()
            : base("BOOKING_REQUIREMENT")
        {
            AddColumn(new BigIntColumn("booking_id", ColumnNullable.False));
            AddColumn(ColumnUtils.CreateResourceTypeAndIdColumnsWithName(ColumnNullable.False));
            AddColumn(new BitColumn("send_email", ColumnNullable.True));

            AddPrimaryKey("booking_id", "resource_type", "resource_id");
        }
示例#17
0
        private static void SetColumnsInOrder()
        {
            StringColumn sizeColumn     = ColumnUtils.FindColumn(_list, "Size", out _);
            StringColumn classColumn    = GenerateClassColumn();
            StringColumn quantityColumn = ColumnUtils.FindColumn(_list, "Quantity", out _);
            StringColumn standardColumn = ColumnUtils.FindColumn(_list, "Standard", out _);
            StringColumn notesColumn    = GenerateNotesColumn();

            _list.Columns = new List <StringColumn>(new [] { sizeColumn, classColumn, quantityColumn, standardColumn, notesColumn });
        }
示例#18
0
        public ModuleClusterTable()
            : base("MODULE_CLUSTER")
        {
            AddColumn(new BigIntColumn("module_id", ColumnNullable.False));
            AddColumn(ColumnUtils.CreateResourceTypeAndIdColumnsWithName(ColumnNullable.False));
            AddColumn(new Ct7UniqueNameColumn("module_unique_name"));
            AddColumn(new Ct7NameColumn("module_name"));

            AddPrimaryKey("module_id", "resource_type", "resource_id");
        }
示例#19
0
        internal override Dictionary <MappingLovEFElement, string> GetListOfValues(ListOfValuesCollection type)
        {
            var lov = new Dictionary <MappingLovEFElement, string>();

            if (type == ListOfValuesCollection.ThirdColumn)
            {
                var entityType = MappingConceptualEntityType.ConceptualEntityType;
                var properties = new List <Property>();

                // for TPT, show keys for the top-most base type
                if (entityType.HasResolvableBaseType)
                {
                    if (InheritanceMappingStrategy.TablePerType == ModelHelper.DetermineCurrentInheritanceStrategy(entityType))
                    {
                        // for TPT, show keys for the top-most base type
                        EntityType topMostBaseType = entityType.ResolvableTopMostBaseType;
                        properties.AddRange(topMostBaseType.ResolvableKeys);
                    }
                }

                // also show all properties of the current entity
                properties.AddRange(entityType.Properties());

                if (ScalarProperty != null)
                {
                    // add the row at the top that the user can click on to remove the item
                    lov.Add(LovDeletePlaceHolder, LovDeletePlaceHolder.DisplayName);
                }

                if (properties.Count == 0)
                {
                    if (ScalarProperty == null)
                    {
                        lov.Add(LovEmptyPlaceHolder, LovEmptyPlaceHolder.DisplayName);
                    }
                }
                else
                {
                    // add those remaining in our list
                    foreach (var prop in properties)
                    {
                        ColumnUtils.AddPropertyToListOfValues(lov, prop, null);
                    }
                }

                return(lov);
            }
            else
            {
                Debug.Fail("Unsupported lov type was sent");
            }

            return(base.GetListOfValues(type));
        }
示例#20
0
        public AuxTimeTable()
            : base("AUX_TIME")
        {
            AddColumn(new BigIntColumn("activity_id", ColumnNullable.False));
            AddColumn(new BigIntColumn("student_id", ColumnNullable.False));
            AddColumn(ColumnUtils.CreateResourceTypeAndIdColumnsWithName(ColumnNullable.False));
            AddColumn(ColumnUtils.CreateAuditColumnsWithNames(ColumnNullable.False));
            AddColumn(new Ct7UniqueNameColumn("student_unique_name"));
            AddColumn(new Ct7NameColumn("student_name"));

            AddPrimaryKey("activity_id", "student_id", "resource_type", "resource_id");
        }
示例#21
0
        public ModuleFpTable()
            : base("MODULE_FP")
        {
            AddColumn(new BigIntColumn("module_id", ColumnNullable.False));
            AddColumn(ColumnUtils.CreateResourceTypeAndIdColumnsWithName(ColumnNullable.False));
            AddColumn(new FixedCharColumn("fix_pref", 1, ColumnNullable.False));
            AddColumn(new IntColumn("preference"));
            AddColumn(new Ct7UniqueNameColumn("module_unique_name"));
            AddColumn(new Ct7NameColumn("module_name"));

            AddPrimaryKey("module_id", "resource_type", "resource_id", "fix_pref");
        }
示例#22
0
        public ModuleClusterTable(string schemaName)
            : base("CT_MODULE_CLUSTER", schemaName)
        {
            AddColumn(new BigIntColumn("module_id"));
            AddColumn(ColumnUtils.CreateResourceTypeAndIdColumns());

            AddColumnReferenceCheck(new ModuleIdReferenceCheck());
            AddColumnReferenceCheck(new ResourceIdReferenceCheck());

            RegisterFederatedIdCols();
            RegisterConsolidatedIdCols();
        }
示例#23
0
        public AuxMarkTable()
            : base("AUX_MARK")
        {
            AddColumn(new BigIntColumn("student_id", ColumnNullable.False));
            AddColumn(ColumnUtils.CreateResourceTypeAndIdColumnsWithName(ColumnNullable.False));
            AddColumn(ColumnUtils.CreateAuditColumnsWithNames(ColumnNullable.False));
            AddColumn(ColumnUtils.CreateCustomColumns(2));
            AddColumn(new Ct7UniqueNameColumn("student_unique_name"));
            AddColumn(new Ct7NameColumn("student_name"));

            AddPrimaryKey("student_id", "resource_type", "resource_id", "date_change");
        }
示例#24
0
        public FixtureTable()
            : base("FIXTURE")
        {
            AddColumn(new BigIntColumn("fixture_id", ColumnNullable.False));
            AddColumn(new NotNullStringColumn("name"));
            AddColumn(new Ct7DescriptionColumn());
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumnsWithNames());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddPrimaryKey("fixture_id");
            AddNameIndex();
        }
示例#25
0
        public StaffCatTable()
            : base("STAFF_CAT")
        {
            AddColumn(new BigIntColumn("staff_cat_id", ColumnNullable.False));
            AddColumn(new NotNullStringColumn("name"));
            AddColumn(new Ct7DescriptionColumn());
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumnsWithNames());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddPrimaryKey("staff_cat_id");
            AddNameIndex();
        }
        public BookingRequirementTable(string schemaName)
            : base("CT_BOOKING_REQUIREMENT", schemaName)
        {
            AddColumn(new BigIntColumn("booking_id"));
            AddColumn(ColumnUtils.CreateResourceTypeAndIdColumns());
            AddColumn(new Ct7BoolColumn("send_email"));

            AddColumnReferenceCheck(new BookingIdReferenceCheck());
            AddColumnReferenceCheck(new ResourceIdReferenceCheck());

            RegisterFederatedIdCols();
            RegisterConsolidatedIdCols();
        }
示例#27
0
        internal override Dictionary <MappingLovEFElement, string> GetListOfValues(ListOfValuesCollection type)
        {
            var lov = new Dictionary <MappingLovEFElement, string>();

            Debug.Assert(type == ListOfValuesCollection.ThirdColumn, "Unsupported lov type was sent");

            if (type == ListOfValuesCollection.ThirdColumn)
            {
                var properties = new List <Property>();

                var entityType           = MappingFunctionEntityType.EntityType;
                var conceptualEntityType = entityType as ConceptualEntityType;

                if (conceptualEntityType != null)
                {
                    properties.AddRange(conceptualEntityType.SafeInheritedAndDeclaredProperties);
                }
                else
                {
                    properties.AddRange(entityType.Properties());
                }

                if (ResultBinding != null)
                {
                    // add the row at the top that the user can click on to remove the item
                    lov.Add(LovDeletePlaceHolder, LovDeletePlaceHolder.DisplayName);
                }

                if (properties.Count == 0)
                {
                    if (ResultBinding == null)
                    {
                        lov.Add(LovEmptyPlaceHolder, LovEmptyPlaceHolder.DisplayName);
                    }
                }
                else
                {
                    // add those remaining in our list
                    foreach (var prop in properties)
                    {
                        var displayName = ColumnUtils.BuildPropertyDisplay(prop.LocalName.Value, prop.TypeName);
                        lov.Add(new MappingLovEFElement(prop, displayName), displayName);
                    }
                }

                return(lov);
            }

            return(base.GetListOfValues(type));
        }
示例#28
0
        public LayoutTable()
            : base("LAYOUT")
        {
            AddColumn(new BigIntColumn("room_layout_id", ColumnNullable.False));
            AddColumn(new NotNullStringColumn("name"));
            AddColumn(new Ct7DescriptionColumn());
            AddColumn(new BitColumn("complex"));
            AddColumn(ColumnUtils.CreateLookupColumns());
            AddColumn(ColumnUtils.CreateAuditColumnsWithNames());
            AddColumn(ColumnUtils.CreateOriginColumns());

            AddPrimaryKey("room_layout_id");
            AddNameIndex();
        }
示例#29
0
        public NotificationTable()
            : base("NOTIFICATION")
        {
            AddColumn(new BigIntColumn("message_id", ColumnNullable.False));
            AddColumn(new BigIntColumn("student_id", ColumnNullable.False));
            AddColumn(new BigIntColumn("activity_id", ColumnNullable.False));
            AddColumn(new NotNullStringColumn("msg_text", ColumnConstants.StrLenDescription));
            AddColumn(new BitColumn("sent"));
            AddColumn(ColumnUtils.CreateAuditColumnsWithNames());
            AddColumn(new Ct7UniqueNameColumn("student_unique_name"));
            AddColumn(new Ct7NameColumn("student_name"));

            AddPrimaryKey("message_id");
        }
示例#30
0
        public ModuleFpTable(string schemaName)
            : base("CT_MODULE_FP", schemaName)
        {
            AddColumn(new BigIntColumn("module_id"));
            AddColumn(ColumnUtils.CreateResourceTypeAndIdColumns());
            AddColumn(new FixedCharColumn("fix_pref", 1));
            AddColumn(new IntColumn("preference"));

            AddColumnReferenceCheck(new ModuleIdReferenceCheck());
            AddColumnReferenceCheck(new ResourceIdReferenceCheck());

            RegisterFederatedIdCols();
            RegisterConsolidatedIdCols();
        }