Ejemplo n.º 1
0
        public IActionResult Index()
        {
            personBLL = new PersonBLL();
            var modelPerson = personBLL.GetPerson();

            if (modelPerson == null)
            {
                return(NotFound());
            }
            else
            {
                ViewBag.Person = modelPerson;
            }

            //Education
            educationBLL = new EducationBLL();
            var modelEducation = educationBLL.GetCollectionEducation();

            if (modelEducation == null)
            {
                return(NotFound());
            }
            else
            {
                ViewBag.Education = modelEducation;
            }

            //Experience
            experienceBLL = new ExperienceBLL();
            var modelExperience = experienceBLL.GetCollectionExperience();

            if (modelExperience == null)
            {
                return(NotFound());
            }
            else
            {
                ViewBag.Experience = modelExperience;
            }

            //Skill Coding
            skillBLL = new SkillBLL();
            var modelSkillCode = skillBLL.GetCollectionSkillsByType("C");

            if (modelSkillCode == null)
            {
                return(NotFound());
            }
            else
            {
                ViewBag.SkillsCoding = modelSkillCode;
            }

            //Skill Others
            var modelSkillOthers = skillBLL.GetCollectionSkillsByType("O");

            if (modelSkillOthers == null)
            {
                return(NotFound());
            }
            else
            {
                ViewBag.SkillsOthers = modelSkillOthers;
            }

            //Pricing Freelancer Skill
            pricingSkillBLL = new PricingBLL();
            var modelPricing = pricingSkillBLL.GetPricingByType("FL");

            if (modelPricing == null)
            {
                return(NotFound());
            }
            else
            {
                ViewBag.PricingSkillFreelancer = modelPricing;
            }

            //Pricing Freelancer Skills Collection
            var modelPSCollection = pricingSkillBLL.GetCollectionPricingSkill("FL");

            if (modelPSCollection == null)
            {
                return(NotFound());
            }
            else
            {
                ViewBag.PricingSkillCollectionFreelancer = modelPSCollection;
            }

            //Pricing Fulltime Skill
            var modelPricingFullTime = pricingSkillBLL.GetPricingByType("FT");

            if (modelPricingFullTime == null)
            {
                return(NotFound());
            }
            else
            {
                ViewBag.PricingSkillFulltime = modelPricingFullTime;
            }

            //Pricing FullTime Skills Collection
            var modelPSFullTimeCollection = pricingSkillBLL.GetCollectionPricingSkill("FT");

            if (modelPSFullTimeCollection == null)
            {
                return(NotFound());
            }
            else
            {
                ViewBag.PricingSkillCollectionFulltime = modelPSFullTimeCollection;
            }

            //Project Work
            projectWorkBLL = new ProjectWorkBLL();
            var modelProjectWork = projectWorkBLL.GetCollectionProjectWorkFactory();

            if (modelProjectWork == null)
            {
                return(NotFound());
            }
            else
            {
                ViewBag.ProjectWorkCollection = modelProjectWork;
            }

            //Comments
            commentBLL = new CommentBLL();
            var modelComment = commentBLL.GetCollectionComment();

            if (modelComment == null)
            {
                return(null);
            }
            else
            {
                ViewBag.Comments = modelComment;
            }

            //Contacts
            contactBLL = new ContactBLL();
            var modelContact = contactBLL.GetCollectionContact();

            if (modelContact == null)
            {
                return(null);
            }
            else
            {
                ViewBag.Contacts = modelContact;
            }

            return(View());
        }