示例#1
0
            public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
            {
                DBPropertySettings db = context.Instance as DBPropertySettings;

                Array.Sort(db.FKList);
                return(new StandardValuesCollection(db.FKList));
            }
示例#2
0
        protected void LoadDBProperties()
        {
            sd      = DataAccess.GetSchema(DatabaseLocation);
            dbprops = new DBPropertySettings();

            dbprops.DbFileName   = DatabaseLocation;
            dbprops.DbName       = sd.DBName;
            dbprops.DbSize       = sd.DBSize.ToString();
            dbprops.DbCreateDate = sd.CreateDate.ToString();
            dbprops.DbLastUpdate = sd.LastUpDate.ToString();
            dbprops.DbTables     = sd.Tables.Count.ToString();
            dbprops.DbViews      = sd.Views.Count.ToString();

            int idxCount = 0;

            foreach (var table in sd.Tables)
            {
                idxCount += table.Value.Indexes.Count;
            }
            dbprops.DbIndexes  = idxCount.ToString();
            dbprops.DbTriggers = sd.Triggers.Count.ToString();
        }