/// <summary> /// Registra una nueva solicitud /// </summary> /// <param name="solicitud">Objeto con la informacion de la solicitud</param> /// <returns></returns> public async Task <(HttpStatusCode StatusCode, SolicitudResponse solicitudInfo)> RegistrarSolicitudAsync(Solicitud solicitud) { var res = await CallFormUrlEncoded <SolicitudResponse>("CrearSolicitud", HttpMethod.Post, ("P_GUID_TIPO_SOLICITUD", solicitud.IdTipoSolicitud.ToString()), ("P_TIPO_SERVICIO", solicitud.IdTipoServicio.ToString()), ("P_FECHA_SOLICITUD", solicitud.FechaSolicitud.ToDateTimeFormat24H()), ("P_HORAS_PACTADAS", solicitud.HorasSolicidatas.ToString()), ("P_GUID_CLIENTE", solicitud.IdCliente.ToString()), ("P_GUID_SOCIO", solicitud.IdSocio.ToString()), ("P_TOTAL_PAGADO", solicitud.TotalPago.ToString()), ("P_GUID_MONEDA", solicitud.IdMoneda.ToString()), ("P_GUID_CUENTA_ORIGEN", solicitud.IdCuentaOrigen.ToString()), ("P_GUID_CUENTA_DESTINO", solicitud.IdCuentaDestino.ToString()), ("P_TEXTO_ORIGEN", solicitud.Origen), ("P_TEXTO_DESTINO", solicitud.Destino), ("P_TIEMPO_GENERAR_SOLICITUD", solicitud.TiempoGenerarSolicitud.ToString()), ("P_VERSION_APP", solicitud.VersionApp), ("P_MOVIL", solicitud.Movil), ("P_UBICACION_1_LAT", solicitud.Latitud.ToString()), ("P_UBICACION_1_LON", solicitud.Longitud.ToString()), ("P_UBICACION_2_LAT", solicitud.Latitud2.ToString()), ("P_UBICACION_2_LON", solicitud.Longitud2.ToString()), ("P_NO_ELEMENTOS", solicitud.NoElementos.ToString()), ("P_GUID_SOCIOS_SELECCIONADOS", solicitud.SociosSelected)); return(res); }
/// <summary> /// Actualiza el password del socio /// </summary> /// <param name="idSocio">Identoficador del socio</param> /// <param name="password">Passowrd a actualizar</param> /// <returns></returns> public async Task <(HttpStatusCode StatusCode, Respuesta Respuesta)> ActualizarPasswordSocioAsync(Guid idSocio, string password) { var res = await CallFormUrlEncoded <Respuesta>("ActualizaInfoSocio", HttpMethod.Post, ("P_GUID_SOCIO", idSocio.ToString()), ("P_PWD", password)); return(res); }
public async Task <(HttpStatusCode StatusCode, LoginResponse LoginInfo)> LoginAsync(string usuario, string contraseña) { var res = await CallFormUrlEncoded <LoginResponse>("LoginAsync", HttpMethod.Post, ("P_USUARIO", usuario), ("P_PWD", contraseña)); return(res); }
/// <summary> /// Actualiza la información del socio /// </summary> /// <param name="socio"></param> /// <param name="info"></param> /// <param name="img"></param> /// <returns></returns> public async Task <(HttpStatusCode StatusCode, Respuesta Respuesta)> ActualizaSocioAsync(Guid socio, DetalleSocio info) { var res = (HttpStatusCode.InternalServerError, new Respuesta()); if (info.FechaNacimiento.Equals(null) && info.GUID_SEXO.Equals(null)) { res = await CallFormUrlEncoded <Respuesta>("ActualizaInfoSocio", HttpMethod.Post, ("P_GUID_SOCIO", socio.ToString()), ("P_NOMBRE", info.NOMBRE), ("P_APELLIDO_1", info.APELLIDO_1), ("P_APELLIDO_2", info.APELLIDO_2), ("P_TEL_NUMERO", info.TEL_NUMERO)); } else if (info.FechaNacimiento.Equals(null)) { res = await CallFormUrlEncoded <Respuesta>("ActualizaInfoSocio", HttpMethod.Post, ("P_GUID_SOCIO", socio.ToString()), ("P_NOMBRE", info.NOMBRE), ("P_APELLIDO_1", info.APELLIDO_1), ("P_APELLIDO_2", info.APELLIDO_2), ("P_SEXO", info.GUID_SEXO.ToString()), ("P_TEL_NUMERO", info.TEL_NUMERO)); } else if (info.GUID_SEXO.Equals(null)) { res = await CallFormUrlEncoded <Respuesta>("ActualizaInfoSocio", HttpMethod.Post, ("P_GUID_SOCIO", socio.ToString()), ("P_FECHA_NACIMIENTO", info.FechaNacimiento.Value.ToString("MM-dd-yyyy")), ("P_NOMBRE", info.NOMBRE), ("P_APELLIDO_1", info.APELLIDO_1), ("P_APELLIDO_2", info.APELLIDO_2), ("P_TEL_NUMERO", info.TEL_NUMERO)); } else { res = await CallFormUrlEncoded <Respuesta>("ActualizaInfoSocio", HttpMethod.Post, ("P_GUID_SOCIO", socio.ToString()), ("P_FECHA_NACIMIENTO", info.FechaNacimiento.Value.ToString("MM-dd-yyyy")), ("P_NOMBRE", info.NOMBRE), ("P_APELLIDO_1", info.APELLIDO_1), ("P_APELLIDO_2", info.APELLIDO_2), ("P_SEXO", info.GUID_SEXO.ToString()), ("P_TEL_NUMERO", info.TEL_NUMERO)); } return(res); }
/// <summary> /// Registra un nuevo socio /// </summary> /// <param name="nuevoSocio"></param> /// <returns></returns> public async Task <(HttpStatusCode StatusCode, Respuesta Respuesta)> CrearSocioAsync(NuevoSocio nuevoSocio) { var res = await CallFormUrlEncoded <Respuesta>("CrearSocio", HttpMethod.Post, ("P_NOMBRE", nuevoSocio.P_NOMBRE), ("P_APELLIDO_1", nuevoSocio.P_APELLIDO_1), ("P_APELLIDO_2", nuevoSocio.P_APELLIDO_2), ("P_FECHA_NACIMIENTO", nuevoSocio.P_FECHA_NACIMIENTO), ("P_GUID_CIUDAD_OPERACIÓN", nuevoSocio.P_GUID_CIUDAD_OPERACIÓN.ToString()), ("P_GUID_PAIS", nuevoSocio.P_GUID_PAIS.ToString()), ("P_GUID_ESTADO_PROVINCIA", nuevoSocio.P_GUID_ESTADO_PROVINCIA.ToString()), ("P_GUID_MUNICIPIO", nuevoSocio.P_GUID_MUNICIPIO.ToString()), ("P_GUID_COLONIA", nuevoSocio.P_GUID_COLONIA.ToString()), ("P_CALLE", nuevoSocio.P_CALLE.ToString()), ("P_NO_EXT", nuevoSocio.P_NO_EXT.ToString()), ("P_NO_INT", nuevoSocio.P_NO_INT.ToString()), ("P_ALIAS", nuevoSocio.P_ALIAS), ("P_PWD", nuevoSocio.P_PWD), ("P_E_MAIL", nuevoSocio.P_E_MAIL), ("P_TEL_NUMERO", nuevoSocio.P_TEL_NUMERO.ToString())); return(res); }