Esempio n. 1
0
        public List <string> GetDemographics(string demographic, int?id)
        {
            List <string> ls = new List <string>();

            switch (demographic)
            {
            case "General":
                ls.Add("General");
                break;

            case "Gender":
                ls.Add(ViewRes.Views.Shared.Shared.Male);
                ls.Add(ViewRes.Views.Shared.Shared.Female);
                break;

            case "PositionLevel":
                ls = new PositionLevelsServices().GetByCompany(test.Company_Id).OrderBy(m => m.Name).Select(m => m.Name).ToList();
                break;

            case "AgeRange":
                ls = new AgesServices().GetByCompany(test.Company_Id).OrderBy(m => m.Name).Select(m => m.Name).ToList();
                break;

            case "InstructionLevel":
                ls = new InstructionLevelsServices().GetByCompany(test.Company_Id).OrderBy(m => m.Name).Select(m => m.Name).ToList();
                break;

            case "Seniority":
                ls = new SenioritiesServices().GetByCompany(test.Company_Id).OrderBy(m => m.Name).Select(m => m.Name).ToList();
                break;

            case "FunctionalOrganizationType":
                int ii = id.HasValue ? id.Value : 0;
                if (ii != 0)
                {
                    ls = new FunctionalOrganizationsServices().GetByType(ii).OrderBy(m => m.Name).Select(m => m.Name).ToList();
                }
                break;

            case "Location":
                ls = new LocationsServices().GetByCompany(test.Company_Id).OrderBy(m => m.Name).Select(m => m.Name).ToList();
                break;

            case "Performance":
                ls = new PerformanceEvaluationsServices().GetByCompany(test.Company_Id).OrderBy(m => m.Name).Select(m => m.Name).ToList();
                break;

            default:
                break;
            }
            return(ls);
        }
        public JsonResult GetLocationsByCompany(int?company_id)
        {
            List <object>     locations       = new List <object>();
            LocationsServices locationService = new LocationsServices();

            foreach (var location in locationService.GetLocationsForDropDownList((int)company_id))
            {
                locations.Add(
                    new
                {
                    optionValue   = location.Key,
                    optionDisplay = location.Value
                });
            }

            return(Json(locations));
        }
        public static async Task <ObservableCollection <Location> > InitializeAllLocationsAsync()
        {
            var locationsServices = new LocationsServices();

            return(await locationsServices.GetAllComponentsAsync());
        }
 public LocationsController(LocationsServices _locatonService)
 {
     this._locationService = _locatonService;
 }
 public LocationsController()
 {
     _locationService = new LocationsServices();
 }