Пример #1
0
        public async void descargarListaVehiculos_SQLServer(StartActicityOnRequestFinished callback)
        {
            callback.levantarBanderaVehiculos(false);

            Log.Info(TAG, "Se inicia descargar de Lista de Vehiculos de SQLServer");

            RestClient <Vehicle> restClient = new RestClient <Vehicle>();
            var vehiclesList = new List <Vehicle>();

            try
            {
                vehiclesList = await restClient.GetAsync(TIPO_VEHICLES);

                callback.levantarBanderaVehiculos(true);
                callback.compararListaVehiculos(vehiclesList);
            }
            catch (Exception ex)
            {
                Log.Error("descargarListaVehiculos_SQLServer", ex.Message);
                callback.errorDescargaVehiculos();
            }
        }
Пример #2
0
        public async void descargarListaPreUsosDelDia_SQLServer(string fecha, StartActicityOnRequestFinished callback)
        {
            callback.levantarBanderaPreUsos(false);

            Log.Info(TAG, "Se inicia descargar de Lista de Pre-Usos del dia desde SQLServer");

            RestClient <CheckListSummary> restClient = new RestClient <CheckListSummary>();
            var CheckLists = new List <CheckListSummary>();

            try
            {
                CheckLists = await restClient.GetCheckListSummariesByBrowser(TIPO_CHECKLISTSUMMARY, fecha);

                callback.levantarBanderaPreUsos(true);
                callback.compararListaPreUsos(CheckLists);
            }
            catch (Exception ex)
            {
                Log.Error("descargarListaCheckLists_SQLServer", ex.Message);
                callback.errorDescargaVehiculos();
            }
        }
Пример #3
0
        public async void descargarListaUsuarios_SQLServer(StartActicityOnRequestFinished callback)
        {
            callback.levantarBanderaUsuarios(false);

            Log.Info(TAG, "Se inicia descargar de Lista de Usuarios de SQLServer");

            RestClient <User> restClient = new RestClient <User>();
            var usersList = new List <User>();

            try
            {
                usersList = await restClient.GetUsersName(TIPO_USER);

                callback.levantarBanderaUsuarios(true);
                callback.compararListaUsuarios(usersList);
            }
            catch (Exception ex)
            {
                Log.Error("descargarListaUsuarios_SQLServer", ex.Message);
                callback.errorDescargaUsuarios();
            }
        }