コード例 #1
0
        // GET: Admin/DetailGroups/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DetailGroup detailGroups = _detailGroupService.GetById(id);

            if (detailGroups == null)
            {
                return(HttpNotFound());
            }
            ViewBag.PrProductGroupId = new SelectList(_productGroupService.ProductGroups(), "ProductGroupId", "GroupTitle", detailGroups.ProductGroupId);
            return(PartialView(detailGroups));
        }
コード例 #2
0
        // GET: Admin/DetailGroups/Edit/5
        public async Task <IActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var detailGroup = await _detailGroupService.GetById(id);

            if (detailGroup == null)
            {
                return(NotFound());
            }
            return(PartialView(detailGroup));
        }
コード例 #3
0
 // GET: Admin/DetailItems/Create
 public ActionResult Create(int?id)
 {
     ViewBag.DetailGroupId = new SelectList(_detailGroupService.DetailGroup(), "DetailGroupId", "Name", _detailGroupService.GetById(id));
     return(PartialView());
 }