VEPROMS_UI / remove BouncyCastle

This commit is contained in:
2026-08-21 06:11:06 -04:00
parent 23a296df86
commit 0c3e4bb3e9
41 changed files with 2298 additions and 4704 deletions
@@ -1,35 +1,18 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
using LBOutlookLibrary;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Net.Mail;
using System.Net;
using System.IO;
namespace VEPROMS
{
public partial class frmBatchRefreshCheckedOut : Form
{
private SessionInfo _MySessionInfo;
public SessionInfo MySessionInfo
{
get { return _MySessionInfo; }
set { _MySessionInfo = value; }
}
private List<ProcedureInfo> _CheckedOutProcedures;
public List<ProcedureInfo> CheckedOutProcedures
{
get { return _CheckedOutProcedures; }
set { _CheckedOutProcedures = value; }
}
private int RType = -1; // C2023-002: Flag type of checkout, docversion -1 or procedures 0
public SessionInfo MySessionInfo { get; set; }
public List<ProcedureInfo> CheckedOutProcedures { get; set; }
private readonly int RType = -1; // C2023-002: Flag type of checkout, docversion -1 or procedures 0
public frmBatchRefreshCheckedOut(int type)
{
RType = type;
@@ -53,32 +36,39 @@ namespace VEPROMS
}
private void AddToDisplayList(ProcedureInfo pi)
{
Panel p = new Panel();
p.BorderStyle = BorderStyle.FixedSingle;
p.Dock = DockStyle.Top;
p.Height = 28;
if (RType != 1) // C2023-002: only put out ForceCheckin & sendemail buttons if on procedures (can't check in a docversion)
Panel p = new Panel
{
BorderStyle = BorderStyle.FixedSingle,
Dock = DockStyle.Top,
Height = 28
};
if (RType != 1) // C2023-002: only put out ForceCheckin & sendemail buttons if on procedures (can't check in a docversion)
{
Button b = new Button();
//b.FlatStyle = FlatStyle.Popup;
b.Dock = DockStyle.Right;
b.Text = "Force Check In";
b.Tag = pi;
b.Click += new EventHandler(ForceCheckIn_Click);
Button b = new Button
{
Dock = DockStyle.Right,
Text = "Force Check In",
Tag = pi
};
b.Click += new EventHandler(ForceCheckIn_Click);
p.Controls.Add(b);
b = new Button();
//b.FlatStyle = FlatStyle.Popup;
b.Dock = DockStyle.Right;
b.Text = "Send Email";
b.Tag = pi;
b.Click += new EventHandler(SendEmail_Click);
b = new Button
{
//b.FlatStyle = FlatStyle.Popup;
Dock = DockStyle.Right,
Text = "Send Email",
Tag = pi
};
b.Click += new EventHandler(SendEmail_Click);
p.Controls.Add(b);
}
Label l = new Label();
l.Dock = DockStyle.Fill;
l.TextAlign = ContentAlignment.MiddleLeft;
l.Text = string.Format("Procedure {0} is checked out to {1}", pi.DisplayNumber, UserInfo.GetByUserID(OwnerInfo.GetByItemID(pi.ItemID, CheckOutType.Procedure).SessionUserID).UserID);
p.Controls.Add(l);
Label l = new Label
{
Dock = DockStyle.Fill,
TextAlign = ContentAlignment.MiddleLeft,
Text = $"Procedure {pi.DisplayNumber} is checked out to {UserInfo.GetByUserID(OwnerInfo.GetByItemID(pi.ItemID, CheckOutType.Procedure).SessionUserID).UserID}"
};
p.Controls.Add(l);
pnlList.Controls.Add(p);
p.BringToFront();
pnlList.Focus();
@@ -103,15 +93,7 @@ namespace VEPROMS
private string BuildEmailMessageBody(ProcedureInfo pi)
{
StringBuilder body = new StringBuilder();
//body.AppendLine("THIS IS A TEST MESSAGE FROM JIM BODINE");
//body.AppendLine();
body.AppendLine(string.Format("The administrator needs you to check in procedure {0} so the administrator can continue an administrative tool process", pi.DisplayNumber));
//body.AppendLine();
//body.AppendLine("Obviously, you do not really have this procedure checked out, so you really do not have to do anything.");
//body.AppendLine();
//body.AppendLine("However, I would appreciate it if you would reply to this email so I know the email worked");
//body.AppendLine();
//body.AppendLine("I will try NOT to overwhelm your email system :-)");
body.AppendLine($"The administrator needs you to check in procedure {pi.DisplayNumber} so the administrator can continue an administrative tool process");
return body.ToString();
}
void ForceCheckIn_Click(object sender, EventArgs e)
@@ -134,15 +116,7 @@ namespace VEPROMS
private string BuildForcedMessageBody(ProcedureInfo pi)
{
StringBuilder body = new StringBuilder();
//body.AppendLine("THIS IS A TEST MESSAGE FROM JIM BODINE");
//body.AppendLine();
body.AppendLine(string.Format("The administrator needed to force check in procedure {0} so the administrator could continue an administrative tool process", pi.DisplayNumber));
//body.AppendLine();
//body.AppendLine("Obviously, you do not really have this procedure checked out, so nothing really got forced checked in.");
//body.AppendLine();
//body.AppendLine("However, I would appreciate it if you would reply to this email so I know the email worked");
//body.AppendLine();
//body.AppendLine("I will try NOT to overwhelm your email system :-)");
body.AppendLine($"The administrator needed to force check in procedure {pi.DisplayNumber} so the administrator could continue an administrative tool process");
return body.ToString();
}
private bool SendOutlookEmail(string email, string subject, string body)
@@ -163,7 +137,7 @@ namespace VEPROMS
if (ex.Message.ToLower().Contains("failed due to the following error: 80080005"))
MessageBox.Show("You cannot send email via a running instance of Outlook from VE PROMS running from within Visual Studio.");
else
MessageBox.Show(string.Format("{0} - {1}", ex.GetType().Name, ex.Message));
MessageBox.Show($"{ex.GetType().Name} - {ex.Message}");
return false;
}
}
@@ -180,7 +154,7 @@ namespace VEPROMS
CheckedOutProcedures = tmp;
if (CheckedOutProcedures.Count == 0)
{
this.Close();
Close();
return;
}
foreach (ProcedureInfo pi in CheckedOutProcedures)