Exemple #1
0
        protected void _submitButton_Click(object sender, EventArgs e)
        {
            ITestimonialRepository testimonialRepository = new TestimonialRepository();
            var testimonial = new Testimonial
            {
                CustomerId      = CustomerId,
                IsAccepted      = null,
                Rank            = null,
                ReviewedBy      = null,
                ReviewedOn      = null,
                TestimonialText = _testimonialText.Text
            };

            testimonial = testimonialRepository.SaveTestimonial(testimonial);

            _divMessage.Style.Add(HtmlTextWriterStyle.Display, "block");
            if (testimonial.Id > 0)
            {
                _messageControl.ShowSuccessMessage("Testimonial submitted successfully for review.");
                _testimonialText.Text = string.Empty;
            }
            else
            {
                _messageControl.ShowErrorMessage("Testimonial has not been submitted, Please try again.");
            }
        }
 public TestimonialServiceImpl(TestimonialRepository testimonialRepo, IHostingEnvironment hostingEnvironment, TransactionManager transactionManager, TestimonialMaker testimonialMaker)
 {
     _testimonialRepo    = testimonialRepo;
     _hostingEnvironment = hostingEnvironment;
     _transactionManager = transactionManager;
     _testimonialMaker   = testimonialMaker;
 }
 public TestimonialController(IMapper mapper, TestimonialRepository testimonialRepo, TestimonialService testimonialService, FileHelper fileHelper, PaginatedMetaService paginatedMetaService)
 {
     _mapper               = mapper;
     _testimonialRepo      = testimonialRepo;
     _testimonialService   = testimonialService;
     _fileHelper           = fileHelper;
     _paginatedMetaService = paginatedMetaService;
 }
Exemple #4
0
 public EventController(EventRepository eventRepo, NoticeRepository noticeRepo, PaginatedMetaService paginatedMetaService, SetupRepository setupRepo, CareerRepository careerRepo, TestimonialRepository testimonialRepo)
 {
     _eventRepo            = eventRepo;
     _noticeRepo           = noticeRepo;
     _paginatedMetaService = paginatedMetaService;
     _setupRepo            = setupRepo;
     _careerRepo           = careerRepo;
     _testimonialRepo      = testimonialRepo;
 }
Exemple #5
0
        private void CreateRepos()
        {
            mEntities  = new V308CMSEntities();
            ImageRepos = new ImagesRepository(mEntities);

            ProductRepos = new ProductRepository(mEntities);
            AccountRepos = new AccountRepository(mEntities);
            NewsRepos    = new NewsRepository(mEntities);
            CommentRepo  = new TestimonialRepository(mEntities);
            CategoryRepo = new CategoryRepository(mEntities);
        }
Exemple #6
0
        protected void _uploadVedioButton_Click(object sender, EventArgs e)
        {
            ITestimonialRepository testimonialRepository = new TestimonialRepository();

            var testimonial = new Testimonial
            {
                CustomerId      = CustomerId,
                IsAccepted      = null,
                Rank            = null,
                ReviewedBy      = null,
                ReviewedOn      = null,
                TestimonialText = string.Empty
            };

            // upload vedio
            string savePathPhysical = _physicalPath + "Testimonial";
            string savePathVirtual  = _virtualPath + "Testimonial";

            if (_uploadVedio.HasFile && _uploadVedio.FileName.Trim().Length > 0)
            {
                if (!Directory.Exists(savePathPhysical))
                {
                    Directory.CreateDirectory(savePathPhysical);
                }

                string fileExtension = new FileInfo(_uploadVedio.FileName).Extension;
                string fileName      = "Testimonial_" + CustomerId + "_" + DateTime.Now.ToFileTimeUtc() + "_" + _uploadVedio.FileName;

                _uploadVedio.SaveAs(savePathPhysical + "\\" + fileName);

                testimonial.TestimonialVideo = new File
                {
                    Path       = savePathVirtual + "/" + fileName,
                    FileSize   = (decimal)_uploadVedio.FileBytes.Length / 1024,
                    Type       = FileType.Video,
                    UploadedBy = GetCreatorOrganizationRoleUser(),
                    UploadedOn = DateTime.Now
                };
            }
            testimonial = testimonialRepository.SaveTestimonial(testimonial);

            _divMessage.Style.Add(HtmlTextWriterStyle.Display, "block");
            if (testimonial.Id > 0)
            {
                _messageControl.ShowSuccessMessage("Testimonial submitted successfully for review.");
            }
            else
            {
                _messageControl.ShowErrorMessage("Testimonial has not been submitted, Please try again.");
            }
        }
Exemple #7
0
 private void CreateRepos()
 {
     mEntities                      = new V308CMSEntities();
     ProductRepos                   = new ProductRepository(mEntities);
     ProductRepos.PageSize          = PageSize;
     ProductHelper.ProductShowLimit = ProductRepos.PageSize;
     AccountRepos                   = new AccountRepository(mEntities);
     NewsRepos                      = new NewsRepository(mEntities);
     CommentRepo                    = new TestimonialRepository(mEntities);
     CategoryRepo                   = new CategoryRepository(mEntities);
     LinkRepo            = new LinkRepository(mEntities);
     BannerRepo          = new BannerRepository(mEntities);
     TicketRepo          = new TicketRepository(mEntities);
     CouponRepo          = new CouponRepository(mEntities);
     CouponRepo.PageSize = PageSize;
 }
 public HomeController(PartnersRepository partnersRepository, MembersRepository membersRepository, GalleryImageRepository galleryRepo, MenuRepository menuRepo, MenuCategoryRepository menuCategoryRepo, NoticeRepository noticeRepo, PageRepository pageRepo, CoursesRepository productRepo, IMapper mapper, SetupRepository setupRepo, EmailSenderService emailSenderService, TestimonialRepository testimonialRepo, BlogRepository blogRepo, EventRepository eventRepo, VideoRepository videoRepository, NewsRepository newsRepository, DoctorsRepository doctorsRepository, ServicesRepository servicesRepository, AppointmentService appointmentService, AppointmentRepository appointmentRepository, AppointmentMaker appointmentMaker)
 {
     _galleryRepo           = galleryRepo;
     _newsRepository        = newsRepository;
     _noticeRepo            = noticeRepo;
     _pageRepo              = pageRepo;
     _productRepo           = productRepo;
     _mapper                = mapper;
     _setupRepo             = setupRepo;
     _testimonialRepo       = testimonialRepo;
     _emailSenderService    = emailSenderService;
     _blogRepo              = blogRepo;
     _eventRepo             = eventRepo;
     _videoRepository       = videoRepository;
     _doctorsRepository     = doctorsRepository;
     _servicesRepository    = servicesRepository;
     _appointmentService    = appointmentService;
     _appointmentRepository = appointmentRepository;
     _appointmentMaker      = appointmentMaker;
     _menuRepo              = menuRepo;
     _menuCategoryRepo      = menuCategoryRepo;
     _membersRepository     = membersRepository;
     _partnersRepository    = partnersRepository;
 }
 public TestimonialsViewComponent(TestimonialRepository testimonialRepo)
 {
     _testimonialRepo = testimonialRepo;
 }
 public TestimonialsController(TestimonialRepository test)
 {
     _repo = test;
 }
 public TestimonialServices(PXHotelEntities entities)
 {
     _localizedResourceServices = HostContainer.GetInstance<ILocalizedResourceServices>();
     _testimonialRepository = new TestimonialRepository(entities);
 }
Exemple #12
0
        public ActionResult Index()
        {
            Homepage homepage = new Homepage();

            homepage.Title = "Fit After Fourty-Five";

            DatabaseConnectionFactory factory    = DatabaseConnectionFactory.Instance;
            IDbConnection             connection = factory.GetConnection("DefaultConnection");

            IRepository <WelcomeModel> repo = new WelcomeRepository(connection);
            WelcomeModel model = repo.Get(1);

            homepage.Welcome          = new WelcomeSection();
            homepage.Welcome.Heading  = model.Title;
            homepage.Welcome.Blurb    = model.Content;
            homepage.Welcome.ImageUrl = model.ImageUrl;

            IRepository <MeetMeModel> repoMeetMe = new MeetMeRepository(connection);
            MeetMeModel meetMe = repoMeetMe.Get(1);

            homepage.MeetMe          = new MeetMeSection();
            homepage.MeetMe.Heading  = meetMe.Title;
            homepage.MeetMe.ImageUrl = meetMe.ImageUrl;
            homepage.MeetMe.Blurb    = meetMe.Content;

            IRepository <ServicesModel> repoServices = new MyServicesRepository(connection);
            ServicesModel services = repoServices.Get(1);

            homepage.MyServices          = new MyServicesSection();
            homepage.MyServices.Heading  = services.Title;
            homepage.MyServices.ImageUrl = services.ImageUrl;
            homepage.MyServices.Blurb    = services.Content;
            List <IHomePageTemplate> listOfServices = new List <IHomePageTemplate>();

            foreach (var svc in services.Services.Services)
            {
                listOfServices.Add(new Models.ViewModel.Service()
                {
                    Heading    = svc.Title,
                    Blurb      = svc.Content,
                    ImageUrl   = svc.ImageUrl,
                    SubHeading = svc.SubTitle
                });
            }
            homepage.MyServices.Services = listOfServices;



            TestimonialRepository tRepo        = new TestimonialRepository(connection);
            TestimonialModel      testimonials = tRepo.Get(1);

            homepage.Testimonials = new MyTestimonialsSection();
            homepage.Testimonials.Testimonials = new List <IHomePageTemplate>();
            homepage.Testimonials.Heading      = "Client Testimonials";
            homepage.Testimonials.Testimonials = new List <IHomePageTemplate>();

            List <IHomePageTemplate> listOfTestimonials = new List <IHomePageTemplate>();

            foreach (var t in testimonials.Testimonials.Testimonials)
            {
                listOfTestimonials.Add(new Models.ViewModel.Testimonal()
                {
                    Heading  = t.Title,
                    Blurb    = t.Content + "<br/><br/>~" + t.Name,
                    ImageUrl = t.ImageUrl
                });
            }
            homepage.Testimonials.Testimonials = listOfTestimonials;

            return(View(homepage));
        }
Exemple #13
0
 public TestimonialServices(PXHotelEntities entities)
 {
     _localizedResourceServices = HostContainer.GetInstance <ILocalizedResourceServices>();
     _testimonialRepository     = new TestimonialRepository(entities);
 }
Exemple #14
0
        private void SaveTestimonial()
        {
            ITestimonialRepository testimonialRepository = new TestimonialRepository();
            Testimonial            testimonial;

            // set testimonial and file id - update
            if (ViewState["TestimonialId"] != null)
            {
                testimonial = testimonialRepository.GetTestimonial(Convert.ToInt64(ViewState["TestimonialId"]));
                testimonial.TestimonialText = _testimonialText.Text;
            }
            else
            {
                testimonial = new Testimonial
                {
                    CustomerId      = CustomerId,
                    IsAccepted      = null,
                    Rank            = null,
                    ReviewedBy      = null,
                    ReviewedOn      = null,
                    TestimonialText = _testimonialText.Text
                };
            }
            // upload vedio
            string savePathPhysical = _physicalPath + "Testimonial";
            string savePathVirtual  = _virtualPath + "Testimonial";

            if (_uploadVedio.HasFile && _uploadVedio.FileName.Trim().Length > 0)
            {
                if (!Directory.Exists(savePathPhysical))
                {
                    Directory.CreateDirectory(savePathPhysical);
                }

                string fileExtension = new FileInfo(_uploadVedio.FileName).Extension;
                string fileName      = "Testimonial_" + CustomerId + "_" + DateTime.Now.ToFileTimeUtc() + "_" + _uploadVedio.FileName;

                _uploadVedio.SaveAs(savePathPhysical + "\\" + fileName);

                if (testimonial.TestimonialVideo != null && testimonial.TestimonialVideo.Id > 0)
                {
                    testimonial.TestimonialVideo = new File(testimonial.TestimonialVideo.Id)
                    {
                        Path       = savePathVirtual + "/" + fileName,
                        FileSize   = (decimal)_uploadVedio.FileBytes.Length / 1024,
                        Type       = FileType.Video,
                        UploadedBy = GetCreatorOrganizationRoleUser(),
                        UploadedOn = DateTime.Now
                    };
                }
                else
                {
                    testimonial.TestimonialVideo = new File
                    {
                        Path       = savePathVirtual + "/" + fileName,
                        FileSize   = (decimal)_uploadVedio.FileBytes.Length / 1024,
                        Type       = FileType.Video,
                        UploadedBy = GetCreatorOrganizationRoleUser(),
                        UploadedOn = DateTime.Now
                    };
                }
            }

            testimonial = testimonialRepository.SaveTestimonial(testimonial);

            _divMessage.Style.Add(HtmlTextWriterStyle.Display, "block");
            if (testimonial.Id > 0)
            {
                ViewState["TestimonialId"] = testimonial.Id;
                _messageControl.ShowSuccessMessage("Testimonial Submitted Successfully for Review.");
            }
            else
            {
                _messageControl.ShowErrorMessage("Testimonial has not been submitted, Please try again.");
                ViewState["TestimonialId"] = null;
            }
        }
 public MemberController(MembersRepository membersRepo, SetupRepository setupRepository, TestimonialRepository testimonialRepository)
 {
     _membersRepo     = membersRepo;
     _setupRepository = setupRepository;
     _testimonialRepo = testimonialRepository;
 }
 public DoctorsController(DoctorsRepository doctorsRepository, SetupRepository setupRepository, TestimonialRepository testimonialRepository)
 {
     _doctorsRepository = doctorsRepository;
     _testimonialRepo   = testimonialRepository;
     _setupRepository   = setupRepository;
 }