private List<InterBankPreparedInfo> GetTestPreparedList() { int testCount =100; List<InterBankPreparedInfo> list = new List<InterBankPreparedInfo>(); for (var i = 0; i < testCount; i++) { InterBankPreparedInfo info = new InterBankPreparedInfo(); info.TermFlag = AidTypeDefine.INTER_BANK_BIZ_TERM_TYPE.Current; info.AccountNO = "6666666"+ i; info.PreparedInterest = 980.5; info.CurrentBalance = 900000; info.PreparedDate = DateTime.Now.AddDays(i); list.Add(info); } return list; }
private List<InterBankPreparedInfo> GetPreparedList() { int count = 0; List<InterBankPreparedInfo> list = new List<InterBankPreparedInfo>(); string textCount = textBoxAvilabeCount.Text.Trim(); if (string.IsNullOrEmpty(textCount) || !int.TryParse(textCount, out count)) { return list; } for (var i = 0; i < count; i++) { InterBankPreparedInfo info = new InterBankPreparedInfo(); Control[] controls = this.Controls.Find("定活标志" + (i + 1).ToString(), true); if (controls != null && controls.Length > 0) { info.TermFlag = (AidTypeDefine.INTER_BANK_BIZ_TERM_TYPE)Enum.Parse(typeof(AidTypeDefine.INTER_BANK_BIZ_TERM_TYPE), controls[0].Text.Trim()); } controls = this.Controls.Find("账号" + (i + 1).ToString(), true); if (controls != null && controls.Length > 0) { info.AccountNO = controls[0].Text.Trim(); } controls = this.Controls.Find("计提利息" + (i + 1).ToString(), true); if (controls != null && controls.Length > 0) { info.PreparedInterest = double.Parse(controls[0].Text.Trim()); } controls = this.Controls.Find("当前余额" + (i + 1).ToString(), true); if (controls != null && controls.Length > 0) { info.CurrentBalance = double.Parse(controls[0].Text.Trim()); } controls = this.Controls.Find("计提日期" + (i + 1).ToString(), true); if (controls != null && controls.Length > 0) { info.PreparedDate = DateTime.Parse(controls[0].Text); } list.Add(info); } return list; }