Files
SourceCode/PROMS/Volian.Controls.Library/dlgDelProcReason.cs
T

34 lines
928 B
C#

using System;
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
{
readonly 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) ;
}
}
}