/// <summary> /// Botton click Format Sql Script based on the interace selection /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btFormat_Click(object sender, EventArgs e) { if (rtbInputSQL.Text != string.Empty) { SQLFormater myfromater = new SQLFormater(); rtbOutSQL.Text = myfromater.SQLScriptFormater(rtbInputSQL.Text, true, false, ""); } else { MessageBox.Show("Please fill the input strings textbox"); } }
/// <summary> /// Button click parse query /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btParseQuery_Click(object sender, EventArgs e) { if (rtbInputSQL.Text != string.Empty) { SQLFormater myfromater = new SQLFormater(); string testparse = myfromater.SQLScriptFormater(rtbInputSQL.Text, true); MessageBox.Show("Passed " + (testparse == "true" ? "successfully" : " with errors.\n Look in the lower text box.")); rtbOutSQL.Text = (testparse == "true" ? "" : testparse); } else { MessageBox.Show("Please fill the input strings textbox"); } }