Ejemplo n.º 1
0
        public static ResourceProfileViewModel Initialize(int resourceId)
        {
            ResourceProfileViewModel resourceProfile = new ResourceProfileViewModel();

            resourceProfile.Resource = Resource.Initialize(resourceId);
            var resoureDoc = resourceProfile.Resource.ResourceDocuments.Where(d => d.DocumentTypeId == (int)DocumentTypes.ProfilePicture).
                             OrderByDescending(d => d.UploadedTimestamp).FirstOrDefault();

            if (resoureDoc != null)
            {
                resourceProfile.ProfilePictureLink = resoureDoc.FilePath;
            }
            if (resourceProfile.ProfilePictureLink == null || resourceProfile.ProfilePictureLink.Length == 0)
            {
                //set default path.
                resourceProfile.ProfilePictureLink = "/Images/default.png";
            }
            resourceProfile.Interviews   = Interview.GetInterviews(resourceProfile.Resource.ResourceId);
            resourceProfile.Requirements = Requirement.GetRequirements(resourceProfile.Resource.ResourceId);
            return(resourceProfile);
        }
Ejemplo n.º 2
0
        public Requirement Copy()
        {
            var requirement = new Requirement();

            requirement.JobNumber         = JobNumber;
            requirement.JobTitle          = JobTitle;
            requirement.Priority          = Priority;
            requirement.Status            = Status;
            requirement.Tier1ClientId     = Tier1ClientId;
            requirement.Tier2ClientId     = Tier2ClientId;
            requirement.Location          = Location;
            requirement.Duration          = Duration;
            requirement.HourlyBuyRate     = HourlyBuyRate;
            requirement.HourlyBillingRate = HourlyBillingRate;
            requirement.JobTypeId         = JobTypeId;
            requirement.OneTimeFee        = OneTimeFee;
            requirement.RecruiterId       = RecruiterId;
            requirement.AccountManagerId  = AccountManagerId;
            requirement.Description       = Description;
            requirement.NoofPositions     = NoofPositions;
            return(requirement);
        }