Beispiel #1
0
        public IActionResult OnPostEdit(EditSlide command)
        {
            var operationResult = new OperationResult();

            if (ModelState.IsValid)
            {
                operationResult = _slideApplication.Edit(command);
            }
            return(new JsonResult(operationResult));
        }
Beispiel #2
0
        public OperationResult Edit(EditSlide command)
        {
            var operation = new OperationResult();
            var slide     = _slideRepository.Get(command.Id);

            if (slide == null)
            {
                return(operation.Failed(ApplicationMessages.RecordNotFound));
            }
            slide.Edit(command.Picture, command.PictureAlt, command.PictureTitle, command.Heading, command.Text, command.Title, command.Link, command.BtnText);
            _slideRepository.SaveChanges();
            return(operation.Succeded());
        }
Beispiel #3
0
        public OperationResult Edit(EditSlide command)
        {
            var result = new OperationResult();
            var slide  = _slideRepository.Get(command.Id);

            if (slide == null)
            {
                return(result.Failed(QueryValidationMessage.NotFound));
            }
            var path        = "Slides";
            var picturePath = _fileUploader.FileUpload(command.Picture, path);

            slide.Edit(picturePath, command.PictureTitle, command.PictureAlt, command.Heading, command.Title,
                       command.Text, command.BtnText, command.Link);
            _slideRepository.SaveChanges();
            return(result.Succeeded());
        }
Beispiel #4
0
        public OperationResult Edit(EditSlide command)
        {
            OperationResult operationResult = new OperationResult();
            var             slide           = _slideRepo.Get(command.Id);

            if (slide == null)
            {
                return(operationResult.Failed(ApplicationMessage.recordNotFound));
            }


            var Path        = "Slides";
            var picturePath = _fileUploader.Upload(command.Picture, Path);

            slide.Edit(picturePath, command.PictureAlt, command.PictureTitle, command.Heading, command.Title, command.Text,
                       command.link, command.btnText);

            _slideRepo.Save();
            return(operationResult.Succeeded());
        }
        public JsonResult OnPostEdit(EditSlide command)
        {
            var result = _slideApplication.Edit(command);

            return(new JsonResult(result));
        }
Beispiel #6
0
        private void ScriptListItemEdit_Click(object sender, RoutedEventArgs e)
        {
            if (Mouse.RightButton == MouseButtonState.Pressed) return;

            string _path = Properties.Resources.SongPath + "\\";

            if (serviceListBox.SelectedIndex == -1) return;

            _path += ((ServiceItem)serviceListBox.SelectedItem).Title + ".xml";

            EditSlide _editSlide = new EditSlide(_path, ((System.Windows.Controls.ListViewItem)ScriptListView.SelectedItem).Name);

            _editSlide.ShowDialog();

            setSong(((ServiceItem)serviceListBox.SelectedItem).Title);
        }