예제 #1
0
파일: frmMain.cs 프로젝트: aelmi/SSManager
        private void showDatabasePartitionInfoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DataTable   dtTPartitionInfo = mssqlOperation.ShowPartitionInfo();
            frmShowInfo frmShowInfo      = new frmShowInfo(dtTPartitionInfo, "Show Partition of Database");

            frmShowInfo.ShowDialog();
        }
예제 #2
0
파일: frmMain.cs 프로젝트: aelmi/SSManager
        private void missingIndicesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DataTable   dtDuplicateIndex = mssqlOperation.ShowMissingIndex();
            frmShowInfo frmShowInfo      = new frmShowInfo(dtDuplicateIndex, "Show missing index in Database");

            frmShowInfo.ShowDialog();
        }
예제 #3
0
        private void btnFind_Click(object sender, EventArgs e)
        {
            List <string> DBobjects = new List <string>();

            if (chkSP.Checked)
            {
                DBobjects.Add("'P'");
            }
            if (chkTableValuedFunction.Checked)
            {
                DBobjects.Add("'TF'");
            }
            if (chkScalarValuedFunction.Checked)
            {
                DBobjects.Add("'FN'");
            }
            if (chkTrigger.Checked)
            {
                DBobjects.Add("'TR'");
            }
            if (chkView.Checked)
            {
                DBobjects.Add("'V'");
            }

            if (DBobjects.Count == 0)
            {
                MessageBox.Show("Select some object(s)");
                return;
            }

            var dtResult = mssqlOperation.FindStringInsideObjects(txtSearch.Text, string.Join(",", DBobjects));

            if (dtResult != null && dtResult.Rows.Count > 0)
            {
                frmShowInfo frmShowInfo = new frmShowInfo(dtResult, "Show result of search inside object(s)");
                frmShowInfo.ShowDialog();
            }
        }
예제 #4
0
파일: frmMain.cs 프로젝트: aelmi/SSManager
 private void contextMenuTable_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem.ToString().Equals("Table Size Info"))
     {
         if (clbTable.SelectedIndex == -1)
         {
             MessageBox.Show("Fisrt select a table");
         }
         else
         {
             DataTable   dtTableSizeInfo = mssqlOperation.TableSizeInfo(clbTable.SelectedItem.ToString());
             frmShowInfo frmShowInfo     = new frmShowInfo(dtTableSizeInfo, "Table " + clbTable.SelectedItem.ToString() + " size information");
             frmShowInfo.ShowDialog();
         }
     }
     else if (e.ClickedItem.ToString().Equals("All Table Size Info"))
     {
         DataTable   dtTAllableSizeInfo = mssqlOperation.AllTableSizeInfo();
         frmShowInfo frmShowInfo        = new frmShowInfo(dtTAllableSizeInfo, "All Table size information");
         frmShowInfo.ShowDialog();
     }
 }