Ejemplo n.º 1
0
        private string entLiverpool(HttpContext context)
        {
            string response = string.Empty;
            string option   = context.Request["opt"].ToString();

            //string email = context.Request["email"].ToString();
            //string pass = context.Request["pass"].ToString();
            try
            {
                switch (option)
                {
                case "getCodigosPendientes":
                    response = JsonConvert.SerializeObject(EntradaCtrl.EntradaLiverpoolGetCodPendientes());
                    break;

                case "subirMaquila":
                    jsonData = new StreamReader(context.Request.InputStream).ReadToEnd();
                    List <Entrada_liverpool> lst = JsonConvert.DeserializeObject <List <Entrada_liverpool> >(jsonData);

                    response = JsonConvert.SerializeObject(EntradaCtrl.EntradaLiverpoolSaveMaquila(lst));

                    break;
                }
            }
            catch (Exception e)
            {
                response = e.Message;
            }

            return(response);
        }