Esempio n. 1
0
        private void LoadTableData( )
        {
            using (var dataReader = _provider.Accessor.GetTableInfo(TableName))
            {
                var names = from DbDataRecord row in dataReader
                            select new EditableColumn( )
                {
                    Name         = row["column_name"].ToString( ),
                    Type         = row["data_type"].ToString( ),
                    Nullable     = row["nullable"].ToString( ).Equals("Y"),
                    PrimaryKey   = row["primary_key"].ToString( ).Equals("P"),
                    ForeignKey   = row["foreign_key"].ToString( ).Equals("R"),
                    FKName       = row["fk_symbol"].ToString( ),
                    SourceTable  = row["source_table"].ToString( ),
                    SourceColumn = row["source_column"].ToString( )
                };

                Columns = new ReportingCollection(names);
            }
            NotifyOfPropertyChange(() => Columns);
        }
Esempio n. 2
0
 public Teacher(string name, string surname) : base(name, surname)
 {
     Subjects = new ReportingCollection <Subject>();
     Subjects.BeforeCollectionChange += Subjects_BeforeCollectionChange;
 }
Esempio n. 3
0
 private Class()
 {
     students = new ReportingCollection <StudentListItem>();
     students.BeforeCollectionChange += Students_BeforeCollectionChange;
     students.AfterCollectionChanged += Students_AfterCollectionChange;
 }
Esempio n. 4
0
 public School()
 {
     Classes = new ReportingCollection <Class>();
     Classes.BeforeCollectionChange += Classes_BeforeCollectionChange;
 }