コード例 #1
0
        public ActionResult Edit(MonitorVm bind)
        {
            if (ModelState.IsValid)
            {
                var monitorId = service.EditMonitor(bind);

                BackgroundJob.Enqueue(() => index.EditItem(monitorId));

                return(RedirectToAction("Index"));
            }
            var picturesVm = service.GetMonitorPicturesAndThumbnail(bind.Id);

            bind.Thumbnail       = picturesVm.Thumbnail;
            bind.MonitorPictures = picturesVm.MonitorPictures;
            bind.ViewData        = service.GetMonitorViewData();

            return(View(bind));
        }