Example #1
0
        public ActionResult Index()
        {
           KeyIssueService keyissueService = new KeyIssueService(DBContext);
            ViewBag.FeaturedVideo = keyissueService.GetHomeFeaturedVideo(CultureHelper.GetCurrentCulture().Contains("ar") ? "ar" : "en");

            bool isarabic = CultureHelper.GetCurrentCulture().Contains("ar");
            if(isarabic)
            {
                SectionVariable whitepaper = DBContext.SectionVariables.Where(v => v.Key == "WhitePaperPDFAr").FirstOrDefault();
                ViewBag.whitePaper = whitepaper == null ? "" : whitepaper.Value;
            }
            else
            {
                SectionVariable whitepaper = DBContext.SectionVariables.Where(v => v.Key == "WhitePaperPDF").FirstOrDefault();
                ViewBag.whitePaper = whitepaper == null ? "" : whitepaper.Value;
            }

            CampaignService campaignService = new CampaignService(DBContext);
            Campaign camp = campaignService.GetCampaign();
            if(camp != null && camp.IsOnline)
            {
                ViewBag.campaign = camp;
            }

            return View();
        }
Example #2
0
        public NewsController()
        {
            keyIssueService = new KeyIssueService(DBContext);

        }
 public AdminNewsController()
 {
     keyIssueService = new KeyIssueService(DBContext);
     variabeService = new SectionVariableService(DBContext);
 }
        public AdminKeyIssueController()
        {
            keyIssueService = new KeyIssueService(DBContext);

        }