Example #1
0
        public OperationResult Create(CreateSlider command)
        {
            var operation = new OperationResult();
            var fileName  = _fileUploader.Upload(command.Picture, "Slider");

            var slider = new Slider(fileName, command.PictureAlt, command.PictureTitle, command.Heading,
                                    command.Title, command.Text, command.BtnText, command.UrlLink);

            _sliderRepository.Create(slider);
            _sliderRepository.SaveChanges();

            return(operation.Succedded());
        }
Example #2
0
    private void AnswerPressed()
    {
        _mySlider = gameObject.transform.parent.transform.parent.gameObject;
        _slider   = _mySlider.GetComponent <CreateSlider>();
        int _nextRed = (_slider.Answers[gameObject.transform.parent.gameObject]);

        foreach (var g in _slider.Answers.Keys)
        {
            g.GetComponentInChildren <Renderer>().material.color = Color.white;
        }

        gameObject.GetComponent <QuestionnaireColor>().OnAnswerPress();
        Variables.AnswerDict[transform.parent.transform.parent.transform.parent.gameObject] = _nextRed;
    }
        public JsonResult OnPostCreate(CreateSlider command)
        {
            var result = _sliderApplication.Create(command);

            return(new JsonResult(result));
        }
        public IActionResult OnGetCreate()
        {
            var command = new CreateSlider();

            return(Partial("./Create", command));
        }