ReasonNoAccess
This commit is contained in:
parent
3f5d860602
commit
4dceb5ce01
2 changed files with 29 additions and 9 deletions
|
|
@ -100,10 +100,8 @@ namespace eDosStation
|
|||
statusEPD.Text = $"Search Timeout";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void DoEPD()
|
||||
{
|
||||
if (LoadDoses())
|
||||
|
|
@ -237,12 +235,17 @@ namespace eDosStation
|
|||
if (_User == null || _User.VisitIDLocked == true || _User.AccessAllow == false)
|
||||
{
|
||||
tbNotAllowed.IsSelected = true;
|
||||
if (_User.VisitIDLocked == true) tReasonNoAccess.Text = "Alarm status not cleared";
|
||||
else if (_User.AccessAllow == false) tReasonNoAccess.Text = "Access not allowed";
|
||||
if (_User.VisitIDLocked == true || _User.AccessAllow == false) tReasonNoAccess.Text = _User.ReasonNoAccess;
|
||||
else tReasonNoAccess.Text = "No identification";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (!string.IsNullOrEmpty(_User.UserComment))
|
||||
{
|
||||
MessageBox.Show(_User.UserComment, "Comment", MessageBoxButton.OK, MessageBoxImage.Asterisk);
|
||||
}
|
||||
|
||||
eDosStation.DataSet1 dataSet1 = ((eDosStation.DataSet1)(this.FindResource("dataSet1")));
|
||||
using (var dataSet1GetTaskInfoTableAdapter = new eDosStation.DataSet1TableAdapters.GetTaskInfoTableAdapter())
|
||||
{
|
||||
|
|
@ -257,10 +260,13 @@ namespace eDosStation
|
|||
void CheckBadge()
|
||||
{
|
||||
_User = new User(CSN.Text, Code.Text);
|
||||
if (_User.AccessAllow == true)
|
||||
if (_User.Error==0)
|
||||
AskTask();
|
||||
else
|
||||
{
|
||||
MessageBox.Show(_User.ErrorMessage);
|
||||
Close();
|
||||
}
|
||||
}
|
||||
public void showBadge()
|
||||
{
|
||||
|
|
@ -352,8 +358,14 @@ namespace eDosStation
|
|||
System.Windows.Data.CollectionViewSource getTaskListViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("getTaskListViewSource")));
|
||||
var rv = getTaskListViewSource.View.CurrentItem as DataRowView;
|
||||
CurTaskRow = rv.Row as DataSet1.GetTaskInfoRow;
|
||||
|
||||
GetEPD();
|
||||
if (CurTaskRow.MinWorkerDosisMargin > _User.Margin)
|
||||
{
|
||||
MessageBox.Show("Margin exeeded");
|
||||
}
|
||||
else
|
||||
{
|
||||
GetEPD();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -490,7 +502,7 @@ namespace eDosStation
|
|||
MessageBox.Show(_User.ErrorMessage, "DB Error", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
} else {
|
||||
Dispatcher.InvokeAsync(AskTask);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,12 @@ namespace eDosStation
|
|||
|
||||
public bool? VisitIDLocked {get;set; }
|
||||
|
||||
public string ReasonNoAccess { get; set; }
|
||||
|
||||
public string UserComment { get; set; }
|
||||
|
||||
public bool AllOk = false;
|
||||
|
||||
public int Error = 0;
|
||||
public string ErrorMessage;
|
||||
|
||||
|
|
@ -50,7 +56,9 @@ namespace eDosStation
|
|||
AccessAllow = Values[rs.GetOrdinal("AccessAllow")] as bool?;
|
||||
Margin = Values[rs.GetOrdinal("AccessAllow")] as double?;
|
||||
VisitIDLocked = Values[rs.GetOrdinal("VisitIDLocked")] as bool?;
|
||||
|
||||
ReasonNoAccess = Values[rs.GetOrdinal("ReasonNoAccess")].ToString();
|
||||
UserComment = Values[rs.GetOrdinal("Comment")].ToString();
|
||||
AllOk = (AccessAllow == true & VisitIDLocked == true);
|
||||
}
|
||||
rs.Close();
|
||||
} catch(System.Exception ex)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue