Example #1
0
        private string maquila(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 "addLst":
                    jsonData = new StreamReader(context.Request.InputStream).ReadToEnd();
                    List <Maquila> lst     = JsonConvert.DeserializeObject <List <Maquila> >(jsonData);
                    string         pathImg = HttpContext.Current.Server.MapPath("~/rpt/maqpas/");
                    response = JsonConvert.SerializeObject(MaquilaCtrl.MaquilaAddLst(lst, pathImg));
                    break;
                }
            }
            catch (Exception e)
            {
                response = e.Message;
            }

            return(response);
        }