Пример #1
0
 /// <summary>
 /// 用登陆标识符和用户权限实例化一个登陆结果类
 /// </summary>
 /// <param name="loginID">登陆标识符</param>
 /// <param name="authority">用户权限</param>
 public LoginResult(string loginID, string quotationAddr, int quotationPort, ManagerAuthority authority)
 {
     LoginID       = loginID;
     MgrAuthority  = authority;
     QuotationAddr = quotationAddr;
     QuotationPort = quotationPort;
 }
        /// <summary>
        /// 同步管理员权限数据
        /// </summary>
        /// <param name="mgrAuthority">同步权限数据源</param>
        internal void Sync(ManagerAuthority mgrAuthority)
        {
            base.Sync(mgrAuthority);

            AdminAccountManager = mgrAuthority.AdminAccountManager;

            //同步系统设置权限
            if (mgrAuthority.IsSystemSettingsEnabled.HasValue)
            {
                IsSystemSettingsEnabled = mgrAuthority.IsSystemSettingsEnabled;
            }
            else
            {
                AllowReleaseAnnouncement  = mgrAuthority.AllowReleaseAnnouncement;
                AllowReleaseNews          = mgrAuthority.AllowReleaseNews;
                AllowViewLog              = mgrAuthority.AllowViewLog;
                AllowHolidaysSettings     = mgrAuthority.AllowHolidaysSettings;
                AllowTradingDaySettings   = mgrAuthority.AllowTradingDaySettings;
                AllowTransactionSettings  = mgrAuthority.AllowTransactionSettings;
                EnableIPAddressFiltering  = mgrAuthority.EnableIPAddressFiltering;
                EnableMACAddressFiltering = mgrAuthority.EnableMACAddressFiltering;
            }

            //同步数据管理权限
            if (mgrAuthority.IsDataManagerEnabled.HasValue)
            {
                IsDataManagerEnabled = mgrAuthority.IsDataManagerEnabled;
            }
            else
            {
                IsProductManagerEnabled     = mgrAuthority.IsProductManagerEnabled;
                IsHistoryDataManagerEnabled = mgrAuthority.IsHistoryDataManagerEnabled;
                ExchangeRateWater           = mgrAuthority.ExchangeRateWater;
            }
        }
 /// <summary>
 /// 同步管理员权限信息
 /// </summary>
 /// <param name="authority">同步的管理员权限数据源</param>
 public void SyncAuthority(ManagerAuthority authority)
 {
     if (authority != null)
     {
         Authority.Sync(authority);
     }
 }
Пример #4
0
 /// <summary>
 /// 用登陆标识符和用户权限实例化一个登陆结果类
 /// </summary>
 /// <param name="loginID">登陆标识符</param>
 /// <param name="authority">用户权限</param>
 public LoginResult( string loginID, string quotationAddr, int quotationPort, ManagerAuthority authority ) {
     LoginID = loginID;
     MgrAuthority = authority;
     QuotationAddr = quotationAddr;
     QuotationPort = quotationPort;
 }
 /// <summary>
 /// 同步管理员权限信息
 /// </summary>
 /// <param name="authority">同步的管理员权限数据源</param>
 public void SyncAuthority( ManagerAuthority authority ) {
     if( authority != null )
         Authority.Sync( authority );
 }
 /// <summary>
 /// 用账户名实例化一个管理员账户类
 /// </summary>
 public ManagerAccount( ) {
     AccInfo = new ManagerAccountInformation( );
     Authority = new ManagerAuthority( );
 }
        /// <summary>
        /// 同步管理员权限数据
        /// </summary>
        /// <param name="mgrAuthority">同步权限数据源</param>
        internal void Sync(ManagerAuthority mgrAuthority)
        {
            base.Sync(mgrAuthority);

            AdminAccountManager = mgrAuthority.AdminAccountManager;

            //同步系统设置权限
            if (mgrAuthority.IsSystemSettingsEnabled.HasValue)
                IsSystemSettingsEnabled = mgrAuthority.IsSystemSettingsEnabled;
            else
            {
                AllowReleaseAnnouncement = mgrAuthority.AllowReleaseAnnouncement;
                AllowReleaseNews = mgrAuthority.AllowReleaseNews;
                AllowViewLog = mgrAuthority.AllowViewLog;
                AllowHolidaysSettings = mgrAuthority.AllowHolidaysSettings;
                AllowTradingDaySettings = mgrAuthority.AllowTradingDaySettings;
                AllowTransactionSettings = mgrAuthority.AllowTransactionSettings;
                EnableIPAddressFiltering = mgrAuthority.EnableIPAddressFiltering;
                EnableMACAddressFiltering = mgrAuthority.EnableMACAddressFiltering;
            }

            //同步数据管理权限
            if (mgrAuthority.IsDataManagerEnabled.HasValue)
                IsDataManagerEnabled = mgrAuthority.IsDataManagerEnabled;
            else
            {
                IsProductManagerEnabled = mgrAuthority.IsProductManagerEnabled;
                IsHistoryDataManagerEnabled = mgrAuthority.IsHistoryDataManagerEnabled;
                ExchangeRateWater = mgrAuthority.ExchangeRateWater;
            }
        }
 /// <summary>
 /// 用账户名实例化一个管理员账户类
 /// </summary>
 public ManagerAccount( )
 {
     AccInfo   = new ManagerAccountInformation( );
     Authority = new ManagerAuthority( );
 }