public JobSearchCompanyListViewModel(JobSearchDetailsViewModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            JobSearchId = model.JobSearch.Id;
            SetHiddenStatusList(model.JobSearch.HiddenCompanyStatuses);
            UsedStatuses      = model.JobSearch.Companies.Select(x => x.LeadStatus).Distinct().ToList();
            TotalCompanyCount = model.JobSearch.Companies.Count();
            Companies         = model.JobSearch.Companies.Where(x => !HiddenStatuses.Contains(x.LeadStatus)).ToList();
        }
        public JobSearchCompanyListViewModel(JobSearch jobSearch)
        {
            if (jobSearch == null)
            {
                throw new ArgumentNullException("jobSearch");
            }

            JobSearchId = jobSearch.Id;
            SetHiddenStatusList(jobSearch.HiddenCompanyStatuses);
            UsedStatuses      = jobSearch.Companies.Select(x => x.LeadStatus).Distinct().ToList();
            TotalCompanyCount = jobSearch.Companies.Count();

            // Only show companies with statuses not on the hidden status list
            Companies = jobSearch.Companies.Where(x => !HiddenStatuses.Contains(x.LeadStatus)).ToList();
        }