private void RenameItemThreaded(object state)
        {
            object[] objs = state as object[];

            ProcedureNode   node     = objs[0] as ProcedureNode;
            string          newName  = objs[1] as string;
            ISchemaProvider provider = node.Procedure.SchemaProvider;

            if (provider.IsValidName(newName))
            {
                provider.RenameProcedure(node.Procedure, newName);
                node.Refresh();
            }
            else
            {
                DispatchService.GuiDispatch(delegate() {
                    Services.MessageService.ShowError(String.Format(
                                                          "Unable to rename procedure '{0}' to '{1}'!",
                                                          node.Procedure.Name, newName
                                                          ));
                });
            }
            node.Refresh();
        }
        public override string GetNodeName(ITreeNavigator thisNode, object dataObject)
        {
            ProcedureNode node = dataObject as ProcedureNode;

            return(node.Procedure.Name);
        }
Ejemplo n.º 3
0
        public override bool HasChildNodes(ITreeBuilder builder, object dataObject)
        {
            ProcedureNode node = dataObject as ProcedureNode;

            return(node.ConnectionContext.SchemaProvider.IsSchemaActionSupported(SchemaType.ProcedureParameter, SchemaActions.Schema));
        }