private void btnResult_Click(object sender, EventArgs e)
 {
     updateAllColumnsAllProperties();
     _xmlSections.breakXmlIntoSections(_originalUserCode.Text);
     updateXmlSections();
     frmOutput frmOutput = new frmOutput(_subjectArea);
     frmOutput.load(_xmlSections.combineXmlSections());
     frmOutput.ShowDialog();
 }
 private void button1_Click(object sender, EventArgs e)
 {
     frmOutput frmOutput = new frmOutput(_subjectArea);
     frmOutput.load(_originalUserCode.Text);
     frmOutput.ShowDialog();
 }
        private void btnGenerateOrderedSQLQuery_Click(object sender, EventArgs e)
        {
            if (lbOrderedColumnNames.Items.Count < 1)
            {
                MessageBox.Show("No columns detected. Double click the column names seen in the middle box to add them in the SQL query.",
                    "Warning", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            string endOfTheQuery = "FROM \"" + _subjectArea + "\""; // to-do => the replace method changes the format of the string
            String strOutput = ("SELECT ");
            foreach (var a in lbOrderedColumnNames.Items)
            {
                string columnName = a.ToString();
                string folderName = _dicColumnNames.FirstOrDefault(x => x.Value.Contains(columnName)).Key;
                string strTemp = folderName + "." + columnName;
                strOutput = strOutput + folderName + "." + columnName + ", ";
            }

            strOutput = strOutput + endOfTheQuery;
            frmOutput form2 = new frmOutput(_subjectArea);
            form2.load(strOutput);
            form2.Show();
        }