eDosStation/eDosStation/User.cs
Luc Vandenbroucke 9c5be9f801 OnlyMK2
2022-04-20 16:56:49 +02:00

53 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace eDosStation
{
public class User
{
public int PersID { get; set; }
public string LastName { get; set; }
public string FirstName { get; set; }
public string conCode { get; set; }
public string Language { get; set; }
public bool? AccessAllow { get; set; }
public double? Margin { get; set; }
public int? VisitIDLocked { get; set; }
public string ReasonNoAccess { get; set; }
public string UserComment { get; set; }
public bool AllOk = false;
public bool hasEPD { get; set; }
public int Error = 0;
public string ErrorMessage;
internal int? activeVisit;
internal bool? isAgent;
public string FullUserName()
{
return string.Concat(FirstName, " ", LastName);
}
public bool HasMessage ()
{
return AccessAllow != true || !string.IsNullOrEmpty(UserComment) || !string.IsNullOrEmpty(ReasonNoAccess);
}
public bool AllowShowTask()
{
return AllOk == true && !hasEPD && (VisitIDLocked == null || VisitIDLocked==0);
}
public User()
{
LastName = FirstName = conCode = Language = string.Empty;
AccessAllow = null;
}
}
}