// 統計圖表 public ActionResult StatisticChart(DateTime DateStart, DateTime DateEnd) { RepositoryAccounting repo = new RepositoryAccounting(); StatisticChartViewModel data = repo.GetStatisticChartViewModel(DateStart, DateEnd); return(PartialView("_StatisticChart", data)); }
// 取消 public ActionResult Cancel(long RecordID) { RepositoryAccounting repo = new RepositoryAccounting(); RentMD data = repo.GetRentMD(RecordID); return(PartialView("_Cancel", data)); }
// 刪除點餐紀錄 public ActionResult Cancel(string OrderNo) { RepositoryAccounting repo = new RepositoryAccounting(); OrderMD data = repo.GetOrderMD(OrderNo); return(data == null?PartialView("_Error") : PartialView("_Cancel", data)); }
public ActionResult Cancel(RentMD Data) { RepositoryAccounting repo = new RepositoryAccounting(); AuthModel auth = RepositoryAuthModel.GetAuthModel(HttpContext.User.Identity as FormsIdentity); OperationResult <AccountingViewModel> result = repo.CancelRent(Data, auth); return(Json(result)); }
// 租金管理首頁 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 Check(OrderMD Data) { RepositoryAccounting repo = new RepositoryAccounting(); OrderMD data = repo.GetOrderMD(Data); ModelState.Clear(); return(data == null?PartialView("_Error") : PartialView("_Check", 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); */ }