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:
39
PROMS/Volian.Controls.Library/dlgDelProcReason.cs
Normal file
39
PROMS/Volian.Controls.Library/dlgDelProcReason.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Volian.Controls.Library
|
||||
{
|
||||
// C2020-038: request reason for delete procedure so this can be saved in database
|
||||
// (a few users said that procedures 'disappeared' but this could not be reproduced)
|
||||
public partial class dlgDelProcReason : Form
|
||||
{
|
||||
vlnTreeView VTreeView;
|
||||
public dlgDelProcReason(vlnTreeView tv)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Text = "Verify Delete By " + Volian.Base.Library.VlnSettings.UserID;
|
||||
VTreeView = tv;
|
||||
tbDelProcReason.Focus();
|
||||
}
|
||||
|
||||
private void btnOk_Click(object sender, EventArgs e)
|
||||
{
|
||||
VTreeView.DelProcReason = tbDelProcReason.Text;
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
VTreeView.DelProcReason = null;
|
||||
}
|
||||
|
||||
private void tbDelProcReason_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
btnYes.Enabled = (tbDelProcReason.Text != null && tbDelProcReason.Text.Length > 0) ;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user