53 lines
1.5 KiB
C#
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;
|
|
}
|
|
}
|
|
}
|