Esempio n. 1
0
        public List <ImportImageResult> ImportImages(ImportItemType type)
        {
            switch (type)
            {
            case ImportItemType.Host:
                return(ImportEntityImages(EntityType.Host));

            case ImportItemType.Venue:
                return(ImportEntityImages(EntityType.Venue));

            case ImportItemType.Event:
                return(ImportEventImages());

            case ImportItemType.Show:
                return(ImportShowImages());

            default:
                return(new List <ImportImageResult>());
            }
        }
Esempio n. 2
0
        public ActionResult ImportImagesResult(ImportItemType type)
        {
            var log = default(List <ImportImageResult>);

            try
            {
                log = _importService.ImportImages(type);
            }
            catch (Exception ex)
            {
                Logger.Log(LogLevel.Error, ex, "Error occured while importing images.");
                return(View(new AdminImportImagesVm {
                    Results = log, Error = ex.Message
                }));
            }

            return(View(new AdminImportImagesVm {
                Results = log
            }));
        }