/// <summary>
 /// 将一个金商账户从金商账户列表中移除
 /// </summary>
 /// <param name="dealerAcc">要移除的金商账户</param>
 private void RemoveDealerAccount(DealerAccount dealerAcc)
 {
     //if (_dpObj.CheckAccess())
     //    DealerAccountList.Remove(dealerAcc);
     //else
     //    _dpObj.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
     //        new DealerAccountDelegate(item => DealerAccountList.Remove(item)),
     //        dealerAcc);
 }
        //Todo:金通网弃用
        ///// <summary>
        ///// 修改金商资料(包括权限)
        ///// </summary>
        ///// <param name="dealerAcc">金商账户类</param>
        ///// <param name="loginID">登陆标识</param>
        ///// <param name="accType">账户类型,管理员或金商</param>
        ///// <returns>ErrType</returns>
        //public ErrType ModifyDealerAccountInfo(DealerAccount dealerAcc, string loginID, ACCOUNT_TYPE accType)
        //{
        //    try
        //    {

        //        #region MyRegion

        //        //修改基本信息
        //        AgentUser userInfo = MyConverter.ToAgentUser(dealerAcc.AccInfo);
        //        ResultDesc result = ManagerService.ModifyAgentUser(userInfo, loginID, (int)accType);
        //        if (!result.Result)
        //            return new ErrType(ERR.SERVICE, result.Desc);

        //        //修改权限
        //        AgentAuth authority = MyConverter.ToAgentAuth(dealerAcc.Authority);
        //        result = ManagerService.ModifyAgentAuth(authority, dealerAcc.AccInfo.AccountName, loginID, (int)accType);
        //        return result.Result ? GeneralErr.Success : new ErrType(ERR.SERVICE, result.Desc); 

        //        #endregion
        //    }
        //    catch (TimeoutException te)
        //    {
        //          FileLog.WriteLog("", Assembly.GetExecutingAssembly().GetName().Name, this.GetType().Name, new StackTrace().GetFrame(0).GetMethod().Name, te.Message);return new ErrType(ERR.EXEPTION, ErrorText.TimeoutException);
        //    }
        //    catch (Exception ex)
        //    {
        //        return new ErrType(ERR.EXEPTION, ex.Message);
        //    }
        //}

        #endregion

        #region 新增金商账户

        /// <summary>
        /// 新增金商账号
        /// </summary>
        /// <param name="dealerAcc">新增的金商账号信息</param>
        /// <param name="loginID">登陆标识</param>
        /// <param name="accType">账户类型,管理员或金商</param>
        /// <returns>ErrType</returns>
        public ErrType AddDealerAccount(DealerAccount dealerAcc, string loginID, ACCOUNT_TYPE accType)
        {
            try
            {
                //Todo:金通网待处理
                return GeneralErr.Success;

                #region MyRegion

                //AgentUser userInfo = MyConverter.ToAgentUser(dealerAcc.AccInfo);
                //AgentAuth authority = MyConverter.ToAgentAuth(dealerAcc.Authority);
                //ResultDesc result = ManagerService.AddAgent(userInfo, authority, loginID, (int)accType);
                //return result.Result ? GeneralErr.Success : new ErrType(ERR.SERVICE, result.Desc); 

                #endregion
            }
            catch (TimeoutException te)
            {
                FileLog.WriteLog("", Assembly.GetExecutingAssembly().GetName().Name, this.GetType().Name, new StackTrace().GetFrame(0).GetMethod().Name, te.Message);
                return new ErrType(ERR.EXEPTION, ErrorText.TimeoutException);
            }
            catch (Exception ex)
            {
                FileLog.WriteLog("", Assembly.GetExecutingAssembly().GetName().Name, this.GetType().Name, new StackTrace().GetFrame(0).GetMethod().Name, ex.Message);
                return new ErrType(ERR.EXEPTION, ErrorText.OperationError);
            }
        }
 /// <summary>
 /// 同步金商资料数据(包含基本资料和权限)
 /// </summary>
 /// <param name="clone">同步数据源</param>
 public void Sync( DealerAccount clone ) {
     AccInfo.Sync( clone.AccInfo );
     Authority.Sync( clone.Authority );
 }
Exemplo n.º 4
0
 /// <summary>
 /// 同步金商资料数据(包含基本资料和权限)
 /// </summary>
 /// <param name="clone">同步数据源</param>
 public void Sync(DealerAccount clone)
 {
     AccInfo.Sync(clone.AccInfo);
     Authority.Sync(clone.Authority);
 }