Example #1
0
        public IActionResult Edit(SpecialModel model)
        {
            model.Begins = StringToTimeSpan(Request, "Begins");
            model.Ends   = StringToTimeSpan(Request, "Ends");

            return(Json(_handler.Upsert(model)));
        }
        public async Task <IActionResult> Index(ImageIndexModel model)
        {
            var location = FileUploader.ProcessFormFile(_azureSettings.StorageAccount, _azureSettings.StorageAccountPassword, model.File, "images", ModelState).Result.ToString();

            _handler.Upsert(new ImageModel()
            {
                Name = model.Name, Location = location
            });
            return(RedirectToAction(nameof(Index)));
        }
        public async Task <IActionResult> Index(DocumentIndexModel model)
        {
            var title    = $"{ViewData["Title"]} - {model.Category}".Replace(" ", "");
            var location = FileUploader.ProcessFormFile(_azureSettings.StorageAccount, _azureSettings.StorageAccountPassword,
                                                        model.File, "documents", ModelState, title, true).Result.ToString();

            _handler.Upsert(
                new DocumentModel()
            {
                Location        = location,
                Type            = Document.DocType.FromFileName(location),
                Category        = model.Category,
                DeleteAllOthers = true
            }
                );

            return(RedirectToAction(nameof(Index)));
        }
 public IActionResult Edit(PriceTypeModel model)
 {
     return(Json(_handler.Upsert(model)));
 }
 public IActionResult Edit(LocationModel model)
 {
     model.GoogleMapsApiKey = new Query.Settings.Get(_context, new[] { SettingName.GoogleMapsDeveloperApiKey }).ExecuteAndReturnResults().First().Value;
     return(Json(_handler.Upsert(model)));
 }
 public IActionResult Edit(SquareLocationModel model)
 {
     return(Json(_handler.Upsert(model)));
 }
Example #7
0
 public IActionResult Edit(CategoryModel model)
 {
     return(Json(_handler.Upsert(model)));
 }
Example #8
0
 public IActionResult Edit(SiblingSiteModel model)
 {
     return(Json(_handler.Upsert(model)));
 }
 public IActionResult Index(DeliveryDestinationModel NewDestination)
 {
     Json(_handler.Upsert(NewDestination));
     return(RedirectToAction(nameof(Index)));
 }