コード例 #1
0
        public ActionResult Gallery()
        {
            Operation       operation = new OpSliderBase();
            OperationResult result    = _manager.ExecuteOperation(operation);
            SliderDto       sl        = result.Items[0] as SliderDto;

            return(View(sl));
        }
コード例 #2
0
        public JsonResult Slider(SliderDto dto)
        {
            OpSliderBase op = new OpSliderBase();

            op.Dto = dto;
            var result = _manager.ExecuteOperation(op);

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
コード例 #3
0
ファイル: HomeController.cs プロジェクト: nm1996/asp
        public ActionResult Gallery()
        {
            OpSliderBase    op     = new OpSliderBase();
            OperationResult result = new OperationResult();

            result = _manager.ExecuteOperation(op);
            SliderDto dto = result.Items[0] as SliderDto;

            return(View(dto));
        }
コード例 #4
0
ファイル: HomeController.cs プロジェクト: Dusicaa/Cimet
        public ActionResult Index()
        {
            OpSliderBase op         = new OpSliderBase();
            var          result     = _manager.executeOperation(op);
            OpBlogBase   opBlog     = new OpBlogBase();
            var          resultBlog = _manager.executeOperation(opBlog);

            OpRecipesBase    opRecipes    = new OpRecipesBase();
            var              resultrecept = _manager.executeOperation(opRecipes);
            PocetnaViewModel vm           = new PocetnaViewModel
            {
                Slider  = result.Items[0] as SliderDto,
                Blog    = (resultBlog.Items as BlogDto[]).ToList(),
                Recepti = (resultrecept.Items as RecipesDto[]).ToList()
            };

            return(View(vm));
        }