// 發行紀錄 public ActionResult Record() { RepositoryIssueRecord repo = new RepositoryIssueRecord(); List <IssueRecordViewModel> data = repo.Query(); return(PartialView("_Record", data)); }
// 帳務資料首頁 public ActionResult Index() { RepositoryIssueRecord repoIssueRecord = new RepositoryIssueRecord(); RepositoryAccounting repoAccounting = new RepositoryAccounting(); AnalysisViewModel data = new AnalysisViewModel(); data.GeneralAccounting = repoAccounting.Query(); data.StoredAccounting = repoIssueRecord.Query(); data.DateList.AddRange(data.GeneralAccounting.Select(x => x.UpdateTime.ToString("yyyy/MM/dd")).ToList()); data.DateList.AddRange(data.StoredAccounting.Select(x => x.UpdateTime.ToString("yyyy/MM/dd")).ToList()); data.DateList = data.DateList.Distinct().OrderBy(x => x).ToList(); return(PartialView("_Index", data)); /* * RepositoryAccounting repo = new RepositoryAccounting(); * List<AccountingViewModel> data = repo.Query(); * * return PartialView("_Index", data); */ }