public ActionResult Index()
        {
            HomeViewModel   homeView   = new HomeViewModel();
            ViewBannerModel viewBanner = _bannerDao.GetViewBanner();
            IList <Events>  events     = _EventsDao.Get(1, 10);

            if (viewBanner != null && viewBanner.HomeBanner != null && viewBanner.HomeBanner.Count > 0)
            {
                homeView.HomeBanners = viewBanner.HomeBanner;
            }
            if (events != null && events.Count > 0)
            {
                homeView.Events = events.Take(3).ToList();
            }
            TownMapPDF town = _ourTownDao.GetTownMapPDF();

            if (town != null && !string.IsNullOrEmpty(town.PDFFileGUID))
            {
                homeView.mapPDF = town;
            }
            List <OurMps> OurMps = _aboutUsDao.Get();

            if (OurMps != null && OurMps.Count > 0)
            {
                homeView.Mps = OurMps;
            }


            return(View(homeView));
        }
        public ActionResult WhistleBlowingPolicy()
        {
            if (TempData["data"] != null)
            {
                ViewBag.DataBaseStatus = "Changes Updated";
            }
            TownMapPDF town = _contactUsDao.GetWhistleBlowingPolicyPDF();

            return(View(town));
        }
Exemplo n.º 3
0
        public ActionResult TownMap()
        {
            if (TempData["data"] != null)
            {
                ViewBag.DataBaseStatus = "Changes Updated";
            }
            TownMapPDF town = _ourTownDao.GetTownMapPDF();

            return(View(town));
        }
Exemplo n.º 4
0
        // GET: Admin/MasterPlan
        public ActionResult Index()
        {
            if (TempData["data"] != null)
            {
                ViewBag.DataBaseStatus = "Changes Updated";
            }
            TownMapPDF town = _aboutUsDao.GetMasterPlanPDF();

            return(View(town));
        }
        public ActionResult OrganisationChart()
        {
            if (TempData["data"] != null)
            {
                ViewBag.DataBaseStatus = "Changes Updated";
            }
            TownMapPDF town = _aboutUsDao.GetOrganisationChartPDF();

            return(View(town));
        }
        public PartialViewResult Header()
        {
            HeaderModel model = new HeaderModel();

            TownMapPDF town = _ourTownDao.GetTownMapPDF();

            if (town != null && !string.IsNullOrEmpty(town.PDFFileGUID))
            {
                model.MapPDF = town;
            }
            TownMapPDF OrganisationChartPDF = _aboutUsDao.GetOrganisationChartPDF();

            if (OrganisationChartPDF != null && !string.IsNullOrEmpty(OrganisationChartPDF.PDFFileGUID))
            {
                model.OrganisationChartPDF = OrganisationChartPDF;
            }

            TownMapPDF MasterPlanPDF = _aboutUsDao.GetMasterPlanPDF();

            if (MasterPlanPDF != null && !string.IsNullOrEmpty(MasterPlanPDF.PDFFileGUID))
            {
                model.MasterPlanPDF = MasterPlanPDF;
            }

            TownMapPDF GetPDPAPDF = _contactsDao.GetPDPAPDF();

            if (GetPDPAPDF != null && !string.IsNullOrEmpty(GetPDPAPDF.PDFFileGUID))
            {
                model.PDPAPDF = GetPDPAPDF;
            }

            TownMapPDF WhistleBlowingPolicyPDF = _contactsDao.GetWhistleBlowingPolicyPDF();

            if (WhistleBlowingPolicyPDF != null && !string.IsNullOrEmpty(WhistleBlowingPolicyPDF.PDFFileGUID))
            {
                model.WhistleBlowingPolicyPDF = WhistleBlowingPolicyPDF;
            }
            // initialize a model
            return(PartialView("_Header", model));
        }
        public ActionResult WhistleBlowingPolicy(TownMapPDF T)
        {
            if (T.PDFFile != null && T.PDFFile.ContentLength > 0)
            {
                T.PDFFileExtension = Path.GetExtension(T.PDFFile.FileName).Trim('.');
                T.PDFFileName      = Path.GetFileNameWithoutExtension(T.PDFFile.FileName);
                T.PDFFileGUID      = Guid.NewGuid().ToString("N");
                string ThumbnailImagelocation = Server.MapPath("~/Resources/Documents/OurTown/" + T.PDFFileGUID + "." + T.PDFFileExtension);
                T.PDFFile.SaveAs(ThumbnailImagelocation);
            }
            T.UserId   = ((UserAccount)Session["UserAccount"]).GUID;
            T.SystemIp = GetRemoteIp.GetIPAddress(HttpContext);

            Int64 Id = _contactUsDao.SaveWhistleBlowingPolicyPDF(T);

            if (Id > 0)
            {
                TempData["data"] = "Success";
                return(RedirectToAction("WhistleBlowingPolicy"));
            }
            return(View());
        }