Пример #1
0
        public ActionResult ChangeListNoBanner(List <int> id)
        {
            if (!CheckIsLogin())
            {
                return(Redirect(res.Pageviews.PvMemberSignIn));
            }
            var svBanner = new BannerService();
            var banner   = new b2bBanner();

            try
            {
                List <int> list       = new List <int>();
                var        id_banner1 = id[1];
                var        id_banner2 = id[0];
                banner = svBanner.SelectData <b2bBanner>("*", " BannerID = " + id_banner1 + " AND WebID = 1").First();
                list.Add(banner.ListNo);
                banner = svBanner.SelectData <b2bBanner>("*", " BannerID = " + id_banner2 + " AND WebID = 1").First();
                list.Add(banner.ListNo);

                svBanner.UpdateBannerListNo(id, list);
            }
            catch (Exception ex)
            {
                CreateLogFiles(ex);
            }

            return(Json(new { IsResult = svBanner.IsResult, MsgError = GenerateMsgError(svBanner.MsgError), ID = id }));
        }
Пример #2
0
        public ActionResult BannerList(FormCollection form)
        {
            var    svBanner = new BannerService();
            string SQLWhere = "IsDelete = 0 AND WebID = 1";

            SelectList_PageSize();
            SetPager(form);
            SetBannerPager(form);

            if (!string.IsNullOrEmpty(ViewBag.Period))
            {
                SQLWhere += SQLWhereDateTimeFromPeriod(ViewBag.Period, "ModifiedDate");
            }

            if (!string.IsNullOrEmpty(form["SearchText"]))
            {
                SQLWhere += " AND BannerTitle LIKE N'%" + form["SearchText"].Trim() + "%'";
            }
            else
            {
                GetStatusUser();
                SetPager(form);
                var Banner = svBanner.SelectData <b2bBanner>("*", "IsDelete = 0 AND WebID = 1", "ListNo ASC", (int)ViewBag.PageIndex, (int)ViewBag.PageSize);
                ViewBag.Banner    = Banner;
                ViewBag.TotalPage = svBanner.TotalPage;
                ViewBag.TotalRow  = svBanner.TotalRow;
            }
            var banner = svBanner.SelectData <b2bBanner>("*", SQLWhere, "ListNo ASC", (int)ViewBag.PageIndex, (int)ViewBag.PageSize);

            ViewBag.TotalPage = svBanner.TotalPage;
            ViewBag.TotalRow  = svBanner.TotalRow;
            ViewBag.Banner    = banner;

            return(PartialView("UC/BannerGrid"));
        }
Пример #3
0
 public HomeController(NewsService newsService, BannerService bannerService, UsersService userService, UserSendMessageService usersendmessageService)
 {
     this._newsService            = newsService;
     this._bannerService          = bannerService;
     this._userService            = userService;
     this._usersendmessageService = usersendmessageService;
 }
Пример #4
0
        public ActionResult Index()
        {
            var paths      = new List <string>();
            var bannerPath = Server.MapPath("/Images/Banners");


            var imgs = BannerService.GetActiveBanners();

            if (imgs != null && imgs.Any())
            {
                paths.AddRange(imgs.Select(banner => banner.FileName));
            }
            var listcons = new List <ContractorIndexPageModel>();
            var cats     = CategoryService.GetAllCategories();

            if (cats != null && cats.Any())
            {
                cats = cats.OrderByDescending(ca => ca.ContractorCount).ToList().ToList();
                listcons.AddRange(cats.Select(obj => new ContractorIndexPageModel
                {
                    CatName = obj.Name, CatCount = obj.ContractorCount, CategoryId = obj.Id, BgURL = obj.Image, IconURL = obj.Icon
                }));
            }
            var feed = AdminService.GetApprovedFeedbacks();

            var jobs = JobService.GetReadyJobs(null).Take(9).ToList();

            return(View(new HomePageWraper
            {
                BannersList = paths,
                ContractorCats = listcons,
                Feedback = feed,
                Jobs = jobs
            }));
        }
Пример #5
0
 public HomeController(IServiceProvider services)
 {
     _productService  = services.GetRequiredService <ProductService>();
     _categoryService = services.GetRequiredService <CategoryService>();
     _bannerService   = services.GetRequiredService <BannerService>();
     _reviewService   = services.GetRequiredService <ReviewService>();
 }
Пример #6
0
        public void GetBannerService()
        {
            var uow = new UnitOfWork(new DigitalSignageDbContext("TestDigitalSignageTest"));

            BannerService cS = new BannerService();

            Banner Banner = new Banner();

            Banner.Name        = "nueva campaña";
            Banner.Description = "qsy";
            Banner.InitDate    = new DateTime().AddYears(2018);
            Banner.EndDate     = new DateTime().AddYears(2018);
            Banner.InitTime    = new TimeSpan();
            Banner.EndTime     = new TimeSpan();

            uow.BannerRepository.Add(Banner);
            uow.Complete();

            try
            {
                var result = cS.Get(Banner.Id);
                Assert.IsNotNull(result);
            }
            catch (Exception e)
            {
                Assert.Fail(e.Message);
            }
        }
Пример #7
0
        public ActionResult Index()
        {
            ViewBag.Title = Resources.Resource.Title_PaginaInicial;

            var list = new BannerService().GetBackgroundBanners(GetCurrentIdIdioma());
            return View(list);
        }
Пример #8
0
        private void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            PostService.DeserializeXMLToPostCategoriesForGlobalAsax("temp", "PostCategories.xml");

            PostService.DeserializeXMLToPostsLightForGlobalAsax("temp", "PostsLight.xml");

            PortalFeedsService.DeserializeXMLToPortalFeedsLightForGlobalAsax("temp", "PortalFeeds.xml");

            AnnouncementService.DeserializeXMLToAnnouncementsForGlobalAsax("temp", "Announcements.xml");

            BillBoardService.DeserializeXMLToAdvertsForGlobalAsax("temp", "AdvertsDiger.xml", 20, "Diğer");

            BillBoardService.DeserializeXMLToAdvertsForGlobalAsax("temp", "AdvertsElektronik.xml", 20, "Elektronik");

            BillBoardService.DeserializeXMLToAdvertsForGlobalAsax("temp", "AdvertsEmlak.xml", 20, "Emlak");

            BillBoardService.DeserializeXMLToAdvertsForGlobalAsax("temp", "AdvertsKisiselUrunler.xml", 20, "Kişisel Ürünler");

            BillBoardService.DeserializeXMLToAdvertsForGlobalAsax("temp", "AdvertsVasita.xml", 20, "Vasıta");

            CampaignService.DeserializeXMLToCampsLightForGloalAsax("temp", "Campaigns.xml", 100);

            NewsService.DeserializeXMLToNewsLightForGlobalAsax("temp", "News.xml", 50);

            BannerService.DeserializeXMLToBannersLightForGlobalAsax("temp", "Banners.xml", 5);

            WeatherStatusService.DeserializeXMLToWeathersForGlobalAsax("temp", "WeatherStatuses.xml");
        }
Пример #9
0
        public ActionResult OnCreate(BannerModels banner)
        {
            if (ModelState.IsValid)
            {
                banner.ImageUrl = banner.Image != null?
                                  banner.Image.Upload() :
                                      banner.ImageUrl;

                var newBanner = banner.CloneTo <Banner>(new[] {
                    nameof(banner.Image),
                    nameof(banner.StartDate),
                    nameof(banner.EndDate)
                });
                newBanner.StartDate = banner.StartDate;
                newBanner.EndDate   = banner.EndDate;
                var result = BannerService.Insert(newBanner);
                if (result == Result.Exists)
                {
                    ModelState.AddModelError("", $"Banner '{banner.Name}' đã tồn tại trên hệ thống.");
                    ViewBag.ListPosition = DataHelper.ListEnumType <PositionEnum>();
                    return(View("Create", banner));
                }
                SetFlashMessage($"Thêm banner '{banner.Name}' thành công.");
                if (banner.SaveList)
                {
                    return(RedirectToAction("Index"));
                }
                ModelState.Clear();
                ViewBag.ListPosition = DataHelper.ListEnumType <PositionEnum>();
                return(View("Create", banner.ResetValue()));
            }
            ViewBag.ListPosition = DataHelper.ListEnumType <PositionEnum>();
            return(View("Create", banner));
        }
Пример #10
0
 public BannerController(BannerService BannerService, IConfiguration configuration, MerchantBannerService MerchantBannerService, MerchantService MerchantService)
 {
     _BannerService         = BannerService;
     _configuration         = configuration;
     _MerchantBannerService = MerchantBannerService;
     _MerchantService       = MerchantService;
 }
Пример #11
0
        public void RemoveBannerService()
        {
            var uow = new UnitOfWork(new DigitalSignageDbContext("DigitalSignageTest"));

            BannerService cS = new BannerService();

            Banner Banner = new Banner();

            Banner.Name        = "nueva campaña";
            Banner.Description = "qsy";
            Banner.InitDate    = new DateTime().AddYears(2018);
            Banner.EndDate     = new DateTime().AddYears(2018);
            Banner.InitTime    = new TimeSpan();
            Banner.EndTime     = new TimeSpan();

            uow.BannerRepository.Add(Banner);
            uow.Complete();

            var BannerDTO = new BannerDTO();

            AutoMapper.Mapper.Map(Banner, BannerDTO);

            try
            {
                cS.Remove(BannerDTO);
            }
            catch (Exception e)
            {
                Assert.Fail(e.Message);
            }
        }
Пример #12
0
 public async Task DeleteBanner(Guid bannerId)
 {
     using (IDAL.IBannerService Svc = new BannerService())
     {
         await Svc.RemoveAsync(bannerId);
     }
 }
Пример #13
0
        // GET: Home
        public ActionResult Index()
        {
            HomeViewModel homeViewModel = new HomeViewModel();

            homeViewModel.NoticeNum = NoticeService.GetCount(n => true);
            homeViewModel.Banners   = BannerService.GetEntities(b => true);
            homeViewModel.Notices   = NoticeService.GetEntitiesByPpage(3, 1, false, n => true, n => n.ModiTime);

            homeViewModel.Prod1 = ProductService.GetEntitiesByPpage(3, 1, false, n => n.Type == 1, n => n.CreateTime);
            homeViewModel.Prod2 = ProductService.GetEntitiesByPpage(3, 1, false, n => n.Type == 2, n => n.CreateTime);
            homeViewModel.Prod3 = ProductService.GetEntitiesByPpage(3, 1, false, n => n.Type == 3, n => n.CreateTime);

            homeViewModel.user = Session["userinfo"] as OAuthUserInfo;
            //homeViewModel.caresum= ShopCartService.GetCount(n => n.CusId == 1);
            //Session["cartNum"] = homeViewModel.caresum;

            //homeViewModel.tid = i;
            //addCus(homeViewModel.user);
            Session["openid"] = "oWY-Owxt2VJAiHNj23fdowUP0olE";
            var cus = CustomerService.GetEntity(n => n.OpenId == Session["openid"].ToString());

            //cus.Phone = "";
            //CustomerService.Add(cus);
            Session["cusId"] = cus.ID;
            Session["tel"]   = cus.Phone;
            return(View(homeViewModel));
        }
Пример #14
0
        public ActionResult OnEdit(BannerModels banner)
        {
            if (ModelState.IsValid)
            {
                banner.ImageUrl = banner.Image != null?
                                  banner.Image.Upload() :
                                      banner.ImageUrl.ToImageOriginalPath();

                var bannerUpdate = banner.CloneTo <Banner>(new[] {
                    nameof(banner.Image),
                    nameof(banner.StartDate),
                    nameof(banner.EndDate)
                });
                bannerUpdate.StartDate = banner.StartDate;
                bannerUpdate.EndDate   = banner.EndDate;
                var result = BannerService.Update(bannerUpdate);
                if (result == Result.NotExists)
                {
                    ModelState.AddModelError("", "Banner không tồn tại trên hệ thống.");
                    ViewBag.ListPosition = DataHelper.ListEnumType <PositionEnum>();
                    return(View("Edit", banner));
                }
                SetFlashMessage($"Cập nhật Banner '{banner.Name}' thành công.");
                if (banner.SaveList)
                {
                    return(RedirectToAction("Index"));
                }
                ViewBag.ListPosition = DataHelper.ListEnumType <PositionEnum>();
                return(View("Edit", banner));
            }
            ViewBag.ListPosition = DataHelper.ListEnumType <PositionEnum>();
            return(View("Edit", banner));
        }
Пример #15
0
        public JsonResult Upload()
        {
            for (int i = 0; i < Request.Files.Count; i++)
            {
                HttpPostedFileBase file      = Request.Files[i]; //Uploaded file
                int              fileSize    = file.ContentLength;
                string           fileName    = file.FileName;
                string           mimeType    = file.ContentType;
                System.IO.Stream fileContent = file.InputStream;
                //To save file, use SaveAs method
                file.SaveAs(Server.MapPath("~/Images/Banners/") + fileName);
                int order = 0;

                var allBanners = BannerService.GetAllBanners();
                if (allBanners != null && allBanners.Any())
                {
                    order = allBanners.Count;
                }

                BannerService.AddBanner(new Banner
                {
                    FileName  = fileName,
                    ShowOrder = order + 1,
                    Status    = false
                });
            }
            return(Json("Uploaded " + Request.Files.Count + " files"));
        }
Пример #16
0
 public BannersController(IServiceProvider services)
 {
     _appService    = services.GetRequiredService <AppService>();
     _bannerService = services.GetRequiredService <BannerService>();
     _mediaService  = services.GetRequiredService <MediaService>();
     _appSettings   = services.GetRequiredService <IOptions <AppSettings> >().Value;
 }
Пример #17
0
        public JsonResult DeleteBanner(BannerModel obj)
        {
            var baseUrl = Server.MapPath("~/Images/Banners/") + obj.FileName;

            System.IO.File.Delete(baseUrl);
            BannerService.DeleteBanner(obj.Id);
            return(Json(true, JsonRequestBehavior.AllowGet));
        }
Пример #18
0
        public ActionResult Editar(int id)
        {
            var cat = new BannerService().GetById(id);
            ViewBag.TipoBanner = GetTypeBannerSelectListItem(new BannerService().GetTypeBannerSelectListItem(), null);
            ViewBag.Idiomas = new IdiomaService().GetAll();

            return View(cat);
        }
Пример #19
0
        public ActionResult OnChangeStatus(int id)
        {
            var result = BannerService.ChangeStatus(id);

            SetFlashMessage(result == Result.Ok ?
                            "Thay đổi trạng thái banner thành công." :
                            "Banner không tồn tại trên hệ thống.");
            return(RedirectToAction("Index"));
        }
Пример #20
0
        public ActionResult Listagem(int? page, DateTime? DataInclusao, DateTime? DataExpiracao)
        {
            page = page ?? 1;

            var Banner = new BannerService().GetByPage(page.Value, DataInclusao, DataExpiracao);

            var list = new MvcList<Banner>(Banner.Item1, page.Value, Banner.Item2, Settings.QuantityRegistersPerPage);
            return PartialView(list);
        }
Пример #21
0
        public ActionResult OnDelete(int id)
        {
            var result = BannerService.Delete(id);

            SetFlashMessage(result == Result.Ok ?
                            "Xóa banner thành công." :
                            "Banner không tồn tại trên hệ thống.");
            return(RedirectToAction("Index"));
        }
Пример #22
0
 public ActionResult DelBanner(int id)
 {
     if (BannerService.DeleteEntity(id))
     {
         SaveSyslog($"删除广告图(id={id})成功", SysLogType.后台日志, nowManager.name);
         return(Json(SysEnum.成功, "删除成功"));
     }
     return(Json(SysEnum.失败, "删除失败"));
 }
Пример #23
0
 /// <summary>
 /// Default constructor. Has services passed in through dependency injection
 /// </summary>
 /// <param name="userManager">The user manager for IdentityUsers</param>
 /// <param name="roleManager">The role manager for IdentityRoles</param>
 public AccountController(DbService dbService,
                          IdentityService identityService,
                          BannerService bannerService,
                          ListingService listingService)
 {
     _dbService       = dbService;
     _identityService = identityService;
     _bannerService   = bannerService;
     _listingService  = listingService;
 }
Пример #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string htmlBannerItem             = "<div data-index=\"0\" style=\"width: 656.656px; left: 0px; transition-duration: 0ms; transform: translate(0px, 0px) translateZ(0px);\"><a href=\"{0}\" target=\"_blank\"><img src=\"{1}\" width=\"0\" height=\"0\" border=\"0\" alt=\"\" /></a></div>";
            List <BannerModel.Banner> banners = BannerService.QueryLatestBanners();

            foreach (var item in banners)
            {
                ltrMain.Text += string.Format(htmlBannerItem, item.RedirectPage, BannerService.GetImageUrl(item.ImageUrl));
            }
        }
Пример #25
0
 // GET: Home
 public ActionResult Index()
 {
     Session["Custid"]         = 1;
     homeviewmodel.Banners     = BannerService.GetEntities(b => true);
     homeviewmodel.NoticeNum   = NoticeService.GetCount(b => true);
     homeviewmodel.Notice      = NoticeService.GetEntitiesByPage(3, 1, false, n => true, n => n.ModiTime);
     homeviewmodel.NewProduct  = ProductService.GetEntitiesByPage(5, 1, false, n => n.Type == 1 && n.Grounding == true, n => n.ModiTime);
     homeviewmodel.ShoppingNum = ShoppingCartService.GetCount(s => s.CusId == (int)Session["Custid"]);
     return(View(homeviewmodel));
 }
Пример #26
0
        public static int GetMaxID()
        {
            int     result = 0;
            DataSet ds     = new BannerService().BannerGetMaxID();

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                result = int.Parse(ds.Tables[0].Rows[0][0].ToString() == "" ? "0" : ds.Tables[0].Rows[0][0].ToString());
            }
            return(result);
        }
 /// <summary>
 /// 首页显示
 /// </summary>
 /// <param name="proid"></param>
 /// <returns></returns>
 public ActionResult Index(int proid = 1)
 {
     homeViewModel.NoticeNum = NoticeService.GetCount(n => true);                                                    //公告个数
     homeViewModel.Banners   = BannerService.GetEntities(b => true);                                                 //banner
     homeViewModel.Notices   = NoticeService.GetEntitiesByPage(3, 1, false, m => true, m => m.ModiTime);             //公告
     homeViewModel.Products  = ProductService.GetEntitiesByPage(3, 1, false, p => p.Type == proid, p => p.Moditime); //商品
     homeViewModel.Proid     = proid;                                                                                //热销,推荐,限时
     //addCus(Session["userinfo"] as OAuthUserInfo);//授权登陆
     Session["usid"] = 2;
     return(View(homeViewModel));
 }
Пример #28
0
        public ActionResult Index()
        {
            HomeViewModel homeViewModel = new HomeViewModel();

            homeViewModel.NoticeNum = NoticeService.GetCount(n => true);
            homeViewModel.Notices   = NoticeService.GetEntitiesByPage(3, 1, false, n => true, n => n.ModiTime);
            homeViewModel.Banners   = BannerService.GetEntities(b => true);
            homeViewModel.Products  = ProductService.GetEntitiesByPage(3, 1, false, p => p.Type == 1, p => p.ModiTime);

            return(View(homeViewModel));
        }
        public async Task GetBannersAsync_WhenCalled_ReturnsAllBanners()
        {
            // Arrange
            var sut = new BannerService(dbContext);

            // Act
            var result = await sut.GetBannersAsync();

            // Assert
            Assert.Equal(banners.Count, result.Count());
        }
Пример #30
0
        public ActionResult Banner()
        {
            var url     = CommonConst.SiteRoot + Request.Url.AbsolutePath;
            var banners = BannerService.GetBanner(url).ShufflePriority(x => x.Priority);

            if (!banners.Any())
            {
                return(null);
            }
            return(Content(SiteHtmls.Banners(banners)));
        }
        public void Return_NULL_If_No_Bnaer()
        {
            var options = DatabaseOrganisation.GetOptions(nameof(Return_NULL_If_No_Bnaer));

            using (var arrangeContext = new ApplicationDbContext(options))
            {
                var sut    = new BannerService(arrangeContext, null, null);
                var result = sut.GetBanner();
                Assert.AreEqual(result, null);
            }
        }
Пример #32
0
        public ActionResult hot()
        {
            //1:查询Banner,从数据库中查询
            var BannerResult = BannerService.GetEntities(x => true);

            ViewBag.Banner = BannerResult.ToList();
            //查询最热  根据产品中的销量
            var Productresult = ProductService.GetEntities(x => true).OrderByDescending(x => x.sales).Take(3);

            ViewBag.Product = Productresult.ToList();
            return(View());
        }
        public async Task GetBannerAsync_WhenCalledWithInvalidId_ReturnsNull()
        {
            // Arrange
            int bannerId = 4;
            var sut      = new BannerService(dbContext);

            // Act
            var result = await sut.GetBannerAsync(bannerId);

            // Assert
            Assert.Null(result);
        }
Пример #34
0
        public ActionResult EnviarBanner(Int32? id, String errorMessage, String fileName, String hdnIndexImagePath)
        {
            // Primeiro deve ser verificado se houve erros ou alertas
            if (!String.IsNullOrWhiteSpace(errorMessage))
            {
                var jsonResult = ((JsonRequestResult)new JavaScriptSerializer().Deserialize(errorMessage, typeof(JsonRequestResult)));
                if (jsonResult.Message != null)
                {
                    ViewBag.ErrorMessage = errorMessage;
                }
            }
            // Pegar o Nome da Imagem enviada e Grava no ViewBag
            if (!String.IsNullOrWhiteSpace(fileName))
            {
                ViewBag.TempFile = fileName;
                ViewBag.HdnIndexImagePath = hdnIndexImagePath;
                ViewBag.Nome = fileName;
            }

            if (id != null && id != 0) // Update
            {
                var tempObj = new BannerService().GetBannerIdioma(id.Value);
                if (tempObj != null)
                {
                    ViewBag.TempFile = tempObj.CaminhoImagem;
                    ViewBag.HdnIndexImagePath = hdnIndexImagePath;
                    ViewBag.Nome = tempObj.NomeBanner;
                    return View(tempObj);
                }
            }
            return View();
        }
Пример #35
0
        public ActionResult EnviarBanner(Int32 idBannerIdioma, String tempFile, String hdnIndexImagePath)
        {
            var jsonResult = new JsonRequestResult();
            try
            {
                // Verifica os Diretorios
                VerifyDirectories(TipoArquivo.Imagem);

                // Verifica se foi postado alguma coisa
                if (Request.Files.Count > 0)
                {
                    foreach (String file in Request.Files)
                    {
                        var postedFile = Request.Files[file];
                        if (postedFile != null && postedFile.ContentLength > 0)
                        {
                            // Verifica a extensão
                            if (!HasExtension(TipoArquivo.Imagem, postedFile.FileName))
                            {
                                jsonResult.Message = String.Format(Constants._msgUnauthorizedExtension, Path.GetExtension(postedFile.FileName), Settings.ImgAllowedExtensions);
                                jsonResult.ResultType = JsonRequestResultType.Alert;
                            }

                            // Verifica o Tamanho do Arquivo
                            if (!VerifyFileSize(postedFile.ContentLength))
                            {
                                jsonResult.Message = String.Format(Constants._msgFileSizeExceeded, Settings.MaxFileSize);
                                jsonResult.ResultType = JsonRequestResultType.Alert;
                            }

                            // Arquivo temporário
                            tempFile = Path.GetFileName(String.Format("imgBanner{0}{1}", Path.GetFileNameWithoutExtension(postedFile.FileName), Path.GetExtension(postedFile.FileName)));
                            var completePathFromServer = Path.Combine(Server.MapPath(Settings.UrlGalleryBanners), tempFile);

                            // Verificar se existe arquivo com mesmo Nome e o elimina
                            if (System.IO.File.Exists(completePathFromServer))
                            {
                                System.IO.File.Delete(completePathFromServer);
                            }

                            // Salva o arquivo no Disco do Servidor
                            postedFile.SaveAs(completePathFromServer);

                            // Atualiza Objeto
                            if (idBannerIdioma != 0)
                            {
                                var tempObj = new BannerService().GetBannerIdioma(idBannerIdioma);
                                tempObj.CaminhoImagem = tempFile;
                                new BannerService().UpdateBannerIdioma(tempObj);
                            }
                        }
                        else
                        {
                            jsonResult.Message = Constants._msgFileNotFound;
                            jsonResult.ResultType = JsonRequestResultType.Alert;
                        }
                    }
                }
                else
                {
                    jsonResult.Message = Constants._msgFileNotFound;
                    jsonResult.ResultType = JsonRequestResultType.Alert;
                }
            }
            catch (Exception ex)
            {
                LogService.Log("UploadController.EnviarBanner()", ex);

                jsonResult.Message = Constants._msgError;
                jsonResult.Description = CustomException.GetInnerException(ex).Message;
                jsonResult.ResultType = JsonRequestResultType.Error;
            }

            // Serializará o JsonResult para ser exibido em um Alert do sistema
            var dict = new JavaScriptSerializer().Serialize(jsonResult);
            return RedirectToAction("EnviarBanner",
                                    new RouteValueDictionary(
                                        new
                                        {
                                            controller = "Upload",
                                            action = "EnviarBanner",
                                            id = idBannerIdioma,
                                            hdnIndexImagePath = hdnIndexImagePath,
                                            errorMessage = dict,
                                            fileName = tempFile
                                        }));

        }