Exemple #1
0
        public IActionResult Index()
        {
            try
            {
                List <Volcontract>         volcontracts         = volContractManager.GetListOfVolunteersContracts();
                List <Beneficiarycontract> beneficiarycontracts = beneficiaryContractManager.GetListOfBeneficiariesContracts();
                List <Volunteer>           volunteers           = volunteerManager.GetListOfVolunteers();
                List <Sponsor>             sponsors             = sponsorManager.GetListOfSponsors();
                Settings appsettings = settingsManager.GetSettingsItem();
                TempData[VolMongoConstants.CONNECTION_LANGUAGE]      = appsettings.Lang;
                TempData[VolMongoConstants.NUMBER_OF_ITEMS_PER_PAGE] = appsettings.Quantity;

                ViewBag.nrofbds = UniversalFunctions.GetNumberOfVolunteersWithBirthdays(volunteers);
                ViewBag.nrofvc  = UniversalFunctions.GetNumberOfExpiringVolContracts(volcontracts);
                ViewBag.nrofsc  = UniversalFunctions.GetNumberOfExpiringSponsorContracts(sponsors);
                ViewBag.nrofbc  = UniversalFunctions.GetNumberOfExpiringBeneficiaryContracts(beneficiarycontracts);

                return(View());
            }
            catch
            {
                return(RedirectToAction("Localserver", "Home"));
            }
        }