public ActionResult Index()
        {
            //if (User.IsInRole("DeptAdmin"))
            //{
            //    return RedirectToAction("Dashboard", "Home");
            //}
            //else if(User.IsInRole("SchoolAdmin"))
            //{
            //    return RedirectToAction("Dashboard", "CitizenHome", new { Area = "Dept" });
            //}
            //else
            //{
            //    return RedirectToAction("index", "home", new { Area = "" });
            //}
            GenCustomModel model = new GenCustomModel();

            ViewBag.Banner        = ObjBanner.GetBanners();
            ViewBag.ImageAlbum    = ObjImageAlbum.GenImageAlbumlist();
            model.GenImages       = ObjImageAlbum.GenImageAlbumlist();
            model.GenVideos       = ObjVideoAlbum.GenVideoAlbumlist();
            model.GenTestimonials = ObjTestimonial.GenTestimonialslist();
            model.GenCaseStudies  = ObjCaseStudy.GenCaseStudylist();
            model.GenContentCount = ObjGen.GenContenCount();
            //model.GenComponent = ObjComp.GetComponentList("");
            model.GenComponentModelList = ObjComp.GetGenComponentList();//New List
            return(View(model));
        }
Пример #2
0
        // GET: District
        public ActionResult Index(string DistCode)
        {
            GenCustomModel model = new GenCustomModel();

            model.District             = ObjDist.GetDistByCode(DistCode);
            model.GenImgAlbumByDist    = ObjImageAlbum.GetImageAlbumByDist(DistCode).Take(5);
            model.GenVidAlbumByDist    = ObjVideoAlbum.GetVideoAlbumByDist(DistCode).Take(5);
            model.GenTestimonialByDist = ObjTestimonial.GetTestimonialsByDist(DistCode).Take(3);
            model.GenCaseStudyByDist   = ObjCaseStudy.GetCaseStudyByDist(DistCode).Take(3);
            model.GenComponent         = ObjComp.GetComponentList("");
            return(View(model));
        }
        public ActionResult GetContentBySubComp(long CID = 0, long SCID = 0, int PageNo = 1, int PageSize = 5, string searchTerm = "")
        {
            GenCustomModel model = new GenCustomModel();

            model.GenImageAlbumList  = ObjImageAlbum.GenImageAlbumSelectPaged(SCID, PageNo, PageSize, searchTerm);
            model.GenVideoAlbumList  = ObjVideoAlbum.GenVideoAlbumSelectPaged(SCID, PageNo, PageSize, searchTerm);
            model.GenTestimonialList = ObjTestimonial.GenTestimonialSelectPaged(SCID, PageNo, PageSize, searchTerm);
            model.GenCaseStudyList   = ObjCaseStudy.GenCaseStudySelectPaged(SCID, PageNo, PageSize, searchTerm);
            model.Component          = ObjComp.GetComponentByID(CID);
            model.SubComponent       = ObjSubComp.GetSubComponentByID(SCID);
            model.GenComponent       = ObjComp.GetComponentList("");
            return(View(model));
        }