Пример #1
0
 public ActionResult Detail(int id)
 {
     _vm.Videos = _reposVideo.getItem(id);
     /*get all data Partnership width picture */
     _vm.ListPartnerships = _repositoryPartner.getAllItems();
     return(View(_vm));
 }
Пример #2
0
        //
        // GET: /Video/Edit/5

        public ActionResult Edit(int id)
        {
            try
            {
                _vm.Video         = _repository.getItem(id);
                _vm.isDeleted     = _vm.Video.Deleted.GetValueOrDefault(true);
                _vm.isPublish     = _vm.Video.Published.GetValueOrDefault(true);
                _vm.isHome        = _vm.Video.isShowHome.GetValueOrDefault(true);
                _vm.positionVideo = _vm.Video.PositionID.GetValueOrDefault();


                _vm.PositionGalleriesItemList = _repositoryPos.getAllItems().Select(
                    x => new SelectListItem
                {
                    Value = x.PositionGalleryID.ToString(),
                    Text  = x.PositionName
                });
                return(View(_vm));
            }
            catch (Exception ex)
            {
                return(View(ex.Message));
            }
        }