/// <summary> /// 获得数据列表 /// </summary> public List <RemitInfoModel> RemitInfoList(DataTable dt) { List <RemitInfoModel> remitList = new List <RemitInfoModel>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { RemitInfoModel model; for (int n = 0; n < rowsCount; n++) { model = new RemitInfoModel(); if (dt.Rows[n]["ID"] != null && dt.Rows[n]["ID"].ToString() != "") { model.ID = dt.Rows[n]["ID"].ToString(); } if (dt.Rows[n]["Remit001"] != null && dt.Rows[n]["Remit001"].ToString() != "") { model.Remit001 = dt.Rows[n]["Remit001"].ToString(); } if (dt.Rows[n]["Remit002"] != null && dt.Rows[n]["Remit002"].ToString() != "") { model.Remit002 = dt.Rows[n]["Remit002"].ToString(); } if (dt.Rows[n]["RemitMoney"] != null && dt.Rows[n]["RemitMoney"].ToString() != "") { model.RemitMoney = dt.Rows[n]["RemitMoney"].ToString(); } remitList.Add(model); } } return(remitList); }
public static CashFlowBillSet GetCashFlowBillSet(RemitInfoModel model) { return(new CashFlowBillSet() { CashFlowBill = new CashFlowBillModel() { BillNo = "", RemitTime = Convert.ToDateTime(model.RemitDate + model.RemitTime), ChannelId = model.Channel, CollectionTypeId = model.CollectionType, Amount = model.Amount.ToDecimal(), ImportBatchNo = model.ImportBatchNo, Source = model.Source } }); }