Example #1
0
 private void viewInfoToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (lstServerData.SelectedIndex != -1)
     {
         FormViewData = new frmViewData(serverDB, lstServerData.DataSource as DataTable, string.Format(Constants.SQL_Table, lstServerData.SelectedValue));
         FormViewData.ShowDialog();
     }
 }
Example #2
0
 private void executeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (rtbOutput.TextLength > 0)
     {
         string query = rtbOutput.SelectionLength == 0 ? rtbOutput.Text.Trim() : rtbOutput.SelectedText.Trim();
         if (Utils.IsQuerySelect(query))
         {
             FormViewData = new frmViewData(serverDB, lstServerData.DataSource as DataTable, query);
             FormViewData.ShowDialog();
         }
         else
         {
             MessageBox.Show(Data.ExecuteNonQuery(serverDB.Connection, query));
         }
     }
 }