コード例 #1
0
        // SMS Envio

        public static Resultados_Models EnviarSMS(string phone, string port, string mensaje, int men_id = 0)
        {
            Resultados_Models R = SynWayAPI_models.EnvioSMS(SynWayAPI_models.Envios_Types.SendSMS, phone, port, mensaje);

            if (men_id > 0)
            {
                Mensajes_Models M = new Mensajes_Models().SelectMensajexID(men_id);
                M.men_resultado = R.res_cantidad + ":" + "[" + R.res_contenido.result + "]" + R.res_contenido.content;
                M.InsertUpdateMensajes(M);
            }
            return(R);
        }
コード例 #2
0
        public List <Inbox_Models> GetInbox()
        {
            List <Inbox_Models> ListI = new List <Inbox_Models>();

            try
            {
                var query = SynWayAPI_models.Consultas(SynWayAPI_models.Consultas_Types.GetInbox).res_contenido;
                if (query.result == "ok")
                {
                    int i = 1;
                    foreach (var item in query.content.Split(';'))
                    {
                        ListI.Add(new Inbox_Models {
                            id = i, content = item
                        });
                        i++;
                    }
                }
                else
                {
                    ListI.Add(new Inbox_Models {
                        id = -1, content = query.content
                    });
                }


                return(ListI);
            }
            catch (Exception ex)
            {
                ListI.Add(new Inbox_Models()
                {
                    id = -1, content = ex.Message
                });

                return(ListI);
            }
        }