Ejemplo n.º 1
0
        public static async Task <bool> CheckIntegrity(Context context)
        {
            CanSetUbicacion = true;
            if (Usuario == null)
            {
                ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(context);
                int UserID = prefs.GetInt("BossMandados_UserID", 0);

                if (UserID == 0)
                {
                    return(false);
                }

                LoginData logindata = new LoginData(context);

                Usuario = await logindata.GetUser(UserID);
            }

            if (Usuario == null)
            {
                return(false);
            }

            if (Repartidor == null)
            {
                WelcomeData welcomedata = new WelcomeData(context);
                Repartidor = await welcomedata.Repartidor(Usuario.Id);

                nMandados = 0;
            }
            return(Repartidor != null);
        }
Ejemplo n.º 2
0
        public async Task <Manboss_repartidor> Repartidor(int RepartidorID)
        {
            Manboss_repartidor repartidor = await data.Repartidor(RepartidorID);

            User.Repartidor = repartidor;
            return(repartidor);
        }