示例#1
0
        private void button3_Click(object sender, EventArgs e)
        {
            IDtsVariableService vservice = (IDtsVariableService)_sp.GetService(typeof(IDtsVariableService));

            Microsoft.SqlServer.Dts.Runtime.Variable vv = vservice.PromptAndCreateVariable(this, null, "COOKIES_" + this.Name, "User", typeof(object));
            if (vv != null)
            {
                cookieVarTb.Text = vv.QualifiedName;
            }
        }
示例#2
0
 private void addButton_Click(object sender, EventArgs e)
 {
     if (variableR.Checked)
     {
         IDtsVariableService vservice = (IDtsVariableService)_sp.GetService(typeof(IDtsVariableService));
         Microsoft.SqlServer.Dts.Runtime.Variable vv = vservice.PromptAndCreateVariable(this, null, null, "User", typeof(string));
         if (vv != null)
         {
             uiWebURL.Text = vv.QualifiedName;
         }
     }
 }
            internal GeneralViewNode(TaskHost taskHost, IDtsConnectionService connectionService)
            {
                this.iDtsConnection = connectionService;
                this.myTaskHost = taskHost;
                this._variableService = this.myTaskHost.Site.GetService(typeof (IDtsVariableService)) as IDtsVariableService;

                // Extract common values from the Task Host
                name = taskHost.Name;
                description = taskHost.Description;

                // Extract values from the task object
                ExecuteAzureMLBatch task = taskHost.InnerObject as ExecuteAzureMLBatch;
                if (task == null)
                {
                    string msg = string.Format(CultureInfo.CurrentCulture, "Type mismatch for taskHost inner object. Received: {0} Expected: {1}", taskHost.InnerObject.GetType().Name, typeof(ExecuteAzureMLBatch).Name);
                    throw new ArgumentException(msg);
                }

                connection = task.Connection;
                azureMLUrl = task.AzureMLBaseURL;
                azureMLKey = task.AzureMLAPIKey;
                blobName = task.BlobName;
                sourceType = task.InputSource;                
                destinationType = task.OutputDestination;

                switch (sourceType)
                {
                    case (SourceType.BlobPath):
                        sourceBlobPath = task.Source;
                        break;
                    case (SourceType.DirectInput):
                        sourceDirect = task.Source;
                        break;
                    case (SourceType.FileConnection):
                        source = task.Source;
                        break;
                    case (SourceType.Variable):
                        sourceVariable = task.Source;
                        break;
                    default:
                        break;
                }

                switch (destinationType)
                {
                    case (DestinationType.FileConnection):
                        destination = task.Destination;
                        break;
                    case (DestinationType.Variable):
                        destinationVariable = task.Destination;
                        break;
                    default:
                        break;
                }
            }