private void showDatabasePartitionInfoToolStripMenuItem_Click(object sender, EventArgs e) { DataTable dtTPartitionInfo = mssqlOperation.ShowPartitionInfo(); frmShowInfo frmShowInfo = new frmShowInfo(dtTPartitionInfo, "Show Partition of Database"); frmShowInfo.ShowDialog(); }
private void missingIndicesToolStripMenuItem_Click(object sender, EventArgs e) { DataTable dtDuplicateIndex = mssqlOperation.ShowMissingIndex(); frmShowInfo frmShowInfo = new frmShowInfo(dtDuplicateIndex, "Show missing index in Database"); frmShowInfo.ShowDialog(); }
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(); } }
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(); } }