public Exist_RepaymentPlanModel RepaymentPlanModel(int LoadId, DateTime endTime) { Exist_RepaymentPlanModel model = new Exist_RepaymentPlanModel(); DataSet ds = _dal.GetCurrRepaymentPlanInfo(LoadId, endTime); if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) { model.IfOnPlan = Convert.ToBoolean(ds.Tables[0].Rows[0][0]); } if (ds.Tables[1] != null && ds.Tables[1].Rows.Count > 0) { model.planCount = Convert.ToInt32(ds.Tables[1].Rows[0][0]); } if (ds.Tables[2] != null && ds.Tables[2].Rows.Count > 0) { model.lasttime = Convert.ToDateTime(ds.Tables[2].Rows[0][0]); } if (ds.Tables[3] != null && ds.Tables[3].Rows.Count > 0) { model.TotalPan = Convert.ToInt32(ds.Tables[3].Rows[0][0]); } return(model); }
public string RepaymentPlanModel(int LoadId, DateTime endTime) { Exist_RepaymentPlanModel dt = _bll.RepaymentPlanModel(LoadId, endTime); return(JsonConvert.SerializeObject(dt)); }