Changed administrative tools drop down to DevComponents control
Added administrative tools of Identifying Disconnected Items and NonEditable Items Removed administrative tools CSLA methods since they were moved to AdminToolsExt. Added new module to handle administrative tools CSLA methods Added methods for administrative tools of Identifying Disconnected Items and NonEditable Items
This commit is contained in:
@@ -33,7 +33,7 @@ namespace VEPROMS
|
||||
this.lblWarning = new System.Windows.Forms.Label();
|
||||
this.lblDescription = new System.Windows.Forms.Label();
|
||||
this.lblCaption = new System.Windows.Forms.Label();
|
||||
this.cbxAdminTools = new System.Windows.Forms.ComboBox();
|
||||
this.cbxAdminTools = new DevComponents.DotNetBar.Controls.ComboBoxEx();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.myTV = new System.Windows.Forms.TreeView();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
@@ -140,12 +140,15 @@ namespace VEPROMS
|
||||
//
|
||||
// cbxAdminTools
|
||||
//
|
||||
this.cbxAdminTools.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbxAdminTools.FlatStyle = System.Windows.Forms.FlatStyle.Standard;
|
||||
this.cbxAdminTools.FormattingEnabled = true;
|
||||
this.cbxAdminTools.Location = new System.Drawing.Point(5, 27);
|
||||
this.cbxAdminTools.Name = "cbxAdminTools";
|
||||
this.cbxAdminTools.Size = new System.Drawing.Size(290, 21);
|
||||
this.cbxAdminTools.TabIndex = 1;
|
||||
this.cbxAdminTools.WatermarkBehavior = DevComponents.DotNetBar.eWatermarkBehavior.HideNonEmpty;
|
||||
this.cbxAdminTools.WatermarkFont = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cbxAdminTools.WatermarkText = "Select Adminstrative Tool";
|
||||
this.cbxAdminTools.SelectedIndexChanged += new System.EventHandler(this.cbxAdminTools_SelectedIndexChanged);
|
||||
//
|
||||
// label1
|
||||
@@ -449,7 +452,7 @@ namespace VEPROMS
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox txtProcess;
|
||||
private System.Windows.Forms.ProgressBar pbProcess;
|
||||
private System.Windows.Forms.ComboBox cbxAdminTools;
|
||||
private DevComponents.DotNetBar.Controls.ComboBoxEx cbxAdminTools;
|
||||
private System.Windows.Forms.Label lblCaption;
|
||||
private System.Windows.Forms.Label lblDescription;
|
||||
private System.Windows.Forms.Label lblWarning;
|
||||
|
@@ -28,15 +28,14 @@ namespace VEPROMS
|
||||
private AdminTool selectedAdminTool;
|
||||
private void SetUpAdminTools()
|
||||
{
|
||||
DevComponents.DotNetBar.BalloonTip bt = new BalloonTip();
|
||||
bt.SetBalloonCaption(cbxAdminTools, "Select Administrative Tool");
|
||||
bt.SetBalloonText(cbxAdminTools, "Use this combo box to select an Administrative Tool to execute");
|
||||
adminToolsList = new AdminTools();
|
||||
adminToolsList.Add("Update RO Values", "Update RO Values Guidance", "This allows the user to update referenced objects values for multiple working drafts in a batch mode.", "It is recommended that this be done during off hours.", "WARNING:", true, false, UpdateROValues);
|
||||
adminToolsList.Add("Refresh Referenced Objects", "Refresh Referenced Objects Guidance", "Occasionally, referenced objects do not get updated. One cause of this is a failure to allow the RO update to complete.\r\n\r\nThis function will refresh referenced objects (based on the current ROFst) in all procedures selected below whether they were selected individually or as a group via a procedure set.", "If more than one procedure is selected, it is recommened that this be performed during off hours.", "WARNING:", false, false, RefreshReferencedObjects);
|
||||
adminToolsList.Add("Refresh Transitions", "Refresh Transitions Guidance", "Occasionally, transitions do not get updated.\r\n\r\nThis function will refresh transitions in all procedures selected below whether they were selected individually or as a group via a procedure set.", "If more than one procedure is selected, it is recommened that this be performed during off hours.", "WARNING:", false, false, RefreshTransitions);
|
||||
adminToolsList.Add("Refresh Referenced Objects and Transitions", "Referenced Objects and Transitions Guidance", "Occasionally, referenced objects and transitions do not get updated." + Environment.NewLine + Environment.NewLine + "This function will refresh referenced objects and transitions (based on the current ROFst) in all procedures selected below whether they were selected individually or as a group via a procedure set.", "If more than one procedure is selected, it is recommened that this be performed during off hours.", "WARNING:", false, false, RefreshReferencedObjectsAndTransitions);
|
||||
adminToolsList.Add("Delete PDFs", "Delete PDFs Guidance", "It is sometimes desirable to clean up the database by removing extra pdf files. This process allows for this to occur", "", "", true, true, "vesp_DeletePDFs", DeletePDFs);
|
||||
adminToolsList.Add("Identify Disconnected Items", "Identify Disconnected Items Guidance", "Everything in PROMS is inter-related. A working draft knows what is its first procedure and a procedure knows what is its first step. Likewise, a procedure knows what procedure is before it and after it.\r\n\r\nOccasionally, an item will become disconnected and does not know where it fits into the relationships. This tool identifies whether the database has this condition.", "This tool may take an extended period of time to execute.", "NOTE:", true, true, "vesp_GetDisconnectedItemsCount", IdentifyDisconnectedItems);
|
||||
adminToolsList.Add("Identify Non-Editable Items", "Identify Non-Editable Items Guidance", "Typically, a section in PROMS only has sub-sections or sub-steps. There are times when a section has both. When this occurs, the sub-step data can be marked as non-editable. If this occurs, the user can no longer get to these steps and they can become forgotten.\r\n\r\nThis tool will identify if the database has non-editable steps and provide a listing of these steps.", "This tool may take an extended period of time to execute.", "NOTE:", true, true,"vesp_GetNonEditableItems", IdentifyNonEditableItems);
|
||||
cbxAdminTools.DataSource = adminToolsList;
|
||||
cbxAdminTools.DisplayMember = "Title";
|
||||
cbxAdminTools.SelectedIndex = -1;
|
||||
@@ -388,7 +387,7 @@ namespace VEPROMS
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
Application.DoEvents();
|
||||
int affectedRows = ExecuteStoredProcedure.Execute(selectedAdminTool.StoredProcedure);
|
||||
int affectedRows = ExecuteStoredProcedureRowsAffected.Execute(selectedAdminTool.StoredProcedure);
|
||||
txtProcess.AppendText(string.Format("Deleted {0} PDFs", affectedRows));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
@@ -398,6 +397,60 @@ namespace VEPROMS
|
||||
this.Cursor = Cursors.Default;
|
||||
MessageBox.Show(string.Format("{0} Completed", selectedAdminTool.Title), string.Format("{0} Complete", selectedAdminTool.Title));
|
||||
}
|
||||
private void IdentifyDisconnectedItems()
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
DateTime pStart = DateTime.Now;
|
||||
txtProcess.AppendText(pStart.ToString("MM/dd/yyyy @ HH:mm"));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
Application.DoEvents();
|
||||
int rowCount = ExecuteStoredProcedureRowCount.Execute(selectedAdminTool.StoredProcedure);
|
||||
txtProcess.AppendText(string.Format("Disconnected Items Count: {0}", rowCount));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
if (rowCount > 0)
|
||||
{
|
||||
txtResults.AppendText(string.Format("The database contains {0} disconnected items.", rowCount));
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText("It is recommended you contact Volian to assist in resolving this condition");
|
||||
}
|
||||
DateTime pEnd = DateTime.Now;
|
||||
txtProcess.AppendText(pEnd.ToString("MM/dd/yyyy @ HH:mm"));
|
||||
Application.DoEvents();
|
||||
this.Cursor = Cursors.Default;
|
||||
MessageBox.Show(string.Format("{0} Completed", selectedAdminTool.Title), string.Format("{0} Complete", selectedAdminTool.Title));
|
||||
}
|
||||
private void IdentifyNonEditableItems()
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
DateTime pStart = DateTime.Now;
|
||||
txtProcess.AppendText(pStart.ToString("MM/dd/yyyy @ HH:mm"));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
Application.DoEvents();
|
||||
List<ItemInfo> myItems = ExecuteStoredProcedureItemInfoList.Execute(selectedAdminTool.StoredProcedure);
|
||||
txtProcess.AppendText(string.Format("Non-Editable Items Count: {0}",myItems.Count));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
if (myItems.Count > 0)
|
||||
{
|
||||
txtResults.AppendText("The following items are non-editable...");
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
foreach (ItemInfo ii in myItems)
|
||||
{
|
||||
txtResults.AppendText(ii.Path);
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
}
|
||||
}
|
||||
DateTime pEnd = DateTime.Now;
|
||||
txtProcess.AppendText(pEnd.ToString("MM/dd/yyyy @ HH:mm"));
|
||||
Application.DoEvents();
|
||||
this.Cursor = Cursors.Default;
|
||||
MessageBox.Show(string.Format("{0} Completed", selectedAdminTool.Title), string.Format("{0} Complete", selectedAdminTool.Title));
|
||||
}
|
||||
private void btnRefresh_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (btnRefresh.Text == "NO OPTION SELECTED")
|
||||
@@ -668,6 +721,7 @@ namespace VEPROMS
|
||||
lblWarning.Visible = selectedAdminTool.Warning.Length > 0;
|
||||
ResetTV(selectedAdminTool.NoProcedures);
|
||||
btnRefresh.Text = selectedAdminTool.Title;
|
||||
lblCaption.Focus();
|
||||
}
|
||||
}
|
||||
private void chkLater_CheckedChanged(object sender, EventArgs e)
|
||||
|
Reference in New Issue
Block a user