// 租金管理首頁 public ActionResult Index() { RepositoryAccounting repo = new RepositoryAccounting(); AuthModel auth = RepositoryAuthModel.GetAuthModel(HttpContext.User.Identity as FormsIdentity); List <AccountingViewModel> data = repo.Query().Where(x => x.OperatorID == auth.ID && x.Type == Accounting_Type.Rent).ToList(); return(View(data)); }
// 帳務明細 public ActionResult AccountingDetail(string Date) { RepositoryAccounting repo = new RepositoryAccounting(); List <AccountingViewModel> data = repo.Query().Where(x => x.UpdateTime.ToString("yyyy/MM/dd").Equals(Date)).ToList(); ViewBag.Date = Date; return(PartialView("_AccountingDetail", 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); */ }