private void OnRspQryInvestor_callback(object sender, ref InvestorField investor, int size1, bool bIsLast) { if (null != OnRspQryInvestor) { OnRspQryInvestor(this, new OnRspQryInvestorEventArgs(ref investor, size1, bIsLast)); } }
/// <summary> /// POS PosInvestor field To USeInvestorBaseInfo。 /// </summary> /// <param name="field"></param> /// <returns></returns> private USeInvestorBaseInfo CtpInvestorFieldToUSeInvestorBaseInfo(InvestorField field) { USeInvestorBaseInfo investorInfo = new USeInvestorBaseInfo(); try { investorInfo.Account = field.InvestorID; investorInfo.BrokerID = field.BrokerID; investorInfo.BrokerName = ""; investorInfo.IdCardType = (USeIDCardType)((byte)field.IdentifiedCardType); investorInfo.IdentifiedCardNo = field.IdentifiedCardNo; DateTime openDate; if (DateTime.TryParseExact(field.OpenDate, "yyyyMMdd", null, System.Globalization.DateTimeStyles.None, out openDate) == false) { Debug.Assert(false); openDate = DateTime.Today; } investorInfo.OpenDate = openDate; investorInfo.Mobile = field.Mobile; investorInfo.RealName = field.InvestorName; } catch (Exception ex) { Debug.Assert(false, "PosInvestorFieldToUSeInvestorBaseInfo() convet failed," + ex.Message); } return(investorInfo); }
private void OnRspQryInvestor_callback(object sender, ref InvestorField investor, int size1, bool bIsLast) { if (size1 <= 0) { (sender as XApi).GetLog().Info("OnRspQryInvestor"); return; } (sender as XApi).GetLog().Info("OnRspQryInvestor:{0}", investor.ToFormattedString()); }
private void _OnRspQryInvestor(IntPtr ptr1, int size1, double double1) { if (OnRspQryInvestor_ == null) { return; } InvestorField obj = PInvokeUtility.GetObjectFromIntPtr <InvestorField>(ptr1); OnRspQryInvestor_(this, ref obj, size1, double1 != 0); }
public OnRspQryInvestorEventArgs(ref InvestorField investor, int size1, bool bIsLast) { this.investor = investor; this.size1 = size1; this.bIsLast = bIsLast; }
private void OnInvestorReceived(object sender, InvestorField investor, bool isLast) { Logger.Info(investor.Name() + " " + investor.IdentifiedCardNo); }