Ejemplo n.º 1
0
        public HomePage_VM GetHomage_VM()
        {
            HomePage_VM vm = new HomePage_VM();

            Setting st = new Setting();

            try
            {
                st = SettingRepo.GetList().First();
            }
            catch (Exception ex)
            {
            }
            vm.setting = st;
            List <Cause> CauseList = CauseRepo.GetList();

            vm.FeaturedCauses = CauseList.Where(x => x.Featured == 2).ToList();
            vm.FrontCauses    = CauseList.Where(x => x.Featured == 1).ToList();
            vm.HelpOptions    = HelpOptionRepo.GetList();
            vm.HomePageVideo  = HomePageVideoRepo.GetList();
            vm.Missions       = MissionRepo.GetList();
            vm.WhyUsList      = WhyUsRepo.GetList();

            return(vm);
        }
Ejemplo n.º 2
0
 public AccountController()
 {
     this.UserRepo    = new UserRepository();
     this.SettingRepo = new SettingRepository();
     try
     {
         this.st        = SettingRepo.GetList().First();
         ViewBag.Layout = this.st;
     }
     catch (Exception ex)
     {
         ViewBag.Layout = new Setting();
     }
 }
Ejemplo n.º 3
0
 public BaseController()
 {
     this.SettingRepo = new SettingRepository();
     this.Context     = GlobalHost.ConnectionManager.GetHubContext <Notification>();
     try
     {
         this.st        = SettingRepo.GetList().First();
         ViewBag.Layout = this.st;
     }
     catch (Exception ex)
     {
         ViewBag.Layout = new Setting();
     }
 }