Ejemplo n.º 1
0
        public object Post(InputPOST pInputPOST)
        {
            if (pInputPOST is null)
            {
                return(null);
            }

            List <GeoZone> oListToReturn = new List <GeoZone>();

            switch (pInputPOST.method)
            {
            case "GetGeoZoneData":
                _oCovidDAO.GetGeoZoneData(pInputPOST._oCovidData, oListToReturn);
                break;

            case "GetAllGeoZoneData":
                _oCovidDAO.GetAllGeoZoneData(pInputPOST._oCovidData, oListToReturn);
                break;

            case "GetAllGeoZoneDataForAllDates":
                _oCovidDAO.GetAllGeoZoneDataForAllDates(oListToReturn);
                break;

            case "GetAllCountries":
                _oCovidDAO.GetAllCountries(oListToReturn);
                break;

            case "GetAllDates":
                List <CovidDate> oListToReturnCovidDate = new List <CovidDate>();
                _oCovidDAO.GetAllDates(oListToReturnCovidDate);
                return(oListToReturnCovidDate);

            default:
                return(null);
            }

            return(oListToReturn);
        }
Ejemplo n.º 2
0
        private async Task <bool> CheckTable(string pTable)
        {
            CoVid.Models.InputModels.CovidData oCovidData = new CoVid.Models.InputModels.CovidData();
            oCovidData.oDates = new Models.InputModels.Dates();
            //Sample Dates
            oCovidData.oDates.startDate = "10/06/2020";
            oCovidData.oDates.endDate   = "15/06/2020";
            oCovidData.oCountryList     = new List <string>()
            {
                pTable
            };

            List <GeoZone> oGeoZonesList = new List <GeoZone>();

            _oCovidDao.GetGeoZoneData(oCovidData, oGeoZonesList);

            if (oGeoZonesList.Count == UtilsConstants.IntConstants.ZERO)
            {
                return(false);
            }

            return(true);
        }