示例#1
0
        private void cmdTestDB_Click(object sender, EventArgs e)
        {
            BizTalkPortAndOrchsCollectorConfigEntry currentConfig = new BizTalkPortAndOrchsCollectorConfigEntry();

            currentConfig.SqlServer  = txtSQLServer.Text;
            currentConfig.MgmtDBName = txtDatabase.Text;
            if (!currentConfig.TestConnection())
            {
                MessageBox.Show(currentConfig.LastError, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                MessageBox.Show("Success", "Connection test", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
示例#2
0
 private void cmdAddReceiveLocation_Click(object sender, EventArgs e)
 {
     try
     {
         BizTalkPortAndOrchsCollectorConfigEntry tmpentry = new BizTalkPortAndOrchsCollectorConfigEntry();
         tmpentry.SqlServer  = txtSQLServer.Text;
         tmpentry.MgmtDBName = txtDatabase.Text;
         if (!tmpentry.TestConnection())
         {
             MessageBox.Show(tmpentry.LastError, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else
         {
             BizTalkEditList editList = new BizTalkEditList();
             editList.Text        = "Receive Locations";
             editList.ColumnNames = new List <string>();
             editList.ColumnNames.Add("Receive Port");
             editList.ColumnNames.Add("Receive Location");
             editList.ColumnNames.Add("Host");
             editList.ValueColumn  = 1;
             editList.ExcludeItems = new List <string>();
             editList.ExcludeItems.AddRange((from string s in lstReceiveLocations.Items
                                             orderby s
                                             select s).ToArray());
             editList.Items = new List <string[]>();
             List <ReceiveLocationInfo> list = tmpentry.GetReceiveLocationList();
             foreach (var rl in list)
             {
                 editList.Items.Add(new string[] { rl.ReceivePortName, rl.ReceiveLocationName, rl.HostName });
             }
             if (editList.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
                 lstReceiveLocations.Items.AddRange(editList.SelectedItems.ToArray());
             }
             SetReceiveLocationTextBox();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#3
0
 private void cmdAddOrchestration_Click(object sender, EventArgs e)
 {
     try
     {
         BizTalkPortAndOrchsCollectorConfigEntry currentConfig = (BizTalkPortAndOrchsCollectorConfigEntry)SelectedEntry;
         if (!currentConfig.TestConnection())
         {
             MessageBox.Show(currentConfig.LastError, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else
         {
             BizTalkEditList editList = new BizTalkEditList();
             editList.Text        = "Orchestrations";
             editList.ColumnNames = new List <string>();
             editList.ColumnNames.Add("Orchestrations");
             editList.ValueColumn  = 1;
             editList.ExcludeItems = new List <string>();
             editList.ExcludeItems.AddRange((from string s in lstOrchestrations.Items
                                             orderby s
                                             select s).ToArray());
             editList.Items = new List <string[]>();
             List <SendPortInfo> list = currentConfig.GetOrchestrationList();
             foreach (var s in list)
             {
                 editList.Items.Add(new string[] { s.Name });
             }
             if (editList.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
                 lstOrchestrations.Items.AddRange(editList.SelectedItems.ToArray());
             }
             SetOrchestrationTextBox();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }