/// <summary> /// /// </summary> /// <param name="payInfo"></param> public void AddPayInfo(PayInfo payInfo) { if (this._listPayInfo == null) { this._listPayInfo = new List <PayInfo>(); } this._listPayInfo.Add(payInfo); }
/// <summary> /// /// </summary> /// <param name="inter"></param> private OutParameter WriteOutParameter(Interface inter) { string errorInfo = inter.GetMessage(); try { OutParameter outParameter = new OutParameter(); List <PayInfo> listPayInfo = new List <PayInfo>(); string str = string.Empty; inter.SetResultset("payinfo"); do { PayInfo payInfo = new PayInfo(); List <Parameter> listParameter = GetProperties <PayInfo>(payInfo); foreach (Parameter p in listParameter) { str = string.Empty; inter.GetByName(p.Name, ref str); payInfo.SetAttributeValue(p.Name, str); } listPayInfo.Add(payInfo); } while (0 < inter.NextRow()); inter.SetResultset("bizinfo"); BizInfo bizInfo = new BizInfo(); List <Parameter> listBizInfo = GetProperties <BizInfo>(bizInfo); foreach (Parameter p in listBizInfo) { str = string.Empty; inter.GetByName(p.Name, ref str); bizInfo.SetAttributeValue(p.Name, str); } outParameter._listPayInfo = listPayInfo; outParameter.BizInfo = bizInfo; return(outParameter); } catch (Exception ex) { throw new Exception(errorInfo); } }