Last-Modified: Mon, 27 Jul 2026 15:46:59 GMT Expires: Thu, 24 Jul 2036 15:46:59 GMT CartridgeSlot.proto « Diagnostics « Messages « PMR « Software - Tango - Twine softwares
aboutsummaryrefslogtreecommitdiffstats
path: root/Software/PMR/Messages/Diagnostics/CartridgeSlot.proto
blob: 96b4fcd1e6e04db7a6f4fa8c12fec75446a1d2f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Tango Observables Generator
// 
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. Do not modify!
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Serialization;
using Newtonsoft.Json;
using System.Linq;
using Tango.DAL.Remote.DB;
using Tango.Core;
using System.ComponentModel;

namespace Tango.BL.Entities
{
    [Table("ROLES")]
    public abstract class RoleBase : ObservableEntity<Role>
    {

        public event EventHandler<Int32> CodeChanged;

        public event EventHandler<String> NameChanged;

        public event EventHandler<String> DescriptionChanged;

        public event EventHandler<SynchronizedObservableCollection<RolesPermission>> RolesPermissionsChanged;

        public event EventHandler<SynchronizedObservableCollection<UsersRole>> UsersRolesChanged;

        protected Int32 _code;

        /// <summary>
        /// Gets or sets the rolebase code.
        /// </summary>

        [Column("CODE")]

        public  Int32 Code
        {
            get 
            {
                return _code; 
            }

            set 
            {
                if (_code != value)
                {
                    _code = value;

                    OnCodeChanged(value);

                }
            }
        }

        protected String _name;

        /// <summary>
        /// Gets or sets the rolebase name.
        /// </summary>

        [Column("NAME")]

        public  String Name
        {
            get 
            {
                return _name; 
            }

            set 
            {
                if (_name != value)
                {
                    _name = value;

                    OnNameChanged(value);

                }
            }
        }

        protected String _description;

        /// <summary>
        /// Gets or sets the rolebase description.
        /// </summary>

        [Column("DESCRIPTION")]

        public  String Description
        {
            get 
            {
                return _description; 
            }

            set 
            {
                if (_description != value)
                {
                    _description = value;

                    OnDescriptionChanged(value);

                }
            }
        }

        protected SynchronizedObservableCollection<RolesPermission> _rolespermissions;

        /// <summary>
        /// Gets or sets the rolebase roles permissions.
        /// </summary>

        public virtual SynchronizedObservableCollection<RolesPermission> RolesPermissions
        {
            get 
            {
                return _rolespermissions; 
            }

            set 
            {
                if (_rolespermissions != value)
                {
                    _rolespermissions = value;

                    OnRolesPermissionsChanged(value);

                }
            }
        }

        protected SynchronizedObservableCollection<UsersRole> _usersroles;

        /// <summary>
        /// Gets or sets the rolebase users roles.
        /// </summary>

        public virtual SynchronizedObservableCollection<UsersRole> UsersRoles
        {
            get 
            {
                return _usersroles; 
            }

            set 
            {
                if (_usersroles != value)
                {
                    _usersroles = value;

                    OnUsersRolesChanged(value);

                }
            }
        }

        /// <summary>
        /// Called when the Code has changed.
        /// </summary>
        protected virtual void OnCodeChanged(Int32 code)
        {
            CodeChanged?.Invoke(this, code);
            RaisePropertyChanged(nameof(Code));
        }

        /// <summary>
        /// Called when the Name has changed.
        /// </summary>
        protected virtual void OnNameChanged(String name)
        {
            NameChanged?.Invoke(this, name);
            RaisePropertyChanged(nameof(Name));
        }

        /// <summary>
        /// Called when the Description has changed.
        /// </summary>
        protected virtual void OnDescriptionChanged(String description)
        {
            DescriptionChanged?.Invoke(this, description);
            RaisePropertyChanged(nameof(Description));
        }

        /// <summary>
        /// Called when the RolesPermissions has changed.
        /// </summary>
        protected virtual void OnRolesPermissionsChanged(SynchronizedObservableCollection<RolesPermission> rolespermissions)
        {
            RolesPermissionsChanged?.Invoke(this, rolespermissions);
            RaisePropertyChanged(nameof(RolesPermissions));
        }

        /// <summary>
        /// Called when the UsersRoles has changed.
        /// </summary>
        protected virtual void OnUsersRolesChanged(SynchronizedObservableCollection<UsersRole> usersroles)
        {
            UsersRolesChanged?.Invoke(this, usersroles);
            RaisePropertyChanged(nameof(UsersRoles));
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="RoleBase" /> class.
        /// </summary>
        public RoleBase() : base()
        {

            RolesPermissions = new SynchronizedObservableCollection<RolesPermission>();

            UsersRoles = new SynchronizedObservableCollection<UsersRole>();

        }
    }
}