コード例 #1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     AssignDataTypes();
     SearchAtt.Hide();
     SearchAttTextBox.Hide();
     StringConc.Hide();
     label1.Hide();
     ChosenCol2.Hide();
     GetTables();
 }
コード例 #2
0
 private void FunctionsList_SelectedIndexChanged(object sender, EventArgs e)
 {
     SearchAtt.Hide();
     SearchAttTextBox.Hide();
     label1.Hide();
     ChosenCol2.Hide();
     StringConc.Hide();
     if (FunctionsList.SelectedItem.ToString() == "Count")
     {
         SearchAtt.Text = "Item To Be Counted";
         SearchAtt.Show();
         SearchAttTextBox.Show();
     }
     if (FunctionsList.SelectedItem.ToString() == "StringConcatenation")
     {
         label1.Show();
         ChosenCol2.Show();
     }
 }
コード例 #3
0
 private void Execute_Click(object sender, EventArgs e)
 {
     if (FunctionsList.SelectedItem.ToString() == "Sum")
     {
         MessageBox.Show(Sum(ChosenCol1.Text).ToString());
     }
     else if (FunctionsList.SelectedItem.ToString() == "Average")
     {
         MessageBox.Show(Average(ChosenCol1.Text).ToString());
     }
     else if (FunctionsList.SelectedItem.ToString() == "Max")
     {
         MessageBox.Show(Max(ChosenCol1.Text));
     }
     else if (FunctionsList.SelectedItem.ToString() == "Min")
     {
         MessageBox.Show(Min(ChosenCol1.Text));
     }
     else if (FunctionsList.SelectedItem.ToString() == "StringConcatenation")
     {
         StringConc.Show();
         MessageBox.Show(StringConcatenation(ChosenCol1.SelectedItem.ToString(), ChosenCol2.SelectedItem.ToString()));
     }
     else if (FunctionsList.SelectedItem.ToString() == "Length")
     {
         MessageBox.Show(CountColumns(ChosenCol1.Text).ToString());
     }
     else if (FunctionsList.SelectedItem.ToString() == "Count")
     {
         MessageBox.Show(Count(ChosenCol1.Text, SearchAttTextBox.Text).ToString());
     }
     else if (FunctionsList.SelectedItem.ToString() == "LastOf")
     {
         MessageBox.Show(LastOf(ChosenCol1.Text));
     }
     else if (FunctionsList.SelectedItem.ToString() == "FirstOf")
     {
         MessageBox.Show(FirstOf(ChosenCol1.Text));
     }
 }