コード例 #1
0
 private void sqlButtonRun_Click(object sender, EventArgs e)
 {
     try
     {
         grid.DataSource = Dbo.GetTable(sqlTextBox.Text);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #2
0
 private void similarBookTextBox_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         string title = "\'" + similarBookTextBox.Text + "\'";
         try
         {
             grid.DataSource = Dbo.GetTable(String.Format("SELECT * from find_similar(" + title + ")"));
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
 }
コード例 #3
0
 private void ShowNodeTable()
 {
     if (lastIsView)
     {
         lastTable       = Dbo.GetTable(lastTableName, GetAllConditionals());
         grid.DataSource = lastTable;
     }
     else if (lastSelectedNode.Parent == null)
     {
         lastTableName   = lastSelectedNode.Text;
         lastTable       = Dbo.GetTable(lastSelectedNode.Text, GetAllConditionals());
         grid.DataSource = lastTable;
         SetEditable(false);
     }
     else
     {
         lastTableName   = lastSelectedNode.Parent.Text;
         lastTable       = Dbo.GetTable(lastSelectedNode.Parent.Text, GetAllConditionals());
         grid.DataSource = Dbo.GetTable(lastSelectedNode.Parent.Text, GetAllConditionals(), lastSelectedNode.Text);
         SetEditable(false);
     }
     ShowAddNewRow(lastTable);
 }