Пример #1
0
        public ActionResult CommodityGrade_Update([DataSourceRequest] DataSourceRequest request,
                                                  CommodityGradeViewModel commodityGradeViewModel)
        {
            if (commodityGradeViewModel != null && ModelState.IsValid)
            {
                var target         = _commodityGradeService.FindById(commodityGradeViewModel.CommodityGradeID);
                var commodityGrade = CommodityGradeViewModelBinder.BindCommodityGrade(commodityGradeViewModel, target);
                _commodityGradeService.EditCommodityGrade(commodityGrade);
            }

            return(Json(new[] { commodityGradeViewModel }.ToDataSourceResult(request, ModelState)));
        }
Пример #2
0
        //
        // GET: /CommodityGrade/Details/5

        public ViewResult Details(int id)
        {
            CommodityGrade commoditygrade = _commodityGradeService.FindById(id);

            return(View(commoditygrade));
        }