Exemple #1
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (listBoxTableNoChange)
            {
                return;
            }
            int oldIndex = listBoxTable.SelectedIndex;

            if (oldIndex < 0)
            {
                return;
            }
            TableJoinRelation tjr = _pmsJoinRelation[oldIndex];
            string            abc = "[" + tjr.mainTable + "].";

            abc            += "[" + tjr.mainColumn + "] ";
            abc            += comboBoxCompare.Text;
            abc            += " [" + tjr.secondaryTable + "].";
            abc            += "[" + tjr.secondaryColumn + "] ";
            compareNoChange = true;
            listBoxTable.Items[oldIndex] = abc;
            compareNoChange = false;

            tjr.compare = comboBoxCompare.Text;
            _pmsJoinRelation[oldIndex] = tjr;

            listBoxTable.Invalidate();
            buttonOk.Enabled = true;
        }
Exemple #2
0
        private void listBoxTable_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (compareNoChange)
            {
                return;
            }
            int oldIndex = listBoxTable.SelectedIndex;

            if (oldIndex < 0)
            {
                return;
            }

            TableJoinRelation tjr = _pmsJoinRelation[oldIndex];

            textBoxTableMain.Text       = tjr.mainTable;
            textBoxColumnMain.Text      = tjr.mainColumn;
            textBoxTableSecondary.Text  = tjr.secondaryTable;
            textBoxColumnSecondary.Text = tjr.secondaryColumn;
            listBoxTableNoChange        = true;
            comboBoxCompare.Text        = tjr.compare;
            listBoxTableNoChange        = false;
            checkBoxTableMain.Text      = tjr.mainTable + "表的所有行";
            checkBoxTableSecondary.Text = tjr.secondaryTable + "表的所有行";
            setCheckBox(tjr.joinType);
        }
Exemple #3
0
        public TableJoinRelation Clone()
        {
            TableJoinRelation tjr = new TableJoinRelation();

            tjr.compare         = this.compare;
            tjr.secondaryColumn = this.secondaryColumn;
            tjr.mainColumn      = this.mainColumn;
            tjr.secondaryTable  = this.secondaryTable;
            tjr.mainTable       = this.mainTable;
            return(tjr);
        }
Exemple #4
0
        private void setNewJoinType(int index)
        {
            TableJoinRelation tjr = _pmsJoinRelation[index];

            if (checkBoxTableMain.Checked && checkBoxTableSecondary.Checked)
            {
                tjr.joinType = 3;
            }
            else if (!checkBoxTableMain.Checked && checkBoxTableSecondary.Checked)
            {
                tjr.joinType = 2;
            }
            else if (checkBoxTableMain.Checked && !checkBoxTableSecondary.Checked)
            {
                tjr.joinType = 1;
            }
            else if (!checkBoxTableMain.Checked && !checkBoxTableSecondary.Checked)
            {
                tjr.joinType = 0;
            }
            _pmsJoinRelation[index] = tjr;
        }