示例#1
0
 private void SelectStarButton_Click(object sender, EventArgs e)
 {
     // First select nothing ...
     SelectNoneButton.PerformClick();
     // then set the SELECT statement to '*'
     SelectText.Text = "*";
 }
示例#2
0
 private void SelectSelectedButton_Click(object sender, EventArgs e)
 {
     // First select nothing ...
     SelectNoneButton.PerformClick();
     // then set the SELECT statement to everything in the list
     SelectText.Text = "";
     if (SelectListBox.SelectedItems.Count > 0)
     {
         for (int i = 0; i < SelectListBox.SelectedItems.Count; i++)
         {
             if (i != 0)
             {
                 SelectText.Text += ", ";
             }
             SelectText.Text += SelectListBox.SelectedItems[i].ToString();
         }
     }
 }