public void PaginQueryUA_CapitalFlowTableByFilterTest() { TraderFindService target = new TraderFindService(); // TODO: 初始化为适当的值 string userId = "4"; // TODO: 初始化为适当的值 string pwd = string.Empty; // TODO: 初始化为适当的值 Types.AccountAttributionType accountType = Types.AccountAttributionType.BankAccount; // TODO: 初始化为适当的值 QueryUA_CapitalFlowFilter filter = new QueryUA_CapitalFlowFilter(); // TODO: 初始化为适当的值 filter.StartTime = new DateTime(2009, 02, 3); filter.EndTime = DateTime.Now; PagingInfo pageInfo = new PagingInfo(); // TODO: 初始化为适当的值 pageInfo.CurrentPage = 1; pageInfo.IsCount = true; pageInfo.PageLength = 12; pageInfo.Sort = 0; int total = 0; // TODO: 初始化为适当的值 int totalExpected = 0; // TODO: 初始化为适当的值 string errorMsg = string.Empty; // TODO: 初始化为适当的值 string errorMsgExpected = string.Empty; // TODO: 初始化为适当的值 List <UA_CapitalFlowTableInfo> expected = null; // TODO: 初始化为适当的值 List <UA_CapitalFlowTableInfo> actual; //actual = target.PaginQueryUA_CapitalFlowTableByFilter(userId, pwd, accountType, filter, pageInfo, out total, out errorMsg); //Assert.AreEqual(totalExpected, total); //Assert.AreEqual(errorMsgExpected, errorMsg); //Assert.AreEqual(expected, actual); Assert.Inconclusive("验证此测试方法的正确性。"); }
/// <summary> /// 查询资金流水 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void butCapitalFlowQuery_Click(object sender, EventArgs e) { #region QueryUA_CapitalFlowFilter类的查询条件 QueryUA_CapitalFlowFilter CapitalFlowFilter = new QueryUA_CapitalFlowFilter(); //转账货币类型 string currencyType = this.cmbCurrType.SelectedIndex.ToString(); if (currencyType.Equals("0")) { CapitalFlowFilter.CurrencyType = GTA.VTS.CustomersOrders.DoCommonQuery.QueryTypeQueryCurrencyType.ALL; } else if (currencyType.Equals("1")) { CapitalFlowFilter.CurrencyType = GTA.VTS.CustomersOrders.DoCommonQuery.QueryTypeQueryCurrencyType.RMB; } else if (currencyType.Equals("2")) { CapitalFlowFilter.CurrencyType = GTA.VTS.CustomersOrders.DoCommonQuery.QueryTypeQueryCurrencyType.HK; } else if (currencyType.Equals("3")) { CapitalFlowFilter.CurrencyType = GTA.VTS.CustomersOrders.DoCommonQuery.QueryTypeQueryCurrencyType.US; } //转账金额 string TransferAmount = this.txtTransferAmount.Text.ToString(); decimal Amount = 0; if (!string.IsNullOrEmpty(TransferAmount)) { try { Amount = decimal.Parse(TransferAmount); CapitalFlowFilter.CapitalAmount = Amount; } catch (Exception ex) { LogHelper.WriteError(ex.Message, ex); } } //转账时间 //this.dateTimePickerstartTime.Text = ""; string startTime = this.dateTimePickerstartTime.Value.ToString("yyyy-MM-dd"); string endTime = this.dateTimePickerendTime.Value.ToString("yyyy-MM-dd"); if (!string.IsNullOrEmpty(startTime) && !string.IsNullOrEmpty(endTime)) { try { CapitalFlowFilter.StartTime = DateTime.Parse(startTime); CapitalFlowFilter.EndTime = DateTime.Parse(endTime); } catch (Exception ex) { LogHelper.WriteError(ex.Message, ex); } } //转账类型 string TransferType = this.cmbTransferType.SelectedIndex.ToString(); if (TransferType.Equals("0")) { CapitalFlowFilter.CapitalFlowType = 1; } else if (TransferType.Equals("1")) { CapitalFlowFilter.CapitalFlowType = 2; } else if (TransferType.Equals("2")) { CapitalFlowFilter.CapitalFlowType = 3; } #endregion QueryUA_CapitalFlowFilter类的查询条件 #region 帐号类型查询条件 string accountType = this.cmbaccountType.SelectedIndex.ToString(); int account = 0; if (accountType.Equals("0")) { account = 1; } else if (accountType.Equals("1")) { account = 2; } else if (accountType.Equals("2")) { account = 3; } else if (accountType.Equals("3")) { account = 4; } else if (accountType.Equals("4")) { account = 5; } else if (accountType.Equals("5")) { account = 6; } else if (accountType.Equals("6")) { account = 7; } else if (accountType.Equals("7")) { account = 8; } else if (accountType.Equals("8")) { account = 9; } else { account = 0; } #endregion 帐号类型查询条件 string msg = ""; this.dagCapitalFlow.DataSource = wcfLogic.QueryCapitalFlow(out msg, CapitalFlowFilter, account); #region 币种和转账列的翻译 for (int i = 0; i < this.dagCapitalFlow.Rows.Count; i++) { string CurrencyType = dagCapitalFlow.Rows[i].Cells["CapitalFlowTradeCurrencyType"].Value.ToString(); if (CurrencyType.Equals("1")) { dagCapitalFlow.Rows[i].Cells["CurrencyType"].Value = "人民币"; } else if (CurrencyType.Equals("2")) { dagCapitalFlow.Rows[i].Cells["CurrencyType"].Value = "港币"; } else if (CurrencyType.Equals("3")) { dagCapitalFlow.Rows[i].Cells["CurrencyType"].Value = "美元"; } string TransferTypes = dagCapitalFlow.Rows[i].Cells["CapitalFlowTransferTypeLogo"].Value.ToString(); if (TransferTypes.Equals("1")) { dagCapitalFlow.Rows[i].Cells["TransferTypeLogo"].Value = "自由转账"; } else if (TransferTypes.Equals("2")) { dagCapitalFlow.Rows[i].Cells["TransferTypeLogo"].Value = "分红转账"; } else if (TransferTypes.Equals("3")) { dagCapitalFlow.Rows[i].Cells["TransferTypeLogo"].Value = "追加资金"; } } #endregion }