Ejemplo n.º 1
0
        public Details_UserDefinedTableType(Oe.UserDefinedTableType o)
            : this()
        {
            this.OeUserDefinedTableType = o;
            _Path_Label.Content         = o.Parent.Parent.Parent.Text + @"\" + o.Parent.Parent.Text + @"\UserDefinedTableTypes\" + o.Text;

            var so = WMain.Instance.MySmoProvider.GetUserDefinedTableType(o);

            so.ParentDatabase = new MySmo.Database {
                Name = o.Parent.Parent.Name
            };                                                                      // for save
            this.MySmoUserDefinedTableType = so;
            this.DataContext = so;
        }
        public Configures_UserDefinedTableType(Oe.UserDefinedTableType o)
            : this()
        {
            this.O = o;

            var cfgs = WMain.Instance.Configures.FindAll(a =>
            {
                return((int)(a.TargetSqlElementType & SqlElementTypes.UserDefinedTableType) > 0 && a.Validate(o));
            });

            foreach (var cfg in cfgs)
            {
                var c = new Label
                {
                    Content = (string)cfg.Properties[GenProperties.Caption]
                    ,
                    ToolTip = (string)cfg.Properties[GenProperties.Tips]
                    ,
                    Tag = cfg
                };
                c.MouseDown += new MouseButtonEventHandler(c_MouseDown);
                _Configures_StackPanel.Children.Add(c);
            }
        }
Ejemplo n.º 3
0
 public MySmo.UserDefinedTableType GetUserDefinedTableType(Oe.UserDefinedTableType oe_userdefinedtabletype)
 {
     return(GetUserDefinedTableType(_smo_server.Databases[oe_userdefinedtabletype.Parent.Parent.Name].UserDefinedTableTypes[oe_userdefinedtabletype.Name, oe_userdefinedtabletype.Schema]));
 }