public object GetAssetCashflowTable(AssetCashflowStatisticInfo viewModel, Project project, DateTime paymentDate) { var acfTable = new DataTable(); var dictionaryDates = new Dictionary <DateTime, DateTime>(); try { var projectLogicModel = new ProjectLogicModel(m_userName, project); var datasetSchedule = projectLogicModel.DealSchedule.GetByPaymentDay(paymentDate); CommUtils.AssertNotNull(datasetSchedule.Dataset.Instance, "第{0}期模型未生成", Toolkit.DateToString(datasetSchedule.PaymentDate)); paymentDate = datasetSchedule.PaymentDate; var dealModel = datasetSchedule.Dataset.DealModel; var absDeal = new ABSDeal(dealModel.YmlFolder, dealModel.DsFolder); var acfResult = absDeal.Result.AcfResult; acfResult.MergeOsa(dealModel.OverrideSingleAsset); acfResult.ReCalcSum(); return(acfResult.ExtractAssetCashflowTable(absDeal, paymentDate)); } catch (ApplicationException ae) { var errorResult = new { isError = true, errorMessage = ae.Message }; return(errorResult); } }
public ActionResult GetAssetCashflowDataTable(string projectGuid, string paymentDay) { return(ActionUtils.Json(() => { if (string.IsNullOrWhiteSpace(paymentDay)) { var errorResult = new { isError = true, errorMessage = "请选择偿付期" }; return ActionUtils.Success(errorResult); } DateTime paymentDate; if (!DateTime.TryParse(paymentDay, out paymentDate)) { var errorResult = new { isError = true, errorMessage = "偿付期错误,请刷新页面后重试" }; return ActionUtils.Success(errorResult); } var handler = new TaskExAssetCashflow(CurrentUserName, null); var viewModel = new AssetCashflowStatisticInfo(); var result = handler.GetACFTableByProject(viewModel, projectGuid, paymentDate); return ActionUtils.Success(result); })); }
public object GetACFTableByProject(AssetCashflowStatisticInfo viewModel, string projectGuid, DateTime paymentDate) { var project = m_dbAdapter.Project.GetProjectByGuid(projectGuid); return(GetAssetCashflowTable(viewModel, project, paymentDate)); }