public async Task <List <Manboss_mandados_ruta> > Route(int orderID, int tipo) { List <Manboss_mandados_ruta> ruta = new List <Manboss_mandados_ruta>(); try { if (tipo == 0) { Dictionary <string, string> param = new Dictionary <string, string>() { { "MandadoID", orderID.ToString() } }; ruta = await client.InvokeApiAsync <List <Manboss_mandados_ruta> >("MandadosActivos/Ruta", HttpMethod.Post, param); } else { Dictionary <string, string> param = new Dictionary <string, string>() { { "MandadoID", orderID.ToString() }, { "Estado", "1" } }; ruta = await client.InvokeApiAsync <List <Manboss_mandados_ruta> >("Mandados/Ruta", HttpMethod.Post, param); } } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(ruta); }
public async Task <bool> SetStatus(bool status, int RepartidorID) { bool result = false; try { Dictionary <string, string> param = new Dictionary <string, string> { { "Estado", status.ToString() }, { "RepartidorID", RepartidorID.ToString() } }; result = await client.InvokeApiAsync <bool>("Repartidor/Estado", HttpMethod.Post, param); } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(result); }
public async Task <bool> AddComission(int repartidorID, int mandadoID) { try { Dictionary <string, string> param = new Dictionary <string, string> { { "RepartidorID", repartidorID.ToString() }, { "MandadoID", mandadoID.ToString() } }; return(await client.InvokeApiAsync <bool>("Comision/Agregar", HttpMethod.Post, param)); } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(false); }
public async Task <List <Manboss_mandado> > PendingOrders(int repartidorID, int estado) { List <Manboss_mandado> mandados = new List <Manboss_mandado>(); try { Dictionary <string, string> param = new Dictionary <string, string> { { "RepartidorID", repartidorID.ToString() }, { "Estado", estado.ToString() } }; mandados = await client.InvokeApiAsync <List <Manboss_mandado> >("MandadosActivos/Mandados", HttpMethod.Post, param); } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(mandados); }
public async Task <int> SetUbicacion(double latitud, double longitud, int RepartidorID) { int result = 0; try { Dictionary <string, string> param = new Dictionary <string, string> { { "Latitud", latitud.ToString() }, { "Longitud", longitud.ToString() }, { "RepartidorID", RepartidorID.ToString() } }; result = await client.InvokeApiAsync <int>("Repartidor/Ubicacion", HttpMethod.Post, param); } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(result); }
public async Task <Manboss_cliente> Client(int clientID) { Manboss_cliente cliente = null; try { Dictionary <string, string> param = new Dictionary <string, string> { { "ClienteID", clientID.ToString() } }; var current = await client.InvokeApiAsync <Manboss_cliente>("Cliente/Cliente", HttpMethod.Post, param); cliente = current; } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(cliente); }
public async Task <bool> CompleteTask(int TaskID) { bool result = false; try { Dictionary <string, string> param = new Dictionary <string, string> { { "RutaID", TaskID.ToString() } }; var current = await client.InvokeApiAsync <bool>("MandadosActivos/CompletarPunto", HttpMethod.Post, param); result = current; } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(result); }
public async Task <Manboss_mandado> GetMandado(int mandadoID) { Manboss_mandado mandado = null; try { Dictionary <string, string> param = new Dictionary <string, string> { { "MandadoID", mandadoID.ToString() } }; mandado = await client.InvokeApiAsync <Manboss_mandado>("Mandados/Mandados", HttpMethod.Post, param); } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(mandado); }
public async Task <Manboss_repartidor> Repartidor(int RepartidorID) { Manboss_repartidor userReturn = null; try { Dictionary <string, string> param = new Dictionary <string, string> { { "RepartidorID", RepartidorID.ToString() }, { "MetodoRepartidor", "true" } }; var current = await client.InvokeApiAsync <Manboss_repartidor>("Perfil/Repartidor", HttpMethod.Post, param); userReturn = current; } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(userReturn); }
public async Task <bool> SetOrder(int OrderID, int State) { bool result = false; try { Dictionary <string, string> param = new Dictionary <string, string> { { "MandadoID", OrderID.ToString() }, { "Estado", State.ToString() } }; var current = await client.InvokeApiAsync <bool>("MandadosActivos/SetMandado", HttpMethod.Post, param); result = current; } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(result); }
public async Task <List <Manboss_comision> > Comissions(int repartidorID) { List <Manboss_comision> ans = null; try { Dictionary <string, string> param = new Dictionary <string, string> { { "RepartidorID", repartidorID.ToString() } }; var current = await client.InvokeApiAsync <List <Manboss_comision> >("Comision/Comisiones", HttpMethod.Post, param); ans = current; } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(ans); }
public async Task <Manboss_usuario> GetUser(int UserID) { Manboss_usuario userReturn = null; try { Dictionary <string, string> param = new Dictionary <string, string> { { "UsuarioID", UserID.ToString() } }; var current = await client.InvokeApiAsync <Manboss_usuario>("Usuario/GetUsuario", HttpMethod.Post, param); userReturn = current; } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(userReturn); }
public async Task <List <Manboss_chat_mensaje> > Conversacion(int mandadoID) { List <Manboss_chat_mensaje> ans = null; try { Dictionary <string, string> param = new Dictionary <string, string> { { "MandadoID", mandadoID.ToString() } }; var current = await client.InvokeApiAsync <List <Manboss_chat_mensaje> >("Chat/Conversacion", HttpMethod.Post, param); ans = current; } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(ans); }
public async Task <int> Chat(int mandadoID, int repartidorID) { int ans = 0; try { Dictionary <string, string> param = new Dictionary <string, string> { { "MandadoID", mandadoID.ToString() }, { "RepartidorID", repartidorID.ToString() } }; var current = await client.InvokeApiAsync <int>("Chat/Chat", HttpMethod.Post, param); ans = current; } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(ans); }
public async Task <bool> Mensaje(int chatID, string message) { bool ans = false; try { Dictionary <string, string> param = new Dictionary <string, string> { { "ChatID", chatID.ToString() }, { "Mensaje", message }, { "Rol", "2" } }; var current = await client.InvokeApiAsync <bool>("Chat/Mensaje", HttpMethod.Post, param); ans = current; } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(ans); }
public async Task <Manboss_usuario> Login(string correo, string password) { Manboss_usuario userReturn = null; try { Dictionary <string, string> param = new Dictionary <string, string> { { "correo", correo }, { "password", password } }; //Cliente/Login var current = await client.InvokeApiAsync <Manboss_usuario>("Repartidor/Login", HttpMethod.Post, param); userReturn = current; } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(userReturn); }
public async Task <string> GetPolyline(int MandadoID) { string answer = null; try { Dictionary <string, string> param = new Dictionary <string, string> { { "MandadoID", MandadoID.ToString() }, }; //GoogleDirections/GetPolyline var current = await client.InvokeApiAsync <string>("GoogleDirections/GetPolyline", HttpMethod.Post, param); answer = current; } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(answer); }
public async Task <List <Manboss_comision> > Filter(int repartidorID, int year, int month, int day) { List <Manboss_comision> ans = null; try { Dictionary <string, string> param = new Dictionary <string, string> { { "RepartidorID", repartidorID.ToString() }, { "Day", day.ToString() }, { "Month", month.ToString() }, { "Year", year.ToString() }, }; var current = await client.InvokeApiAsync <List <Manboss_comision> >("Comision/Filtrar", HttpMethod.Post, param); ans = current; } catch (Exception e) { string m = e.Message; Dialogs.BasicDialog("No se pudo establecer conexión", "Error en al Red", context); } return(ans); }