C2020-038: When deleting a procedure, add a prompt so that user has to enter a reason that is saved to database
This commit is contained in:
@@ -504,7 +504,27 @@ namespace Volian.Controls.Library
|
||||
#region new style
|
||||
if (deletedItems == null)
|
||||
deletedItems = tvAudits.Nodes.Add("Deleted Items");
|
||||
TreeNode tnn = deletedItems.Nodes.Add(iai.ToString());
|
||||
string strR = null;
|
||||
// see if a deleted procedure, from itemaudit, get contentaudit
|
||||
ContentAuditInfoList lDelC = ContentAuditInfoList.GetByDeleteStatus(iai.DeleteStatus);
|
||||
foreach (ContentAuditInfo delC in lDelC)
|
||||
{
|
||||
if (delC.Type >= 0 && delC.Type < 1000)
|
||||
{
|
||||
int indx = delC.Config.IndexOf("DelProcReason");
|
||||
if (indx >= 0 && delC.Config.Length > indx+15) // 15 accounts for 'DelProcReason = "'
|
||||
{
|
||||
string reason = delC.Config.Substring(indx + 15);
|
||||
if (reason != null && reason.Length > 0)
|
||||
{
|
||||
indx = reason.IndexOf("\"");
|
||||
if (indx > 0) strR = reason.Substring(0, reason.IndexOf("\""));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
TreeNode tnn = deletedItems.Nodes.Add(iai.ToString()+"; Reason: " + strR);
|
||||
tnn.Tag = iai;
|
||||
#endregion
|
||||
}
|
||||
|
Reference in New Issue
Block a user