Added code to handle importing a procedure with different RO folder

Added code to sort Administrative Tools
Added code to improve how the controls align when using a lower DPI screen resolution
Added code to refresh progress bar when updating RO's
This commit is contained in:
Rich
2015-02-27 03:54:35 +00:00
parent f73ab7c3a7
commit de51192fc0
4 changed files with 56 additions and 14 deletions

View File

@@ -36,6 +36,8 @@ namespace VEPROMS
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);
adminToolsList.Add("Get Database Users", "Get Database Users Guidance", "This administrative tool will return all of the users currently with open sessions in the database and the details of any items they have checked out", "", "", true, true, "vesp_GetDatabaseSessions", GetDatabaseSessions);
adminToolsList.Sort();
cbxAdminTools.DataSource = adminToolsList;
cbxAdminTools.DisplayMember = "Title";
cbxAdminTools.SelectedIndex = -1;
@@ -451,6 +453,21 @@ namespace VEPROMS
this.Cursor = Cursors.Default;
MessageBox.Show(string.Format("{0} Completed", selectedAdminTool.Title), string.Format("{0} Complete", selectedAdminTool.Title));
}
private void GetDatabaseSessions()
{
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();
txtProcess.AppendText("In Progress");
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")
@@ -729,7 +746,7 @@ namespace VEPROMS
pnlLater.Enabled = chkLater.Checked;
}
}
public class AdminTool
public class AdminTool : IComparable<AdminTool>
{
private string _Title;
public string Title
@@ -815,6 +832,10 @@ namespace VEPROMS
_StoredProcedure = storedProcedure;
_MyExecute = myExecute;
}
public int CompareTo(AdminTool at)
{
return this.Title.CompareTo(at.Title);
}
}
public class AdminTools : List<AdminTool>
{