public TraderFindService.SpotCapitalEntity QueryXHTotalCapital(Types.CurrencyType type, ref string msg) { if (!IsServiceOk) { return(null); } return(traderFindClient.SpotCapitalFind(xhAccount, type, "", ref msg)); }
public HKTraderFindService.HKCapitalEntity QueryHKTotalCapital(Types.CurrencyType type, ref string msg) { if (!IsServiceOk) { return(null); } var capital = hkTraderFindClient.HKCapitalFind(hkAccount, type, "", ref msg); return(capital); }
public void FuturesCapitalFind2Test() { TraderFindService target = new TraderFindService(); // TODO: 初始化为适当的值 string userId = string.Empty; // TODO: 初始化为适当的值 int AccountType = 0; // TODO: 初始化为适当的值 Types.CurrencyType currencyType = new Types.CurrencyType(); // TODO: 初始化为适当的值 string userPassword = string.Empty; // TODO: 初始化为适当的值 string strErrorMessage = string.Empty; // TODO: 初始化为适当的值 string strErrorMessageExpected = string.Empty; // TODO: 初始化为适当的值 FuturesCapitalEntity expected = null; // TODO: 初始化为适当的值 FuturesCapitalEntity actual; //actual = target.FuturesCapitalFind2(userId, AccountType, currencyType, userPassword, ref strErrorMessage); Assert.AreEqual(strErrorMessageExpected, strErrorMessage); //Assert.AreEqual(expected, actual); Assert.Inconclusive("验证此测试方法的正确性。"); }
/// <summary>期货资金情况查询 /// 期货资金情况查询 包含盈亏相关信息在内 /// </summary> /// <param name="userId"></param> /// <param name="accountType">账号类型(注:这是账户类型不是类别,这里是有九种类型,而类别是五种)</param> /// <param name="currencyType"></param> /// <param name="userPassword"></param> /// <param name="strErrorMessage"></param> /// <returns></returns> public FuturesCapitalEntity PagingQueryFuturesCapital(string userId, int accountType, Types.CurrencyType currencyType, string userPassword, ref string strErrorMessage) { #region old code //AccountPair _AccountPair = CommonDataAgent.GeyAccountPair(userId, accountType, 0, ref userPassword); //strErrorMessage = userPassword; //if (_AccountPair == null) return null; //FuturesCapitalEntity result = null; //var aa = new CapitalAndHoldFindBLL(); //result = aa.FuturesCapitalFind(_AccountPair.CapitalAccount.UserAccountDistributeLogo, currencyType, userPassword, ref strErrorMessage); //return result; #endregion AccountManager am = AccountManager.Instance; UA_UserAccountAllocationTableInfo userAccountInfo = am.GetAccountByUserIDAndAccountType(userId, accountType); UA_UserBasicInformationTableInfo userInfo = am.GetBasicUserByUserId(userId); if (userAccountInfo == null || userInfo == null) { strErrorMessage = "交易员对应类型的帐号不存在"; return(null); } if (userInfo.Password != userPassword) { strErrorMessage = "交易员密码错误"; return(null); } FuturesCapitalEntity result = null; var aa = new CapitalAndHoldFindBLL(); result = aa.FuturesCapitalFind(userAccountInfo.UserAccountDistributeLogo, currencyType, userPassword, ref strErrorMessage); return(result); }
/// <summary> /// 转账按钮事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button1_Click(object sender, EventArgs e) { try { string FromCapital = this.cmbFromCaption.SelectedItem.ToString(); int FromCapitalAccount = Caption(FromCapital); string ToCapital = this.cmbToCaption.SelectedItem.ToString(); int ToCapitalAccount = Caption(ToCapital); decimal TransferAmount = 0; if (decimal.TryParse(this.txtCaptionNum.Text.ToString(), out TransferAmount)) { if (!string.IsNullOrEmpty(this.txtCaptionNum.Text.ToString())) { FreeTransferEntity freeTransferEntity = new FreeTransferEntity(); freeTransferEntity.TraderID = ServerConfig.TraderID.ToString(); freeTransferEntity.FromCapitalAccountType = FromCapitalAccount; freeTransferEntity.ToCapitalAccountType = ToCapitalAccount; freeTransferEntity.TransferAmount = TransferAmount; string Currency = this.cmbCurrencyType.SelectedItem.ToString(); Types.CurrencyType currencyType = new Types.CurrencyType(); if (Currency.Equals("人民币")) { currencyType = Types.CurrencyType.RMB; } else if (Currency.Equals("港币")) { currencyType = Types.CurrencyType.HK; } else if (Currency.Equals("美元")) { currencyType = Types.CurrencyType.US; } if (TransferAmount > 0) { string errMsg = ""; bool x = wcfLogic.TwoAccountsFreeTransferFunds(freeTransferEntity, currencyType, out errMsg); if (x == true) { MessageBox.Show("转账成功", "系统提示"); this.txtCaptionNum.Text = ""; if (this.cmbToCaption.SelectedItem.Equals("银行帐号") || this.cmbFromCaption.SelectedItem.Equals("银行帐号")) { QueryUA_BankAccountByUserID(); } } else { error.SetError(txtCaptionNum, "转账失败!" + errMsg); } } else { error.SetError(txtCaptionNum, "转账金额必须大于零!"); } } else { error.SetError(txtCaptionNum, "转账金额不能为空!"); } } else { error.SetError(txtCaptionNum, "转账金额输入错误!"); } } catch (Exception ex) { LogHelper.WriteError(ex.Message, ex); } }