38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Sarand.Net.Standard.Base.Security
|
|
{
|
|
//=======================================================================
|
|
/// <summary>Definition of security right as required by application</summary>
|
|
public class SaSecurityRight
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Construction.
|
|
public SaSecurityRight (String code, String desc, int dataItemType = 0)
|
|
{
|
|
Code = code;
|
|
Desc = desc;
|
|
DataItemType = dataItemType;
|
|
}
|
|
//-------------------------------------------------------------------
|
|
// Properties.
|
|
public String Code { get; set; }
|
|
public String Desc { get; set; }
|
|
public int DataItemType { get; set; }
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
|
|
//=======================================================================
|
|
public static class SaSecurityRightList
|
|
{
|
|
public static void Add (this List<SaSecurityRight> securityRights, String code, String desc, int dataItemType = 0)
|
|
{
|
|
securityRights.Add(new SaSecurityRight(code, desc, dataItemType));
|
|
}
|
|
}
|
|
|
|
//=======================================================================
|
|
}
|