//[ChildActionOnly]
        //[OutputCache(Duration = 3600 * 24)]
        public ActionResult Footer()
        {
            var model = new FooterService().GetFooter();

            ViewBag.TypeFooter = TypeFooterService.getAll();
            ViewBag.tages      = TagesService.getAll();
            return(PartialView(model));
        }
Exemple #2
0
 public EditInfosController()
 {
     context.Database.CreateIfNotExists();
     PersonService     = new PersonService(new Data.Repository.PersonRepository(context));
     HeroBannerService = new HeroBannerService(new Data.Repository.HeroBannerRepository(context));
     GroomBrideService = new GroomBrideService(new Data.Repository.GroomBrideRepository(context));
     FooterService     = new FooterService(new Data.Repository.FooterRepository(context));
     CoupleService     = new CoupleService(new Data.Repository.CoupleRepository(context));
 }
        public IActionResult getApoios()
        {
            try
            {
                FooterService footerService = new FooterService(this._context);
                footerService.GetApoios();

                return(Ok(footerService.apoios));
            }
            catch (AppException ex)
            {
                return(BadRequest(new { message = ex.Message }));
            }
        }
Exemple #4
0
 public HttpResponseMessage Update(HttpRequestMessage request, FooterModel FooterModel)
 {
     return(CreateHttpResponse(request, () =>
     {
         HttpResponseMessage response = null;
         if (!ModelState.IsValid)
         {
             request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
         }
         else
         {
             var FooterService = new FooterService();
             FooterService.Update(FooterModel);
             response = request.CreateResponse(HttpStatusCode.OK);
         }
         return response;
     }));
 }
Exemple #5
0
 public HttpResponseMessage DeleteMulti(HttpRequestMessage request, byte[] id)
 {
     return(CreateHttpResponse(request, () =>
     {
         HttpResponseMessage response = null;
         if (!ModelState.IsValid)
         {
             response = request.CreateResponse(HttpStatusCode.BadRequest, ModelState);
         }
         else
         {
             var FooterService = new FooterService();
             FooterService.DeleteAll(id);
             response = request.CreateResponse(HttpStatusCode.OK);
         }
         return response;
     }));
 }
        public IComponent GetComponent(IPublishedContent componentContent, IPublishedContent pageContent)
        {
            var documentTypeAlias = componentContent.DocumentTypeAlias;

            switch (documentTypeAlias)
            {
            case DocumentTypeAliases.Banner:
                var bannerService = new BannerService();
                return(bannerService.GetViewModel(componentContent));

            case DocumentTypeAliases.InformationWithoutBackground:
                var informationWithoutBackgroundService = new InformationWithoutBackgroundService();
                return(informationWithoutBackgroundService.GetViewModel(componentContent));

            case DocumentTypeAliases.InformationWithoutBackgroundVertical:
                var informationWithBackgroundVerticalService = new InformationWithoutBackgroundVerticalService();
                return(informationWithBackgroundVerticalService.GetViewModel(componentContent));

            case DocumentTypeAliases.InformationWithBackground:
                var informationWithBackgroundService = new InformationWithBackgroundService();
                return(informationWithBackgroundService.GetViewModel(componentContent));

            case DocumentTypeAliases.ContactForm:
                var contactFormService = new ContactFormService();
                return(contactFormService.GetViewModel(componentContent));

            case DocumentTypeAliases.ContactDetails:
                var contactDetailsService = new ContactDetailsService();
                return(contactDetailsService.GetViewModel(componentContent));

            case DocumentTypeAliases.Footer:
                var footerService = new FooterService();
                return(footerService.GetViewModel(componentContent));
            }

            return(null);
        }
Exemple #7
0
 public FooterController()
 {
     service = new FooterService(new Data.Repository.FooterRepository(context));
 }
Exemple #8
0
 public Footer(FooterService FooterRepository)
 {
     _FooterRepository = FooterRepository;
 }
Exemple #9
0
 public void Footer(FooterModel model)
 {
     FooterService.Save(model);
 }
Exemple #10
0
 public FooterController(FooterService FooterService)
 {
     _FooterRepository = FooterService;
 }