/// <summary> /// 数据同步 /// </summary> /// <param name="clone">同步数据源</param> public void Sync(FundsInformation clone) { BankAccountName = clone.BankAccountName; BankCardNumber = clone.BankCardNumber; BankNumber = clone.BankNumber; OpenBank = clone.OpenBank; DongJieMoney = clone.DongJieMoney; banktype = clone.banktype; }
/// <summary> /// 实例化一个普通用户账户类 /// </summary>、 public ClientAccount( ) { AccInfo = new ClientAccountInformation( ); FundsInfo = new FundsInformation( ); TransactionSettings = new TransactionSettings( ); }
private void ShowAccInfo() { //if (string.IsNullOrEmpty(clone.FundsInfo.banktype)) //{ // MessageBox.Show("银行类型不能为空!"); // return; //} FundsInformation fi = new FundsInformation() { OpenBank = clone.FundsInfo.OpenBank, BankCardNumber = clone.FundsInfo.BankCardNumber, banktype = clone.FundsInfo.banktype}; ErrType err = _businessService.ModifyClientAccountInfo(clone, fi, _loginID); if (err == GeneralErr.Success) { clientAccount.FundsInfo.OpenBank = fi.OpenBank; clientAccount.FundsInfo.BankCardNumber = fi.BankCardNumber; clone.AccInfo.LastUpdateManager = _accName; clientAccount.Sync(clone); GetUserBaseInfoWithPage(); clientView.Close(); } else { MessageBox.Show(err.ErrMsg, err.ErrTitle, MessageBoxButton.OK, MessageBoxImage.Warning); } }
private void AddClient() { if (string.IsNullOrEmpty(newClient.FundsInfo.banktype)) { MessageBox.Show("银行类型不能为空,请选择银行类型"); return; } newClient.AccInfo.UserID = Guid.NewGuid().ToString("n"); foreach (var item in this.POrgList) { if (item.OrgName == newClient.AccInfo.OrgName) { newClient.AccInfo.Telephone = item.TelePhone; break; } } FundsInformation fim = new FundsInformation() { OpenBank = newClient.FundsInfo.OpenBank, BankCardNumber = newClient.FundsInfo.BankCardNumber, banktype = newClient.FundsInfo.banktype }; ErrType err = _businessService.AddClientAccount(newClient, fim, UserTypeInfo.NormalType, _loginID); if (err == GeneralErr.Success) { clientView.Close(); AddClientAccount(UserBaseInfo.TdUserList, newClient); } else { MessageBox.Show(err.ErrMsg, err.ErrTitle, MessageBoxButton.OK, MessageBoxImage.Warning); } }
/// <summary> /// 数据同步 /// </summary> /// <param name="clone">同步数据源</param> public void Sync( FundsInformation clone ) { BankAccountName = clone.BankAccountName; BankCardNumber = clone.BankCardNumber; BankNumber = clone.BankNumber; OpenBank = clone.OpenBank; DongJieMoney = clone.DongJieMoney; banktype = clone.banktype; }
/// <summary> /// 新增客户账号 /// </summary> /// <param name="clientAcc">新增的客户资料信息</param> /// <param name="Fdinfo">资金信息</param> /// <param name="type">账户类型</param> /// <param name="loginID">登录标识</param> /// <returns></returns> public ErrType AddClientAccount(ClientAccount clientAcc, FundsInformation Fdinfo, UserTypeInfo type, string loginID) { try { UserType uType = EnumConverter.ConverterUserType(type); TradeUser userInfo = MyConverter.ToTradeUser(clientAcc); Fundinfo finfo = new Fundinfo(); finfo.OpenBank = Fdinfo.OpenBank; finfo.BankCard = Fdinfo.BankCardNumber; finfo.ConBankType = Fdinfo.banktype; ResultDesc result = ManagerService.AddTradeUserEx(userInfo, finfo, uType, loginID); return result.Result ? GeneralErr.Success : new ErrType(ERR.SERVICE, result.Desc); } 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="loginID">登陆标识</param> /// <param name="accType">账户类型,管理员或金商</param> /// <param name="accountName">要查询的客户账户名</param> /// <param name="fundsInfo">新的客户资金信息</param> /// <returns>ErrType</returns> public ErrType ModifyClientFundsInfo(string loginID, ACCOUNT_TYPE accType, string accountName, FundsInformation fundsInfo) { try { //Todo:金通网待处理 //return GeneralErr.Success; #region MyRegion Fundinfo info = MyConverter.ToFundInfo(fundsInfo); //ResultDesc result = ManagerService.ModifyUserFundinfo(info, accountName, loginID, (int)accType); ResultDesc result = ManagerService.ModifyUserFundinfo(info, accountName, loginID); 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="loginID">登陆标识</param> /// <param name="accType">账户类型,管理员或金商</param> /// <param name="accountName">要查询的客户账户名</param> /// <param name="fundsInfo">返回的客户资金信息</param> /// <returns>ErrType</returns> public ErrType GetClientFundsInfo(string loginID, ACCOUNT_TYPE accType, string accountName, out FundsInformation fundsInfo) { fundsInfo = null; try { UserFundinfo info = ManagerService.GetUserFundinfo(loginID, accountName); if (!info.Result) return new ErrType(ERR.SERVICE, info.Desc); fundsInfo = MyConverter.ToFundsInformation(info.Fdinfo); 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.GetClientFundsInfo); } }
internal static Fundinfo ToFundInfo(FundsInformation fundsInfo) { return new Fundinfo { AccountName = fundsInfo.BankAccountName, BankCard = fundsInfo.BankCardNumber, BankAccount = fundsInfo.BankNumber, ConBankType = fundsInfo.banktype, State = ((int)fundsInfo.ContractStatus).ToString(), Money = fundsInfo.CurrentBalance, FrozenMoney = fundsInfo.FrozenDeposit, CashUser = fundsInfo.FundsAccount, OccMoney = fundsInfo.OccupiedDeposit, OpenBank = fundsInfo.OpenBank, SubUser = fundsInfo.SubAccount, TanUser = fundsInfo.TanAccount, DongJieMoney = fundsInfo.DongJieMoney }; }