Exemple #1
0
        private void buttonAddCondition_Click(object sender, EventArgs e)
        {
            StringBuilder       sb  = new StringBuilder();
            NumberStringChecker nsc = new NumberStringChecker();

            if (radioButtonColumnInput.Checked)
            {
                sb.Append(listBoxTabelaCondition1.SelectedItem.ToString() + "." + listBoxSelect2.SelectedItem.ToString());
                sb.Append(getSelectedComparator());
                sb.Append(nsc.TransformIfString(textBoxWhereInput.Text.ToString()));
            }
            else
            {
                if (radioButtonColumnColumn.Checked)
                {
                    sb.Append(listBoxTabelaCondition1.SelectedItem.ToString() + "." + listBoxSelect2.SelectedItem.ToString());
                    sb.Append(getSelectedComparator());
                    sb.Append(listBoxTabelaCondition2.SelectedItem.ToString() + "." + listBoxSelect3.SelectedItem.ToString());
                }
            }
            String s = sb.ToString();

            sqlSelectCreator.WhereList.Add(s);
            textBoxSQL.Text = sqlSelectCreator.ToString();
        }
        private void buttonAddCondition_Click(object sender, EventArgs e)
        {
            StringBuilder       sb  = new StringBuilder();
            NumberStringChecker nsc = new NumberStringChecker();

            sb.Append(listBoxSelect2.SelectedItem.ToString());
            sb.Append(getSelectedComparator());
            sb.Append(nsc.TransformIfString(textBoxWhereInput.Text.ToString()));
            String s = sb.ToString();

            sqlUpdateWhereCreator.ConditionList.Add(s);
            textBoxWhereInput.Clear();
            MessageBox.Show("Condition added.");
        }