Exemplo n.º 1
0
        //public List<NotificationSubCategory> Calculate_orphansOlderThanFive()

        //{

        //    var orphansOlderThanFive = _orphanRepository.GetOrphansOlderThanFive();


        //    var products = new List<NotificationSubCategory>();
        //    NotificationSubCategory ncc = null;


        //    foreach (var oot in orphansOlderThanFive)
        //    {
        //        ncc = new NotificationSubCategory();
        //        ncc.CategoryID = 1;
        //        ncc.ProductID = 2;
        //        ncc.ProductName = "Orphan ID " + oot.OrphanId + " " + oot.ArFirstName + " " + oot.ArFatherName + " " + oot.ArGrandFather;
        //        products.Add(ncc);
        //    }

        //    return products;
        //}

        //public List<NotificationSubCategory> Calculate_OrphansOlderThan17()

        //{

        //    var orphansOlderThan17 = _orphanRepository.GetOrphansOlderThan17();


        //    var products = new List<NotificationSubCategory>();
        //    NotificationSubCategory ncc = null;


        //    foreach (var oot in orphansOlderThan17)
        //    {
        //        ncc = new NotificationSubCategory();
        //        ncc.CategoryID = 1;
        //        ncc.ProductID = 2;
        //        ncc.ProductName = "Orphan ID " + oot.OrphanId + " " + oot.ArFirstName + " " + oot.ArFatherName + " " + oot.ArGrandFather;//
        //                                                                                                                                 // ncc.ProductName = "@<Text>@Html.ActionLink('Index', 'Index', 'Admin')</Text>";
        //        products.Add(ncc);
        //    }

        //    return products;
        //}

        //public List<NotificationSubCategory> Calculate_Pendding_Sponsors()
        //{


        //    var penddingSponsors = _sponsorRepository.GetActiveUnSponsored();


        //    var products = new List<NotificationSubCategory>();
        //    NotificationSubCategory ncc = null;


        //    foreach (var oot in penddingSponsors)
        //    {
        //        ncc = new NotificationSubCategory();
        //        ncc.CategoryID = 1;
        //        ncc.ProductID = 2;
        //        ncc.ProductName = "Sponsor.ID " + oot.SponsorId + " Name: " + oot.Users.FirstName + " " + oot.Users.LastName;
        //        products.Add(ncc);
        //    }

        //    return products;

        //}

        //public List<NotificationSubCategory> Calculate_SponsorsNeedsOrphans()
        //{

        //    var penddingSponsors = _sponsorRepository.GetSponsoresNeedOrphans();


        //    var products = new List<NotificationSubCategory>();
        //    NotificationSubCategory ncc = null;


        //    foreach (var oot in penddingSponsors)
        //    {
        //        ncc = new NotificationSubCategory();
        //        ncc.CategoryID = 1;
        //        ncc.ProductID = 2;
        //        ncc.ProductName = "Sponsor.ID " + oot.SponsorId + " Name: " + oot.Users.FirstName + " " + oot.Users.LastName;
        //        products.Add(ncc);
        //    }

        //    return products;
        //}



        public async void Statistics()
        {
            ViewData["ActiveSponsorsCount"]       = _SponsorService.GetActiveSponsorsCount();
            ViewData["GetActiveSponsoredCount"]   = _SponsorService.GetActiveSponsoredCount();
            ViewData["GetActiveUnSponsoredCount"] = _SponsorService.GetActiveUnSponsoredCount();


            ViewData["ActiveOrphansCount"]               = _OrphanService.GetActiveOrphansCount();
            ViewData["GetActiveSponsoredOrphansCount"]   = _OrphanService.GetActiveSponsoredOrphansCount();
            ViewData["GetActiveUnSponsoredOrphansCount"] = _OrphanService.GetActiveUnSponsoredOrphansCount();

            ViewData["UnApprovedOrphansCount"] = _OrphanService.GetUnApprovedOrphansCount();

            ViewData["ActiveOrphansOlderThan17Count"] = _OrphanService.ActiveOrphansOlderThan17Count();
            ViewData["ActiveOrphansOlderThan5Count"]  = _OrphanService.ActiveOrphansOlderThan5Count();
        }