public Details_StoredProcedure(Oe.StoredProcedure o)
            : this()
        {
            this.OeStoredProcedure = o;
            _Path_Label.Content    = o.Parent.Parent.Parent.Text + @"\" + o.Parent.Parent.Text + @"\StoredProcedures\" + o.Text;

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

            so.ParentDatabase = new MySmo.Database {
                Name = o.Parent.Parent.Name
            };                                                                      // for save
            this.MySmoStoredProcedure = so;
            this.DataContext          = so;
        }
Esempio n. 2
0
        public Actions_StoredProcedure(Oe.StoredProcedure o)
            : this()
        {
            this.O = o;

            var gens = WMain.Instance.Generators.FindAll(a =>
            {
                return((int)(a.TargetSqlElementType & SqlElementTypes.StoredProcedure) > 0 && a.Validate(o));
            });

            foreach (var gen in gens)
            {
                var c = new Label
                {
                    Content = (string)gen.Properties[GenProperties.Caption]
                    ,
                    ToolTip = (string)gen.Properties[GenProperties.Tips]
                    ,
                    Tag = gen
                };
                c.MouseDown += new MouseButtonEventHandler(c_MouseDown);
                _Actions_StackPanel.Children.Add(c);
            }
        }
Esempio n. 3
0
 public MySmo.StoredProcedure GetStoredProcedure(Oe.StoredProcedure oe_storedprocedure)
 {
     return(GetStoredProcedure(_smo_server.Databases[oe_storedprocedure.Parent.Parent.Name].StoredProcedures[oe_storedprocedure.Name, oe_storedprocedure.Schema]));
 }