/// <summary> /// 同步金商权限信息 /// </summary> /// <param name="authority">同步的金商权限数据源</param> public void SyncAuthority(DealerAuthority authority) { if (authority != null) { Authority.Sync(authority); } }
/// <summary> /// 实例化一个根据基类(金商权限)的管理员权限类 /// </summary> /// <param name="dealerAuthority"></param> public ManagerAuthority(DealerAuthority dealerAuthority) { base.Sync(dealerAuthority); AdminAccountManager = false; IsSystemSettingsEnabled = false; IsDataManagerEnabled = false; }
/// <summary> /// 同步金商权限信息 /// </summary> /// <param name="authority">同步的金商权限数据源</param> public void SyncAuthority( DealerAuthority authority ) { if( authority != null ) Authority.Sync( authority ); }
/// <summary> /// 用账户名实例化一个金商账户类 /// </summary> public DealerAccount( ) { AccInfo = new DealerAccountInformation( ); Authority = new DealerAuthority( ); }
/// <summary> /// 同步金商权限数据 /// </summary> /// <param name="dealerAuthority">同步数据源</param> internal void Sync(DealerAuthority dealerAuthority) { AccMgrReadonly = dealerAuthority.AccMgrReadonly; //同步管理权限 if (dealerAuthority.AccountManager.HasValue) { AccountManager = dealerAuthority.AccountManager; } else { ClientAccountManager = dealerAuthority.ClientAccountManager; DealerAccountManager = dealerAuthority.DealerAccountManager; } //同步操作权限 if (dealerAuthority.OperatingAuthority.HasValue) { OperatingAuthority = dealerAuthority.OperatingAuthority; } else { AllowCreateNewAccount = dealerAuthority.AllowCreateNewAccount; AllowDeleteClient = dealerAuthority.AllowDeleteClient; AllowViewClientInformation = dealerAuthority.AllowViewClientInformation; AllowViewTradeDetail = dealerAuthority.AllowViewTradeDetail; AllowCashIO = dealerAuthority.AllowCashIO; AllowAdjustmentAmount = dealerAuthority.AllowAdjustmentAmount; AllowMarketOrder = dealerAuthority.AllowMarketOrder; AllowChargebackOrder = dealerAuthority.AllowChargebackOrder; AllowWarehousingOrder = dealerAuthority.AllowWarehousingOrder; AllowPendingOrder = dealerAuthority.AllowPendingOrder; AllowRevocationOrder = dealerAuthority.AllowRevocationOrder; MarketOrderStatements = dealerAuthority.MarketOrderStatements; WarehousingStatements = dealerAuthority.WarehousingStatements; ChargebackStatements = dealerAuthority.ChargebackStatements; PendingOrderStatements = dealerAuthority.PendingOrderStatements; AdjustDepositStatements = dealerAuthority.AdjustDepositStatements; } //同步交易管理权限 if (dealerAuthority.IsTradeManagerEnabled.HasValue) { IsTradeManagerEnabled = dealerAuthority.IsTradeManagerEnabled; } else { AllowViewMarketOrder = dealerAuthority.AllowViewMarketOrder; AllowMarketOrder = dealerAuthority.AllowMarketOrder; AllowViewPendingOrder = dealerAuthority.AllowViewPendingOrder; AllowViewChargebackRecord = dealerAuthority.AllowViewChargebackRecord; AllowViewHedgingTransactions = dealerAuthority.AllowViewHedgingTransactions; AllowViewWarehousing = dealerAuthority.AllowViewWarehousing; AllowExportStatement = dealerAuthority.AllowExportStatement; } //店员权限 //TradeManage = dealerAuthority.TradeManage; DeliverOrder = dealerAuthority.DeliverOrder; TihuoOrder = dealerAuthority.TihuoOrder; HuiGouOrder = dealerAuthority.HuiGouOrder; JgjOrder = dealerAuthority.JgjOrder; //TiHuoShouLi = dealerAuthority.TiHuoShouLi; BangDingUser = dealerAuthority.BangDingUser; TiHuo = dealerAuthority.TiHuo; ShouLiMingXi = dealerAuthority.ShouLiMingXi; CheckManage = dealerAuthority.CheckManage; CheckDel = dealerAuthority.CheckDel; AgentClerk = dealerAuthority.AgentClerk; OrderTakeReport = dealerAuthority.OrderTakeReport; OrderBackReport = dealerAuthority.OrderBackReport; OrderCheckReport = dealerAuthority.OrderCheckReport; JgjReport = dealerAuthority.JgjReport; AgentDoDetail = dealerAuthority.AgentDoDetail; }
/// <summary> /// 店员权限修改 /// </summary> /// <param name="bzjAuth">权限信息</param> /// <param name="clerkId">店员账号</param> /// <param name="LoginId">登录标识</param> /// <param name="UserType">登录用户类型</param> /// <returns></returns> public ErrType ModifyClerkAuth(DealerAuthority bzjAuth, string clerkId, string LoginId, int UserType) { try { //Todo:金通网待处理 #region MyRegion //AgentAuth auth = MyConverter.ToAgentAuth(bzjAuth); //bool sfsf = auth.ChuRuManage; //ResultDesc info = ManagerService.ModifyClerkAuth(auth, clerkId, LoginId, UserTypeInfo); //if (!info.Result) // return new ErrType(ERR.SERVICE, info.Desc); #endregion return GeneralErr.Success; } 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> public void CreateClerkExecute() { ClerkAccountInfo = new BzjClerk(); ClerkAccountInfo.AgentId = _accName; ClerkAuthInfo = new DealerAuthority(); ClerkAccountWindow window = new ClerkAccountWindow() { AccNameVisibility = Visibility.Visible, Owner = Application.Current.MainWindow, DataContext = this }; if (window.ShowDialog() == true) { ClerkAccountInfo.ClerkId = _accName + ClerkAccountInfo.ClerkId;//店员账号默认以金商账户名开头 ErrType err = _businessService.AddClerk(ClerkAccountInfo, ClerkAuthInfo, _loginID, (int)_accType); if (err.Err != ERR.SUCCESS) MessageBox.Show(err.ErrMsg, err.ErrTitle, MessageBoxButton.OK, MessageBoxImage.Information); else { //Todo:移动到添加的行 ClerkAccountList.Add(ClerkAccountInfo); } } }
/// <summary> /// 同步金商权限数据 /// </summary> /// <param name="dealerAuthority">同步数据源</param> internal void Sync(DealerAuthority dealerAuthority) { AccMgrReadonly = dealerAuthority.AccMgrReadonly; //同步管理权限 if (dealerAuthority.AccountManager.HasValue) AccountManager = dealerAuthority.AccountManager; else { ClientAccountManager = dealerAuthority.ClientAccountManager; DealerAccountManager = dealerAuthority.DealerAccountManager; } //同步操作权限 if (dealerAuthority.OperatingAuthority.HasValue) OperatingAuthority = dealerAuthority.OperatingAuthority; else { AllowCreateNewAccount = dealerAuthority.AllowCreateNewAccount; AllowDeleteClient = dealerAuthority.AllowDeleteClient; AllowViewClientInformation = dealerAuthority.AllowViewClientInformation; AllowViewTradeDetail = dealerAuthority.AllowViewTradeDetail; AllowCashIO = dealerAuthority.AllowCashIO; AllowAdjustmentAmount = dealerAuthority.AllowAdjustmentAmount; AllowMarketOrder = dealerAuthority.AllowMarketOrder; AllowChargebackOrder = dealerAuthority.AllowChargebackOrder; AllowWarehousingOrder = dealerAuthority.AllowWarehousingOrder; AllowPendingOrder = dealerAuthority.AllowPendingOrder; AllowRevocationOrder = dealerAuthority.AllowRevocationOrder; MarketOrderStatements = dealerAuthority.MarketOrderStatements; WarehousingStatements = dealerAuthority.WarehousingStatements; ChargebackStatements = dealerAuthority.ChargebackStatements; PendingOrderStatements = dealerAuthority.PendingOrderStatements; AdjustDepositStatements = dealerAuthority.AdjustDepositStatements; } //同步交易管理权限 if (dealerAuthority.IsTradeManagerEnabled.HasValue) IsTradeManagerEnabled = dealerAuthority.IsTradeManagerEnabled; else { AllowViewMarketOrder = dealerAuthority.AllowViewMarketOrder; AllowMarketOrder = dealerAuthority.AllowMarketOrder; AllowViewPendingOrder = dealerAuthority.AllowViewPendingOrder; AllowViewChargebackRecord = dealerAuthority.AllowViewChargebackRecord; AllowViewHedgingTransactions = dealerAuthority.AllowViewHedgingTransactions; AllowViewWarehousing = dealerAuthority.AllowViewWarehousing; AllowExportStatement = dealerAuthority.AllowExportStatement; } //店员权限 //TradeManage = dealerAuthority.TradeManage; DeliverOrder = dealerAuthority.DeliverOrder; TihuoOrder = dealerAuthority.TihuoOrder; HuiGouOrder = dealerAuthority.HuiGouOrder; JgjOrder = dealerAuthority.JgjOrder; //TiHuoShouLi = dealerAuthority.TiHuoShouLi; BangDingUser = dealerAuthority.BangDingUser; TiHuo = dealerAuthority.TiHuo; ShouLiMingXi = dealerAuthority.ShouLiMingXi; CheckManage = dealerAuthority.CheckManage; CheckDel = dealerAuthority.CheckDel; AgentClerk = dealerAuthority.AgentClerk; OrderTakeReport = dealerAuthority.OrderTakeReport; OrderBackReport = dealerAuthority.OrderBackReport; OrderCheckReport = dealerAuthority.OrderCheckReport; JgjReport = dealerAuthority.JgjReport; AgentDoDetail = dealerAuthority.AgentDoDetail; }