コード例 #1
0
        public IActionResult All(int page = 1)
        {
            var allParts = this.partService.All(page, PageSize);

            var allPartViewModel = new AllPartViewModel()
            {
                Parts       = allParts,
                CurrentPage = page,
                TotalPages  = (int)Math.Ceiling(this.partService.TotalParts() / (double)PageSize)
            };

            return(View(allPartViewModel));
        }
コード例 #2
0
        public ActionResult Delete(int id)
        {
            AllPartViewModel partVm = this.service.GetAllPartById(id);

            return(View(partVm));
        }