/// <summary>
 /// Create a new Permission object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="systemCreateDate">Initial value of the SystemCreateDate property.</param>
 /// <param name="systemEditDate">Initial value of the SystemEditDate property.</param>
 /// <param name="objectTypeId">Initial value of the ObjectTypeId property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="canCreate">Initial value of the CanCreate property.</param>
 /// <param name="canEdit">Initial value of the CanEdit property.</param>
 /// <param name="canRead">Initial value of the CanRead property.</param>
 /// <param name="canDelete">Initial value of the CanDelete property.</param>
 public static Permission CreatePermission(global::System.Int64 id, global::System.DateTime systemCreateDate, global::System.DateTime systemEditDate, global::System.Int64 objectTypeId, global::System.String name, global::System.Boolean canCreate, global::System.Boolean canEdit, global::System.Boolean canRead, global::System.Boolean canDelete)
 {
     Permission permission = new Permission();
     permission.Id = id;
     permission.SystemCreateDate = systemCreateDate;
     permission.SystemEditDate = systemEditDate;
     permission.ObjectTypeId = objectTypeId;
     permission.Name = name;
     permission.CanCreate = canCreate;
     permission.CanEdit = canEdit;
     permission.CanRead = canRead;
     permission.CanDelete = canDelete;
     return permission;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Permissions EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToPermissions(Permission permission)
 {
     base.AddObject("Permissions", permission);
 }
Esempio n. 3
0
 protected override void EntityClear()
 {
     _entityPermission = new Permission();
     _entityPermission.SystemCreateDate = new DateTime();
     _entityPermission.SystemEditDate = new DateTime();
     _entityPermission.GroupId = null;
     _entityPermission.Name = string.Empty;
     _entityPermission.Description = null;
     _entityPermission.ObjectTypeId = -1;
     _entityPermission.CanCreate = false;
     _entityPermission.CanEdit = false;
     _entityPermission.CanRead = false;
     _entityPermission.CanDelete = false;
 }
Esempio n. 4
0
        /* TODO: revisit all copy functions
        public override bool Copy(Provider untyped)
        {
            //Never copy over the id, otherwise we would be creating
            //a pseudo-reference copy, which we don't want.
            //Do not copy over the system times and only the business logic
            //times since the system times are specific to a given instance.
            ProviderPermission aRole = (ProviderPermission)untyped;
            _entityPermission.Name = aRole._entityPermission.Name;
            _entityPermission.Description = aRole._entityPermission.Description;
            _entityPermission.ObjectTypeId = aRole._entityPermission.ObjectTypeId;
            _entityPermission.CanCreate = aRole._entityPermission.CanCreate;
            _entityPermission.CanEdit = aRole._entityPermission.CanEdit;
            _entityPermission.CanRead = aRole._entityPermission.CanRead;
            _entityPermission.CanDelete = aRole._entityPermission.CanDelete;

            _entityObject = _entityPermission;
            return true;
        }
        */
        //=========================================================
        // PRIVATE
        //=========================================================
        protected ProviderPermission(Permission aPermission)
            : base(aPermission)
        {
        }
Esempio n. 5
0
 protected static ProviderPermission _EntityToProvider(Permission permissionEntity)
 {
     return new ProviderPermission(permissionEntity);
 }